Flex/AIR/AS3/Etc2009.12.07 21:03

Key ASCII Mozilla keycodes IE keycodes Opera keycodes pseudo ASCII codes exceptions
Alphabetic keys
A to Z
97/65 to 122/90 ASCII code of uppercase version of the letter
65 to 90
Space 32 32 32 32 32
Enter 13 13 13 13 13
Tab 9 9 9 9 9
Esc 27 27 27 27 27
Backspace 8 8 8 8 8
Modifier Keys
Key ASCII Mozilla keycodes IE keycodes Opera keycodes pseudo ASCII codes exceptions
Shift - 16 16 16 16 Linux Opera < 9.0: 0
Control - 17 17 17 17 Linux Opera < 9.0: 0
Mac Opera: 0
Alt - 18 18 18 18 Linux Opera < 9.0: 0
Caps Lock - 20 20 20 20 Linux Opera: 0
Num Lock - 144 144 144 144 Linux Opera < 9.50: 0
Win Opera < 9.00: 0
Keyboard Number Keys
Key ASCII Mozilla keycodes IE keycodes Opera keycodes pseudo ASCII codes exceptions
1 ! 49/33 49 49 49 49/33 Mac Gecko < 1.8: 49/0
2 @ 50/64 50 50 50 50/64 Mac Gecko < 1.9: 50/0
3 # 51/35 51 51 51 51/35 Mac Gecko < 1.9: 51/0
4 $ 52/36 52 52 52 52/36 Mac Gecko < 1.9: 52/0
5 % 53/37 53 53 53 53/37 Mac Gecko < 1.9: 53/0
6 ^ 54/94 54 54 54 54/94 Mac Gecko < 1.9: 54/0
7 & 55/38 55 55 55 55/38 Mac Gecko < 1.9: 55/0
8 * 56/42 56 56 56 56/42 Mac Gecko < 1.9: 56/0
9 ( 57/40 57 57 57 57/40 Mac Gecko < 1.9: 57/0
0 ) 48/41 48 48 48 48/41 Mac Gecko < 1.9: 48/0
Symbol Keys
Key ASCII Mozilla keycodes IE keycodes Opera keycodes pseudo ASCII codes exceptions
; : 59/58 59 186 59 59/58 Mac Gecko: 186/0
= + 61/43 61 187 61 61/43 Mac Gecko 1.9: 187/107
Mac Gecko < 1.9: 187/0
, < 44/60 188 188 44 44/60 Mac Gecko: 188/0
- _ 45/95 109 189 45 45/95 Mac Gecko 1.9: 109/0
Mac Gecko < 1.9: 0
. > 46/62 190 190 46 46/62 Mac Gecko: 190/0
/ ? 47/63 191 191 47 47/63 Mac Gecko: 191/0
` ~ 96/126 192 192 96 96/126 Mac Gecko: 126/0
[ { 91/123 219 219 91 91/123
\ | 92/124 220 220 92 92/124 Mac Gecko: 92/0
] } 93/125 221 221 93 93/125
' " 39/34 222 222 39 39/34
Arrow Keys
Key ASCII Mozilla keycodes IE keycodes Opera keycodes pseudo ASCII codes exceptions
left-arrow - 37 37 37 37
up-arrow - 38 38 38 38
right-arrow - 39 39 39 39
down-arrow - 40 40 40 40
Special Keys
Key ASCII Mozilla keycodes IE keycodes Opera keycodes pseudo ASCII codes exceptions
Insert - 45 45 45 45 Konqueror: 0
Opera < 9.0: 0
Delete - 46 46 46 46 Konqueror: 127
Opera < 9.0: 0
Home - 36 36 36 36 Opera < 9.0: 0
End - 35 35 35 35 Opera < 9.0: 0
Page Up - 33 33 33 33
Page Down - 34 34 34 34
Function Keys
F1 to F12
- 112 to 123 112 to 123 112 to 123 112 to 123
Keypad Keys
If Num Lock is on, unshifted/shifted values are returned as shown below. If Num Lock is off, Linux browsers reverse the shifted/unshifted values, while Windows browsers always return the shifted value. None of my Macintoshs have a keypad, so I don't know what they do.
Key ASCII Mozilla keycodes IE keycodes Opera keycodes pseudo ASCII codes exceptions
. Del 46/- 110/46 110/46 78/46 78/46 Opera < 9.0: 78/0
0 Ins 48/- 96/45 96/45 48/45 48/45 Opera < 9.0: 48/0
1 End 49/- 97/35 97/35 49/35 49/35 Opera < 9.0: 49/0
2 down-arrow 50/- 98/40 98/40 50/40 50/40
3 Pg Dn 51/- 99/34 99/34 51/34 51/34
4 left-arrow 52/- 100/37 100/37 52/37 52/37
5 53/- 101/12 101/12 53/12 53/12 Linux Opera: 53/0
6 right-arrow 54/- 102/39 102/39 54/39 54/39
7 Home 55/- 103/36 103/36 55/36 55/36 Opera < 9.0: 55/0
8 up-arrow 56/- 104/38 104/38 56/38 56/38
9 Pg Up 57/- 105/33 105/33 57/33 57/33
+ 43 107 107 43 43
- 45 109 109 45 45
* 42 106 106 42 42
/ 47 111 111 47 47
Keypad Enter 13 13 13 13 13
Branded Keys
Key ASCII Mozilla keycodes IE keycodes Opera keycodes pseudo ASCII codes exceptions
Left Apple Command - 224 ? 17 ? Safari ≥ 3.1: 91
Right Apple Command - 224 ? 17 ? Safari ≥ 3.1: 93
Left Windows Start - 91 91 219 0 Linux Gecko: 0
Right Windows Start - 92 92 220 0 Linux Gecko: 0
Windows Menu - 93 93 0 0

[출처] http://unixpapa.com/js/key.html
저작자 표시 비영리
신고
Posted by 코멧'★

티스토리 툴바