charCode property

num charCode

The Unicode reference number of the key; this attribute is used only by the keypress event.

For keys whose char attribute contains multiple characters, this is the Unicode value of the first character in that attribute. In Firefox 26 this returns codes for printable characters.

See developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/charCode

Implementation

external num get charCode;