Thanks for this jeresig, there's just one problem i have with this updated version... I need to be able to capture shortcut keys that aren't attached to an input box while the user is focused on the input box.
For our WebPOS at work, a staff member is currently (using the old version of this) able to press a function key while the focus is on a text box, mostly because the hotkeys are global across the site, so they could currently be on the parts list, which auto-focuses on the text box for choosing a part and then press F10 to go back to the vehicle list.
However using this new version of yours, i would lose all abilities to do that. In the old version of the program, by default it captured hotkeys even when focused on an input box, however if you didn't want that functionality for a particular hotkey, you simply passed a 'disableInInput' name with a value of 'true' it would turn off that feature.
Is there a chance you could recode it so that it supports that feature?
[code]
jQuery(document).bind('keydown.hotkeys', {combi: 'J', disableInInput: true},
function() { console.log('J was pressed') });
[/code]