the keyPress method is fux0red. If it returns false, that means the event doesnt get propagated. Which means just adding keyNav() call to your page will kill any keyboard press.
Here's a better version
$.keyNav.keyPress = function(e){
if($.keyNav.watchedCodes[e.keyCode] != null){
var funs = $.keyNav.watchedCodes[e.keyCode];
$.each(funs,function(){ this.func.call(this.scope); });
return false;
}
return true;
};
Also, the $(':input') exceptions need to be rethought. Thats more of an application specific setting than a plugin default. Many people will want to allow keyboard shortcuts within input fields.
the keyPress method is fux0red. If it returns false, that means the event doesnt get propagated. Which means just adding keyNav() call to your page will kill any keyboard press.
Here's a better version
$.keyNav.keyPress = function(e){
if($.keyNav.watchedCodes[e.keyCode] != null){
var funs = $.keyNav.watchedCodes[e.keyCode];
$.each(funs,function(){ this.func.call(this.scope); });
return false;
}
return true;
};
Also, the $(':input') exceptions need to be rethought. Thats more of an application specific setting than a plugin default. Many people will want to allow keyboard shortcuts within input fields.