JavaScript DOM KeyboardEvent property: keyCode
[this page | pdf | back links]
The keyCode property
of KeyboardEvent
objects within the JavaScript
DOM (i.e.
events triggered by an action with the keyboard) returns the Unicode character
code of the key pressed (for an onkeypress
event), or the Unicode key code of the key that triggered an onkeydown or an
onkeyup event.
It is included for compatibility only, as the latest specification recommends
using the key
property.
NAVIGATION LINKS
Contents | Prev | Next | JavaScript DOM (and BOM)