Copyright © All rights reserved. Made by James Martin Sandbrook.
Home Camera. Character. Children. Computing. Electronics. Fitness/Martial Arts.
Garden. Health. Idioms. Jokes. Kitchen. Measuring.
Mechanics/Machines. Motivation.
Movies. Music. People. Poetry. Reviews. School Education. Skills. Stories. Tools.
Words/Accronyms. Woodwork.
I cannot remember who I got this list of keycodes off, but I thought everyone would find them very useful. Virtual-Key Codes The following table shows the symbolic constant names, hexadecimal values, and keyboard equivalents for the virtual-key codes used by the Microsoft Windows operating system. The codes are listed in numeric order. Symbolic constant name - Value (hexadecimal) - Value (decimal) - Mouse or keyboard equivalent |
VK_LBUTTON $01 |
1 Left mouse button |
VK_RBUTTON $02 |
2 Right mouse button |
VK_CANCEL $03 |
3 Control-break processing |
VK_MBUTTON $04 |
4 Middle mouse button (three-button mouse) |
$05-$07 |
Undefined |
VK_BACK |
$08 |
8 BACKSPACE key |
VK_TAB |
$09 |
9 TAB key |
$0A-$0B |
Undefined |
|
VK_CLEAR |
$0C |
12 CLEAR key |
VK_RETURN |
$0D |
13 ENTER key |
$0E-$0F |
Undefined |
|
VK_SHIFT |
$10 |
16 SHIFT key |
VK_CONTROL |
$11 |
17 CTRL key |
VK_MENU |
$12 |
18 ALT key |
VK_PAUSE |
$13 |
19 PAUSE key |
VK_CAPITAL |
$14 |
20 CAPS LOCK key |
|
$15-$19 |
Reserved for Kanji systems |
|
$1A |
26 Undefined |
VK_ESCAPE |
$1B |
27 ESC key |
|
$1C-$1F |
Reserved for Kanji systems |
VK_SPACE |
$20 |
32 SPACEBAR |
VK_PRIOR |
$21 |
33 PAGE UP key |
VK_NEXT |
$22 |
34 PAGE DOWN key |
VK_END |
$23 |
35 END key |
VK_HOME |
$24 |
36 HOME key |
VK_LEFT |
$25 |
37 LEFT ARROW key |
VK_UP |
$26 |
38 UP ARROW key |
VK_RIGHT |
$27 |
39 RIGHT ARROW key |
VK_DOWN |
$28 |
40 DOWN ARROW key |
VK_SELECT |
$29 |
41 SELECT key |
VK_PRINT |
$2A |
42 [Win32: "Original equipment manufacturer (OEM) specific"] |
VK_EXECUTE |
$2B |
43 EXECUTE key |
VK_SNAPSHOT |
$2C |
44 PRINT SCREEN key for Win 3.0 and later |
VK_INSERT |
$2D |
45 INS key |
VK_DELETE |
$2E |
46 DEL key |
VK_HELP |
$2F |
47 HELP key |
{ In Delphi 2, VK_0 thru VK_9 are |
not defined: use Ord('0') thru |
Ord('9') } |
VK_0 |
$30 |
48 0 key |
VK_1 |
$31 |
49 1 key |
VK_2 |
$32 |
50 2 key |
VK_3 |
$33 |
51 3 key |
VK_4 |
$34 |
52 4 key |
VK_5 |
$35 |
53 5 key |
VK_6 |
$36 |
54 6 key |
VK_7 |
$37 |
55 7 key |
VK_8 |
$38 |
56 8 key |
VK_9 |
$39 |
57 9 key |
|
$3A-$40 |
Undefined |
{ In Delphi 2, VK_A thru VK_Z are |
not defined: use Ord('A') thru |
Ord ('Z') } |
VK_A |
$41 |
65 A key |
VK_B |
$42 |
66 B key |
VK_C |
$43 |
67 C key |
VK_D |
$44 |
68 D key |
VK_E |
$45 |
69 E key |
VK_F |
$46 |
70 F key |
VK_G |
$47 |
71 G key |
VK_H |
$48 |
72 H key |
VK_I |
$49 |
73 I key |
VK_J |
$4A |
74 J key |
VK_K |
$4B |
75 K key |
VK_L |
$4C |
76 L key |
VK_M |
$4D |
77 M key |
VK_N |
$4E |
78 N key |
VK_O |
$4F |
79 O key |
VK_P |
$50 |
80 P key |
VK_Q |
$51 |
81 Q key |
VK_R |
$52 |
82 R key |
VK_S |
$53 |
83 S key |
VK_T |
$54 |
84 T key |
VK_U |
$55 |
85 U key |
VK_V |
$56 |
86 V key |
VK_W |
$57 |
87 W key |
VK_X |
$58 |
88 X key |
VK_Y |
$59 |
89 Y key |
VK_Z |
$5A |
90 Z key |
VK_LWIN |
$5B |
91 Left Windows key [Win32: "Undefined"] |
VK_RWIN |
$5C |
92 Right Windows key [Win32: "Undefined"] |
VK_APPS |
$5D |
93 Application key [Win32: "Undefined"] |
|
$5E-$5F |
Undefined |
VK_NUMPAD0 |
$60 |
96 Numeric keypad 0 key |
VK_NUMPAD1 |
$61 |
97 Numeric keypad 1 key |
VK_NUMPAD2 |
$62 |
98 Numeric keypad 2 key |
VK_NUMPAD3 |
$63 |
99 Numeric keypad 3 key |
VK_NUMPAD4 |
$64 |
100 Numeric keypad 4 key |
VK_NUMPAD5 |
$65 |
101 Numeric keypad 5 key |
VK_NUMPAD6 |
$66 |
102 Numeric keypad 6 key |
VK_NUMPAD7 |
$67 |
103 Numeric keypad 7 key |
VK_NUMPAD8 |
$68 |
104 Numeric keypad 8 key |
VK_NUMPAD9 |
$69 |
105 Numeric keypad 9 key |
VK_MULTIPLY |
$6A |
106 The Multiply key |
VK_ADD |
$6B |
107 Add key |
VK_SEPARATOR |
$6C |
108 Separator key |
VK_SUBTRACT |
$6D |
109 Subtract key |
VK_DECIMAL |
$6E |
110 Decimal key |
VK_DIVIDE |
$6F |
111 Divide key |
VK_F1 |
$70 |
112 F1 key |
VK_F2 |
$71 |
113 F2 key |
VK_F3 |
$72 |
114 F3 key |
VK_F4 |
$73 |
115 F4 key |
VK_F5 |
$74 |
116 F5 key |
VK_F6 |
$75 |
117 F6 key |
VK_F7 |
$76 |
118 F7 key |
VK_F8 |
$77 |
119 F8 key |
VK_F9 |
$78 |
120 F9 key |
VK_F10 |
$79 |
121 F10 key |
VK_F11 |
$7A |
122 F11 key |
VK_F12 |
$7B |
123 F12 key |
|
$88-$8F |
Unassigned |
VK_NUMLOCK |
$90 |
144 NUM LOCK key |
VK_SCROLL |
$91 |
145 SCROLL LOCK key |
|
$92-$99 |
Unassigned |
VK_LSHIFT |
$A0 |
160 Left SHIFT key [Win32: "Unassigned"] |
VK_RSHIFT |
$A1 |
161 Right SHIFT key [Win32: "Unassigned"] |
VK_LCONTROL |
$A2 |
162 Left CTRL key [Win32: "Unassigned"] |
VK_RCONTROL |
$A3 |
163 Right CTRL key [Win32: "Unassigned"] |
VK_LMENU |
$A4 |
164 Left ALT key [Win32: "Unassigned"] |
VK_RMENU |
$A5 |
165 Right ALT key [Win32: "Unassigned"] |
|
$A6-$B9 |
Unassigned |
|
$BA-$C0 |
OEM specific |
|
$C1-$DA |
Unassigned |
|
$DB-$E4 |
OEM specific |
VK_PROCESSKEY |
$E5 |
229 Precedes extended key [Win32: "Unassigned"] |
|
$E6 |
OEM specific |
|
$E7-$E8 |
Unassigned |
|
$E9-$F5 |
OEM specific |