Keycode对照表
字母和数字键的键码值(keyCode) |
|||||||
按键 |
键码 |
按键 |
键码 |
按键 |
键码 |
按键 |
键码 |
A |
65 |
J |
74 |
S |
83 |
1 |
49 |
B |
66 |
K |
75 |
T |
84 |
2 |
50 |
C |
67 |
L |
76 |
U |
85 |
3 |
51 |
D |
68 |
M |
77 |
V |
86 |
4 |
52 |
E |
69 |
N |
78 |
W |
87 |
5 |
53 |
F |
70 |
O |
79 |
X |
88 |
6 |
54 |
G |
71 |
P |
80 |
Y |
89 |
7 |
55 |
H |
72 |
Q |
81 |
Z |
90 |
8 |
56 |
I |
73 |
R |
82 |
0 |
48 |
9 |
57 |
|
|||||||
数字键盘上的键的键码值 |
功能键键码值(keyCode) |
||||||
按键 |
键码 |
按键 |
键码 |
按键 |
键码 |
按键 |
键码 |
0 |
96 |
8 |
104 |
F1 |
112 |
F7 |
118 |
1 |
97 |
9 |
105 |
F2 |
113 |
F8 |
119 |
2 |
98 |
* |
106 |
F3 |
114 |
F9 |
120 |
3 |
99 |
+ |
107 |
F4 |
115 |
F10 |
121 |
4 |
100 |
Enter |
108 |
F5 |
116 |
F11 |
122 |
5 |
101 |
- |
109 |
F6 |
117 |
F12 |
123 |
6 |
102 |
. |
110 |
|
|||
7 |
103 |
/ |
111 |
||||
控制键键码值(keyCode) |
|||||||
按键 |
键码 |
按键 |
键码 |
按键 |
键码 |
按键 |
键码 |
Back Spac |
8 |
Esc |
27 |
Right Arrow |
39 |
-_ |
189 |
Tab |
9 |
Spaceb ar |
32 |
DwArrow |
40 |
.> |
190 |
Clear |
12 |
PageUp |
33 |
Insert |
45 |
/? |
191 |
Enter |
13 |
Page Down |
34 |
Delete |
46 |
`~ |
192 |
Shift |
16 |
End |
35 |
Num Lock |
144 |
[{ |
219 |
Contr ol |
17 |
Home |
36 |
;: |
186 |
\| |
220 |
Alt |
18 |
LeftArrow |
37 |
=+ |
187 |
]} |
221 |
Cape Lock |
20 |
Up Arrow |
38 |
,< |
188 |
'" |
222 |
多媒体键码值(keyCode) |
|||||||
按键 |
键码 |
按键 |
键码 |
按键 |
键码 |
按键 |
键码 |
音量 |
175 |
音量减 |
174 |
停止 |
179 |
静音 |
173 |
浏览 |
172 |
邮件 |
180 |
搜索 |
170 |
收藏 |
171 |
A至Z键与A–Z字母的ASCII码相 |
||
vbKey A |
65 |
A键 |
vbKey P |
80 |
P键 |
vbKey |
90 |
Z键 |
0至9键与数字0–9的ASCII码相 |
||
vbKey |
48 |
0键 |
vbKey |
57 |
9键 |
可在代码中的任何地方用下列常数代替实际值: |
|||
常数 |
值 |
十进制值 |
描述 |
vbKeyLButton |
0x1 |
1 |
鼠标左键 |
vbKeyRButton |
0x2 |
2 |
鼠标右键 |
vbKeyCancel |
0x3 |
3 |
CANCEL键 |
vbKeyMButton |
0x4 |
|
鼠标中键 |
vbKeyBack |
0x8 |
8 |
BACK SPACE键 |
vbKeyTab |
0x9 |
9 |
TAB键 |
vbKeyClear |
0xC |
12 |
CLEAR键 |
vbKeyReturn |
0xD |
13 |
ENTER键 |
vbKeyShift |
0x10 |
16 |
SHIFT键 |
vbKeyControl |
0x11 |
17 |
CTRL键 |
vbKeyMenu |
0x12 |
18 |
MENU键 |
vbKeyPause |
0x13 |
19 |
PAUSE键 |
vbKeyCapital |
0x14 |
20 |
CAPS LOCK键 |
vbKeyEscape |
0x1B |
27 |
ESC键 |
vbKeySpace |
0x20 |
32 |
SPACE BAR键 |
vbKeyPageUp |
0x21 |
33 |
PAGE UP键 |
vbKeyPageDo wn |
0x22 |
34 |
PAGE DOWN键 |
vbKeyEnd |
0x23 |
35 |
END键 |
vbKeyHome |
0x24 |
36 |
HOME键 |
vbKeyLeft |
0x25 |
37 |
LEFT ARROW键 |
vbKeyUp |
0x26 |
38 |
UP ARROW键 |
vbKeyRight |
0x27 |
39 |
RIGHT ARROW |
vbKeyDown |
0x28 |
40 |
DOWN ARROW |
vbKeySelect |
0x29 |
41 |
SELECT键 |
vbKeyPrint |
0x2A |
42 |
PRINT SCREEN 键 |
vbKeyExecute |
0x2B |
43 |
EXECUTE键 |
vbKeySnapsho t |
0x2C |
44 |
SNAPSHOT键 |
vbKeyInsert |
0x2D |
45 |
INSERT键 |
vbKeyDelete |
0x2E |
46 |
DELETE键 |
vbKeyHelp |
0x2F |
47 |
HELP键 |
vbKeyNumlock |
0x90 |
144 |
NUM LOCK键 |
|
下列常数代表数字键盘上键: |
|
||
常数 |
值 |
十进制 |
描述 |
|
vbKeyNumpad |
0x60 |
96 |
0键 |
|
vbKeyNumpad |
0x69 |
105 |
9键 |
|
vbKeyMultiply |
0x6A |
106 |
MULTIPLICATIO N SIGN(*)键 |
|
vbKeyAdd |
0x6B |
107 |
PLUS SIGN(+) |
|
vbKeySeparat |
0x6C |
108 |
ENTER键 |
|
vbKeySubtract |
0x6D |
109 |
MINUS SIGN(–) |
|
vbKeyDecimal |
0x6E |
110 |
DECIMAL POINT(.)键 |
|
vbKeyDivide |
0x6F |
111 |
DIVISION SIGN(/)键 |
|
|
下列常数代表功能键: |
|
||
常数 |
值 |
十进制 |
描述 |
|
vbKeyF1 |
0x70 |
112 |
F1键 |
|
vbKeyF11 |
0x7A |
122 |
F11键 |
|
vbKeyF16 |
0x7F |
127 |
F16键 |
ASCLL码对照表