I’m using to jQuery.hotkeys to bind keyboard events.
I’m trying to bind Ctrl+Shift+N
$(document).bind('keydown', 'ctrl+shift+n', function(e) {
e.preventDefault();
alert('Ctrl+Shift+N');
return false;
});
The above is not working. Any ideas?
Chrome doesn’t let you take over some shortcuts.
If you use the following code http://jsfiddle.net/rNkmA/1/
You’ll see that the handler never gets called in Chrome
I suggest you use a shortcut that is not preassigned to chrome like alt+shift+n. That will work in FF, IE, Safari and Chrome (does anybody ever test for Opera?)