Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 611 Bytes

README.md

File metadata and controls

25 lines (18 loc) · 611 Bytes

NgHotkey

Provide hotkey functionality in AngularJS using Mousetrap

Getting Started

  1. Include nghotkey on your page
<script src="/path/to/mousetrap.min.js"></script>
<script src="/path/to/nghotkey.js"></script>
  1. Put nghotkey to your module dependencies
var app = angular.module('app', ['nghotkey']);
  1. Set hotkey for elements or directives using hotkey directive as an attribute
  <input type="text" hotkey="h ?" hotkey-action="keyup" />
  <input type="button" hotkey="ctrl+;"/>