Document: keydown/keyup event

The keydown event is fired when a key is pressed.

The keyup event is fired when a key is released.

Unlike the keypress event, the keydown event is fired for all keys, regardless of whether they produce a character value.

Example

Focus the IFrame first (e.g. by clicking in it), then try pressing some keys below the line.

Event: