onkeydown, onkeyup | NN 4 IE 4 DOM 3
| Bubbles: Yes; Cancelable: Yes
Fire when the user presses (onkeydown) and releases (onkeyup) a keyboard key. These two events fire on a focusable element or object for almost every key of the keyboard, including function and navigation keys. The instance of the event object for these events contains information about the key (not the character) pressed. See Chapter 6 for details on cross-browser handling of keyboard events. You cannot reliably inhibit critical Ctrl character sequences, but if you prevent the default action of the onkeypress event for a text form control, the character does not arrive at the text field.
Typical Targets
All focusable rendered elements, plus document and window objects.