keyCode
Results obtained from
Key and Character
Codes vs. Event Types using
Finnish keyboard on WindowsXP.
Note, keydown/up keycodes with English keyboard may not be the same
character | IE7keyCode/charCode |
FF3prekeyCode/charCode |
Safari 3.1keyCode/charCode |
Opera 9.5bkeyCode/charCode |
||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
keydown |
keypress |
keyup |
keydown |
keypress |
keyup |
keydown |
keypress |
keyup |
keydown |
keypress |
keyup |
|
"Backspace" | 8/- | — | 8/- | 8/- | 8/- | 8/- | 8/- | — | 8/- | 8/- | 8/- | 8/- |
"Tab" | 9/- | — | — | 9/- | 9/- | — | 9/- | — | — | 9/- | 9/- | — |
"Enter" | 13/- | 13/- | 13/- | 13/- | 13/- | 13/- | 13/- | 13/13 | 13/- | 13/- | 13/- | 13/- |
"Shift" | 16/- | — | 16/- | 16/- | — | 16/- | 16/- | — | 16/- | 16/- | 16/- | 16/- |
"Ctrl" | 17/- | — | 17/- | 17/- | — | 17/- | 17/- | — | 17/- | 17/- | 17/- | 17/- |
"Alt" | 18/- | — | 18/- | 18/- | — | 18/- | 18/- | — | 18/- | 18/- | 18/- | — |
"Pause" | 19/- | — | 19/- | 19/- | 19/- | 19/- | 19/- | — | 19/- | 19/- | 19/- | 19/- |
"Caps Lock" | 20/- | — | 20/- | 20/- | — | 20/- | 20/- | — | 20/- | 20/- | — | 20/- |
"Esc" | 27/- | 27/- | 27/- | 27/- | 27/- | 27/- | 27/- | — | 27/- | 27/- | 27/- | 27/- |
"Space" | 32/- | 32/- | 32/- | 32/- | 0/32 | 32/- | 32/- | 32/32 | 32/- | 32/- | 32/- | 32/- |
"PgUp" | 33/- | — | 33/- | 33/- | 33/- | 33/- | 33/- | — | 33/- | 33/- | 33/- | 33/- |
"End" | 35/- | — | 35/- | 35/- | 35/- | 35/- | 35/- | — | 35/- | 35/- | 35/- | 35/- |
"PgDn" | 34/- | — | 34/- | 34/- | 34/- | 34/- | 34/- | — | 34/- | 34/- | 34/- | 34/- |
"Home" | 36/- | — | 36/- | 36/- | 36/- | 36/- | 36/- | — | 36/- | 36/- | 36/- | 36/- |
"Insert" | 45/- | — | 45/- | 45/- | 45/- | 45/- | 45/- | — | 45/- | 45/- | 45/- | 45/- |
"Delete" | 46/- | — | 46/- | 46/- | 46/- | 46/- | 46/- | — | 46/- | 46/- | 46/- | 46/- |
) | 57/- | 41/- | 57/- | 57/- | 0/41 | 57/- | 57/- | 41/41 | 57/- | 57/- | 41/- | 57/- |
! | 49/- | 33/- | 49/- | 49/- | 0/33 | 49/- | 49/- | 33/33 | 49/- | 49/- | 33/- | 49/- |
@ | 50/- | 64/- | 50/- | 50/- | 0/64 | 50/- | 50/- | 64/64 | 50/- | 50/- | 64/- | 50/- |
# | 51/- | 35/- | 51/- | 51/- | 0/35 | 51/- | 51/- | 35/35 | 51/- | 51/- | 35/- | 51/- |
$ | 52/- | 36/- | 52/- | 52/- | 0/36 | 52/- | 52/- | 36/36 | 52/- | 52/- | 36/- | 52/- |
% | 53/- | 37/- | 53/- | 53/- | 0/37 | 53/- | 53/- | 37/37 | 53/- | 53/- | 37/- | 53/- |
^ | 186/- | 94/- | 186/- | 59/- | 0/94 | 59/- | 186/- | 94/94 | 186/- | 168/- | 94/- | 168/- |
& | 54/- | 38/- | 54/- | 54/- | 0/38 | 54/- | 54/- | 38/38 | 54/- | 54/- | 38/- | 54/- |
* (in numpad) | 106/- | 42/- | 106/- | 106/- | 0/42 | 106/- | 106/- | 42/42 | 106/- | 42/- | 42/- | 42/- |
( | 56/- | 40/- | 56/- | 56/- | 0/40 | 56/- | 56/- | 40/40 | 56/- | 56/- | 40/- | 56/- |
; | 188/- | 59/- | 188/- | 188/- | 0/59 | 188/- | 188/- | 59/59 | 188/- | 188/- | 59/- | 188/- |
: | 190/- | 58/- | 190/- | 190/- | 0/58 | 190/- | 190/- | 58/58 | 190/- | 190/- | 58/- | 190/- |
= | 48/- | 61/- | 48/- | 48/- | 0/61 | 48/- | 48/- | 61/61 | 48/- | 48/- | 61/- | 48/- |
, | 188/- | 44/- | 188/- | 188/- | 0/44 | 188/- | 188/- | 44/44 | 188/- | 188/- | 44/- | 188/- |
< | 188/- | 60/- | 188/- | 188/- | 0/60 | 188/- | 188/- | 60/60 | 188/- | 188/- | 60/- | 188/- |
. | 190/- | 46/- | 190/- | 190/- | 0/46 | 190/- | 190/- | 46/46 | 190/- | 190/- | 46/- | 190/- |
> | 226/- | 62/- | 226/- | 226/- | 0/62 | 226/- | 226/- | 62/62 | 226/- | 188/- | 62/- | 188/- |
/ | 55/- | 47/- | 55/- | 55/- | 0/47 | 55/- | 55/- | 47/47 | 55/- | 55/- | 47/- | 55/- |
? | 191/- | 63/- | 191/- | 107/- | 0/63 | 107/- | 191/- | 63/63 | 191/- | 61/- | 63/- | 61/- |
[ | 56/- | 91/- | 56/- | 56/- | 0/91 | 56/- | 56/- | 91/91 | 56/- | 56/- | 91/- | 56/- |
{ | 55/- | 123/- | 55/- | 55/- | 0/123 | 55/- | 55/- | 123/123 | 55/- | 55/- | 123/- | 55/- |
\ | 187/- | 92/- | 187/- | 107/- | 92/- | 107/- | 187/- | 92/92 | 187/- | 161/- | 92/- | 161/- |
| | 226/- | 124/- | 226/- | 226/- | 0/124 | 226/- | 226/- | 124/124 | 226/- | 188/- | 124/- | 188/- |
] | 57/- | 93/- | 57/- | 57/- | 0/93 | 57/- | 57/- | 93/93 | 57/- | 57/- | 93/- | 57/- |
} | 48/- | 125/- | 48/- | 48/- | 0/125 | 48/- | 48/- | 125/125 | 48/- | 48/- | 125/- | 48/- |
' | 191/- | 39/- | 191/- | 191/- | 0/39 | 191/- | 191/- | 39/39 | 191/- | 222/- | 39/- | 222/- |
" | 50/- | 34/- | 50/- | 50/- | 0/34 | 50/- | 50/- | 34/34 | 50/- | 50/- | 34/- | 50/- |
For 0-9 keydown, keyup and keypress the range is 48-57.
With keypress event FF3pre reports the value in .charCode.
With keypress event Safari 3.1 reports the value in .keyCode and in .charCode.
For a-z keydown and keyup the range is 65-90 and for keypress it's
97-122.
With keypress event FF3pre reports the value in .charCode.
With keypress event Safari 3.1 reports the value in .keyCode and in .charCode.
For A-Z keydown, keyup and keypress the range is 65-90.
With keypress event FF3pre reports the value in .charCode.
With keypress event Safari 3.1 reports the value in .keyCode and in .charCode.
For F1-F2 keydown and keyup the range is 112-123. FF3pre and Opera9.5b dispatch also keypress.