keyCode
Internet Explorer specific.
Results obtained from Key and Character Codes vs. Event Types.
character | keyCode
| ||
---|---|---|---|
keydown
| keypress
| keyup
| |
"Backspace" | 8 | 8 | |
"Tab" | 9 | ||
"Enter" | 13 | 13 | 13 |
"Shift" | 16 | 16 | |
"Ctrl" | 17 | 17 | |
"Alt" | 18 | 18 | |
"Pause" | 19 | 19 | |
"Caps Lock" | 20 | 20 | |
"Esc" | 27 | 27 | 27 |
"Space" | 32 | 32 | 32 |
"PgUp" | 33 | 33 | |
"End" | 35 | 35 | |
"PgDn" | 34 | 34 | |
"Home" | 36 | 36 | |
"Insert" | 45 | 45 | |
"Delete" | 46 | 46 | |
) | 48 | 41 | 48 |
! | 49 | 33 | 49 |
@ | 50 | 64 | 50 |
# | 51 | 35 | 51 |
$ | 52 | 36 | 52 |
% | 53 | 37 | 53 |
^ | 54 | 94 | 54 |
& | 55 | 38 | 55 |
* | 56 | 42 | 56 |
( | 57 | 40 | 57 |
; | 186 | 59 | 186 |
: | 186 | 58 | 186 |
= | 187 | 61 | 187 |
, | 188 | 44 | 188 |
< | 188 | 60 | 188 |
. | 190 | 46 | 190 |
> | 190 | 62 | 190 |
/ | 191 | 47 | 191 |
? | 191 | 63 | 191 |
[ | 219 | 91 | 219 |
{ | 219 | 123 | 219 |
\ | 220 | 92 | 220 |
| | 220 | 124 | 220 |
] | 221 | 93 | 221 |
} | 221 | 125 | 221 |
' | 222 | 39 | 222 |
" | 222 | 34 | 222 |
For 0-9 keydown, keyup and keypress the range is 48-57.
For a-z keydown and keyup the range is 65-90 and for keypress it's 97-122.
For A-Z keydown, keyup and keypress the range is 65-90.
For F1-F2 keydown and keyup the range is 112-123.