Javascript onKeyPress, onKeyDown, onKeyUp
A very good place to start if you want to capture keyboard events with JavaScript: http://www.quirksmode.org/js/keys.html
Rule of thumb (i guess) is:
- Use keyDown or keyUp, not keyPress
- Use keyCode instead of charCode
- Use the link above and scroll to the bottom to check the keyCodes of various keys :)