How to determine which key is pressed in javascript?
In jQuery:
jQuery(window).live('keydown', function(e) { var keyCode = e.keyCode || e.which; //do stuff with keycode } });
Normal:
document.onkeyup = KeyCheck; function KeyCheck(){ var KeyID = event.keyCode; //do stuff }