I'm writing a program with two keyboard modes using jquery.hotkeys.js, I'm seeing some slowdown and flashing when unbinding all keydown
events. Is there a better way to do this?
function bindAll() {
//bind all keystroke events
$(document).bind('keydown','a', function(evt) {
//...
}
$(document).bind('keydown','b', function(evt) {
//...
}
//etc...
}
function unbindAll() {
$(document).unbind('keydown');
return true;
} //end unbinding all keystrokes