While online pattern generators and the others are pretty interesting, I am sure coders aren’t crazy about them, so I decided to gather all the courage I could find and step into the code land. That doesn’t mean we’ll leave Web-based resources for Web developers aside, it’s only the fact they’ll have a lower percentage of the WebDev3000 pie, that’s all! These being said, let’s take a look at jQuery Hotkeys, shall we?
The Javascript jQuery Hotkeys plugin comes from Google Code, and its purpose is a very basic one, allowing you to add and remove handlers for keyboard events, virtually anywhere in your code, and supporting any key combination you can think of… or almost.
To make things clear, it only takes a line of code to bind a keyboard combo, and also one line to unbind it. For example, “$(document).bind(‘keydown’, ‘ctrl+c’, fn);” binds Ctrl+C, while the unbinding code is simply trivial – “$(document).unbind(‘keydown’, ‘ctrl+c’, fn);”
At last, you should know that the Javascript jQuery Hotkeys plugin comes covered by the MIT license, and – obviously – requires for the jQuery Framework to be in place. Other than that… happy binding! 😉
Compatibility: jQuery Hotkeys works with Safari, Opera, IE, Firefox and related browsers, including Google Chrome