Keyboard events in recent browsers provide information about the keys and, where applicable, characters corresponding to the keys. Character values may be read from the keypress event, while the key values, including navigation and function keys, are available from keydown and keyup events. The event object properties you use to read these values varies with the event object model. See Chapter 6 for cross-browser implementation details. The following table reveals the codes for characters in the lower ASCII character set. Some of the codes are for action keys (such as Backspace and Tab), which have character values that are also in this range. Read these values from a keypress event object.
The following table lists all keys on a typical U. S. English keyboard and their corresponding key codes. Read these codes from an onkeydown or onkeyup event object:
|