The ASC code corresponding to the press event on the keyboard is not easy to remember. Now write it down as a backup
A-Z: 65-90
ESC key vk_escape (27)
Enter the key: vk_return (13)
Tab key: vk_tab (9)
Caps Lock key: vk_capital (20)
Shift key: vk_shift ($10/16)
CTRL: vk_control (17)
Alt key: vk_menu (18)
Space key: vk_space ($20/32)
Backspace key: vk_back (8)
Left logo key: vk_lwin (91)
Right logo key: vk_lwin (92)
Right-click the shortcut key: vk_apps (93)
Insert key: vk_insert (45)
Home Key: vk_home (36)
Page up: vk_prior (33)
Pagedown: vk_next (34)
End key: vk_end (35)
Delete key: vk_delete (46)
Direction key (Direction): vk_left (37)
Direction key (Direction): vk_up (38)
Direction key (→): vk_right (39)
Direction key (Direction): vk_down (40)
F1 key: vk_f1 (112)
F2 key: vk_f2 (113)
F3 key: vk_f3 (114)
F4 key: vk_f4 (115)
F5 key: vk_f5 (116)
F6 key: vk_f6 (117)
F7 key: vk_f7 (118)
F8: vk_f8 (119)
F9 key: vk_f9 (120)
F10 key: vk_f10 (121)
F11 key: vk_f11 (122)
F12 key: vk_f12 (123)
Num Lock key: vk_numlock (144)
Keypad 0: vk_numpad0 (96)
Keypad 1: vk_numpad0 (97)
Keypad 2: vk_numpad0 (98)
Keypad 3: vk_numpad0 (99)
Keypad 4: vk_numpad0 (100)
Keypad 5: vk_numpad0 (101)
Keypad 6: vk_numpad0 (102)
Keypad 7: vk_numpad0 (103)
Keypad 8: vk_numpad0 (104)
Keypad 9: vk_numpad0 (105)
Keypad.: vk_decimal (110)
Keypad *: vk_multiply (106)
Keypad +: vk_multiply (107)
Keypad-: vk_subtract (109)
Keypad/: vk_divide (111)
Pause Break Key: vk_pause (19)
Scroll Lock key: vk_scroll (145)
ASCII code |
Keyboard |
ASCII code |
Keyboard |
ASCII code |
Keyboard |
ASCII code |
Keyboard |
27 |
ESC |
32 |
Space |
33 |
! |
34 |
" |
35 |
# |
36 |
$ |
37 |
% |
38 |
& |
39 |
' |
40 |
( |
41 |
) |
42 |
* |
43 |
+ |
44 |
' |
45 |
- |
46 |
. |
47 |
/ |
48 |
0 |
49 |
1 |
50 |
2 |
51 |
3 |
52 |
4 |
53 |
5 |
54 |
6 |
55 |
7 |
56 |
8 |
57 |
9 |
58 |
: |
59 |
; |
60 |
< |
61 |
= |
62 |
> |
63 |
? |
64 |
@ |
65 |
A |
66 |
B |
67 |
C |
68 |
D |
69 |
E |
70 |
F |
71 |
G |
72 |
H |
73 |
I |
74 |
J |
75 |
K |
76 |
L |
77 |
M |
78 |
N |
79 |
O |
80 |
P |
81 |
Q |
82 |
R |
83 |
S |
84 |
T |
85 |
U |
86 |
V |
87 |
W |
88 |
X |
89 |
Y |
90 |
Z |
91 |
[ |
92 |
\ |
93 |
] |
94 |
^ |
95 |
_ |
96 |
` |
97 |
A |
98 |
B |
99 |
C |
100 |
D |
101 |
E |
102 |
F |
103 |
G |
104 |
H |
105 |
I |
106 |
J |
107 |
K |
108 |
L |
109 |
M |
110 |
N |
111 |
O |
112 |
P |
113 |
Q |
114 |
R |
115 |
S |
116 |
T |
117 |
U |
118 |
V |
119 |
W |
120 |
X |
121 |
Y |
122 |
Z |
123 |
{ |
124 |
| |
125 |
} |
126 |
~ |