HotKeys is a keyboard hooker plug-in.
May you find this useful in cases of:
Powering your Ajax applications with keyboard short-cuts such as Ctrl+x, Alt+y, Shift+z, etc.
Games development with Javascript + jQuery
HotKeys lets you easily add and remove handlers for keyboard events anywhere in your code supporting almost *any* keys combination.
It takes a single line of code to bind or unbind a hot key.
Binding 'Ctrl+c'
$(document).bind('keydown', 'Ctrl+c', fn);
Unbinding 'Ctrl+c'
$(document).unbind('keydown', 'Ctrl+c', fn);
Live demo at: http://jshotkeys.googlepages.com/test-static-01.html
Update:New Version (0.7) Available at: http://code.google.com/p/js-hotkeys/downloads/list
评论