Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 643 Bytes

README.md

File metadata and controls

25 lines (19 loc) · 643 Bytes

jQuery Shortcuts

A very lightweight approach to keyboard shortcuts (hotkeys) with jQuery.

Example Usage

$(document).shortcuts({
  "Q": {
    keys: [81],
    desc: "Log Q to the console",
    func: function() { console.log("You pressed Q") }
  },
  "ALT I": {
    keys: [18, 73],
    desc: "Log this key combination to the console",
    func: function() { console.log("You pressed ALT and I") }
  }
});

License

Copyright © 2009 Jason L Perry

Dual licensed under the MIT and GPL licenses. Uses the same license as jQuery.