Online Toolbox
switching mode
tool collection
put it on the desktop
inclusion application
tool search
keycode values ​​for letters and numeric keys
button key code button key code
A 65 S 83
B 66 T 84
C 67 U 85
D 68 V 86
E 69 W 87
F 70 X 88
G 71 Y 89
H 72 Z 90
I 73 0 48
J 74 1 49
K 75 2 50
L 76 3 51
M 77 4 52
N 78 5 53
O 79 6 54
P 80 7 55
Q 81 8 56
R 82 9 57
Numeric keypad Key code value of a key
button key code button key code
0 96 8 104
1 97 9 105
2 98 * 106
3 99 + 107
4 100 Enter 108
5 101 - 109
6 102 . 110
7 103 / 111
Function key The key code value
button key code button key code
F1 112 F7 118
F2 113 F8 119
F3 114 F9 120
F4 115 F10 121
F5 116 F11 122
F6 117 F12 123
Control key Key code value
button key code button key code
BackSpace 8 Esc 27
Tab 9 Spacebar 32
Clear 12 Page Up 33
Enter 13 Page Down 34
Shift 16 End 35
Control 17 Home 36
Alt 18 Left Arrow 37
Cape Lock 20 Up Arrow 38
Right Arrow 39 -_ 189
Dw Arrow 40 .> 190
Insert 45 /? 191
Delete 46 `~ 192
Num Lock 144 [{ 219
;: 186 /| 220
=+ 187 ]} 221
,< 188 '" 222
Multimedia key code value
button key code button key code
音量加 175 音量减 174
停止 179 静音 173
浏览器 172 邮件 180
搜索 170 收藏 171

Key code comparison table Introduction

About the key code:

1. A keyCode is a numeric value associated with a specific keyboard key that is provided by the browser when a keyboard event occurs.

2, when the user presses a key on the keyboard, JavaScript can access the key code through the event object to determine which key was pressed.

3. Key codes are commonly used in the following JavaScript events:

(1), keydown event: triggered when the user presses any key on the keyboard.

(2), keyup event: triggered when the user releases a key on the keyboard.

4, key code restrictions: no case, does not limit the keyboard layout, function keys do not produce key codes.

5, the key code may be abandoned in the future, and other schemes can be used to replace the key code.

Internet Business Promoter