Skip to content

keyNav steals all keyboard presses #2

@merbjedi

Description

@merbjedi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions