JQuery and keyboard events
One of the many things that can and will induce a headache instantly is working with keyboard events on the multiple browsers. Â Thankfully jQuery makes things seem a whole lot easier than they actually are. here is brief example
$(document).keydown(function(event){
switch (event.keyCode) {
//ctrl key
case 17:
alert("key: ctrl");
//overide default event action
return false;
}
});
Note: The keycodes may be different across browsers and overiding the event action may did not work in ie8.
For a keycode reference and test tool check out http://is.gd/2mf9A