With jQuery, how do I find out which key was pressed when I bind to the keypress event?
$(\'#searchbox input\').bind(\'keypress\', function(e) {}); >
$(\'#searchbox input\').bind(\'keypress\', function(e) {});
Okay, I was blind:
e.which
will contain the ASCII code of the key.
See https://developer.mozilla.org/En/DOM/Event.which