Explore the full list of Windows Keyboard Virtual-Key Codes with their symbolic constant names, decimal values, and key equivalents. Find key mappings for function keys, arrow keys, media controls, and more.
Table of Contents
Windows uses Virtual-Key Codes to identify keyboard and mouse inputs. These codes are essential for developers working with keyboard events, input handling, and automation. Below is a complete list of Virtual-Key Codes, their decimal values, and their corresponding keys.
Virtual-Key Codes with Decimal Value
Here is a list of Keyboard Virtual-Key Codes with their symbolic constant names, decimal values, and equivalent mouse or keyboard actions:
Symbolic constant name
Value (decimal)
Mouse or keyboard equivalent
VK_LBUTTON
1
Left mouse button
VK_RBUTTON
2
Right mouse button
VK_CANCEL
3
Control-break processing
VK_MBUTTON
4
Middle mouse button (three-button mouse)
VK_XBUTTON1
5
Windows 2000: X1 mouse button
VK_XBUTTON2
6
Windows 2000: X2 mouse button
—
7
Undefined
VK_BACK
8
BACKSPACE key
VK_TAB
9
TAB key
—
10–11
Reserved
VK_CLEAR
12
CLEAR key
VK_RETURN
13
ENTER key
—
14–15
Undefined
VK_SHIFT
16
SHIFT key
VK_CONTROL
17
CTRL key
VK_MENU
18
ALT key
VK_PAUSE
19
PAUSE key
VK_CAPITAL
20
CAPS LOCK key
VK_KANA
21
IME Kana mode
VK_HANGUEL
21
IME Hanguel mode (maintained for compatibility; use VK_HANGUL)
VK_HANGUL
21
IME Hangul mode
—
22
Undefined
VK_JUNJA
23
IME Junja mode
VK_FINAL
24
IME final mode
VK_HANJA
25
IME Hanja mode
VK_KANJI
25
IME Kanji mode
—
26
Undefined
VK_ESCAPE
27
ESC key
VK_CONVERT
28
IME convert
VK_NONCONVERT
29
IME nonconvert
VK_ACCEPT
30
IME accept
VK_MODECHANGE
31
IME mode change request
VK_SPACE
32
SPACEBAR
VK_PRIOR
33
PAGE UP key
VK_NEXT
34
PAGE DOWN key
VK_END
35
END key
VK_HOME
36
HOME key
VK_LEFT
37
LEFT ARROW key
VK_UP
38
UP ARROW key
VK_RIGHT
39
RIGHT ARROW key
VK_DOWN
40
DOWN ARROW key
VK_SELECT
41
SELECT key
VK_PRINT
42
PRINT key
VK_EXECUTE
43
EXECUTE key
VK_SNAPSHOT
44
PRINT SCREEN key
VK_INSERT
45
INS key
VK_DELETE
46
DEL key
VK_HELP
47
HELP key
48
0 key
49
1 key
50
2 key
51
3 key
52
4 key
53
5 key
54
6 key
55
7 key
56
8 key
57
9 key
—
58–64
Undefined
65
A key
66
B key
67
C key
68
D key
69
E key
70
F key
71
G key
72
H key
73
I key
74
J key
75
K key
76
L key
77
M key
78
N key
79
O key
80
P key
81
Q key
82
R key
83
S key
84
T key
85
U key
86
V key
87
W key
88
X key
89
Y key
90
Z key
VK_LWIN
91
Left Windows key (Microsoft® Natural® keyboard)
VK_RWIN
92
Right Windows key (Natural keyboard)
VK_APPS
93
Applications key (Natural keyboard)
—
94
Reserved
VK_SLEEP
95
Computer Sleep key
VK_NUMPAD0
96
Numeric keypad 0 key
VK_NUMPAD1
97
Numeric keypad 1 key
VK_NUMPAD2
98
Numeric keypad 2 key
VK_NUMPAD3
99
Numeric keypad 3 key
VK_NUMPAD4
100
Numeric keypad 4 key
VK_NUMPAD5
101
Numeric keypad 5 key
VK_NUMPAD6
102
Numeric keypad 6 key
VK_NUMPAD7
103
Numeric keypad 7 key
VK_NUMPAD8
104
Numeric keypad 8 key
VK_NUMPAD9
105
Numeric keypad 9 key
VK_MULTIPLY
106
Multiply key
VK_ADD
107
Add key
VK_SEPARATOR
108
Separator key
VK_SUBTRACT
109
Subtract key
VK_DECIMAL
110
Decimal key
VK_DIVIDE
111
Divide key
VK_F1
112
F1 key
VK_F2
113
F2 key
VK_F3
114
F3 key
VK_F4
115
F4 key
VK_F5
116
F5 key
VK_F6
117
F6 key
VK_F7
118
F7 key
VK_F8
119
F8 key
VK_F9
120
F9 key
VK_F10
121
F10 key
VK_F11
122
F11 key
VK_F12
123
F12 key
VK_F13
124
F13 key
VK_F14
125
F14 key
VK_F15
126
F15 key
VK_F16
127
F16 key
VK_F17
128H
F17 key
VK_F18
129H
F18 key
VK_F19
130H
F19 key
VK_F20
131H
F20 key
VK_F21
132H
F21 key
VK_F22
133H
F22 key
VK_F23
134H
F23 key
VK_F24
135H
F24 key
—
136–143
Unassigned
VK_NUMLOCK
144
NUM LOCK key
VK_SCROLL
145
SCROLL LOCK key
146–150
OEM specific
—
151–159
Unassigned
VK_LSHIFT
160
Left SHIFT key
VK_RSHIFT
161
Right SHIFT key
VK_LCONTROL
162
Left CONTROL key
VK_RCONTROL
163
Right CONTROL key
VK_LMENU
164
Left MENU key
VK_RMENU
165
Right MENU key
VK_BROWSER_BACK
166
Windows 2000: Browser Back key
VK_BROWSER_FORWARD
167
Windows 2000: Browser Forward key
VK_BROWSER_REFRESH
168
Windows 2000: Browser Refresh key
VK_BROWSER_STOP
169
Windows 2000: Browser Stop key
VK_BROWSER_SEARCH
170
Windows 2000: Browser Search key
VK_BROWSER_FAVORITES
171
Windows 2000: Browser Favorites key
VK_BROWSER_HOME
172
Windows 2000: Browser Start and Home key
VK_VOLUME_MUTE
173
Windows 2000: Volume Mute key
VK_VOLUME_DOWN
174
Windows 2000: Volume Down key
VK_VOLUME_UP
175
Windows 2000: Volume Up key
VK_MEDIA_NEXT_TRACK
176
Windows 2000: Next Track key
VK_MEDIA_PREV_TRACK
177
Windows 2000: Previous Track key
VK_MEDIA_STOP
178
Windows 2000: Stop Media key
VK_MEDIA_PLAY_PAUSE
179
Windows 2000: Play/Pause Media key
VK_LAUNCH_MAIL
180
Windows 2000: Start Mail key
VK_LAUNCH_MEDIA_SELECT
181
Windows 2000: Select Media key
VK_LAUNCH_APP1
182
Windows 2000: Start Application 1 key
VK_LAUNCH_APP2
183
Windows 2000: Start Application 2 key
—
184-185
Reserved
VK_OEM_1
186
Windows 2000: For the US standard keyboard, the ‘;:’ key
VK_OEM_PLUS
187
Windows 2000: For any country/region, the ‘+’ key
VK_OEM_COMMA
188
Windows 2000: For any country/region, the ‘,’ key
VK_OEM_MINUS
189
Windows 2000: For any country/region, the ‘-‘ key
VK_OEM_PERIOD
190
Windows 2000: For any country/region, the ‘.’ key
VK_OEM_2
191
Windows 2000: For the US standard keyboard, the ‘/?’ key
VK_OEM_3
192
Windows 2000: For the US standard keyboard, the ‘`~’ key
—
193–215
Reserved
—
216–218
Unassigned
VK_OEM_4
219
Windows 2000: For the US standard keyboard, the ‘[{‘ key
VK_OEM_5
220
Windows 2000: For the US standard keyboard, the ‘\|’ key
VK_OEM_6
221
Windows 2000: For the US standard keyboard, the ‘]}’ key
VK_OEM_7
222
Windows 2000: For the US standard keyboard, the ‘single-quote/double-quote’ key
VK_OEM_8
223
—
224
Reserved
225
OEM specific
VK_OEM_102
226
Windows 2000: Either the angle bracket key or the backslash key on the RT 102-key keyboard
227–228
OEM specific
VK_PROCESSKEY
229
Windows 95/98, Windows NT 4.0, Windows 2000: IME PROCESS key
230
OEM specific
VK_PACKET
231
Windows 2000: Used to pass Unicode characters as if they were keystrokes. The VK_PACKET key is the low word of a 32-bit Virtual Key value used for non-keyboard input methods. For more information, see Remark in KEYBDINPUT, SendInput, WM_KEYDOWN, and WM_KEYUP
—
232
Unassigned
233–245
OEM specific
VK_ATTN
246
Attn key
VK_CRSEL
247
CrSel key
VK_EXSEL
248
ExSel key
VK_EREOF
249
Erase EOF key
VK_PLAY
250
Play key
VK_ZOOM
251
Zoom key
VK_NONAME
252
Reserved for future use
VK_PA1
253
PA1 key
VK_OEM_CLEAR
254
Clear key
Complete List of Keyboard Virtual-Key Codes with Decimal Values
Virtual-Key Codes with Hex Value
Virtual-Key (VK) codes are constants used in Windows programming to represent keyboard keys in various APIs like GetAsyncKeyState(), GetKeyState(), and WM_KEYDOWN. These codes allow applications to detect key presses in a standardized way.
Here is a complete list of Virtual-Key (VK) codes used in Windows programming:
Mouse Buttons
Key Name
VK Code
Hex Value
Left Mouse Button
VK_LBUTTON
0x01
Right Mouse Button
VK_RBUTTON
0x02
Control-break Processing
VK_CANCEL
0x03
Middle Mouse Button
VK_MBUTTON
0x04
X1 Mouse Button
VK_XBUTTON1
0x05
X2 Mouse Button
VK_XBUTTON2
0x06
Keyboard Keys
Key Name
VK Code
Hex Value
Backspace
VK_BACK
0x08
Tab
VK_TAB
0x09
Clear
VK_CLEAR
0x0C
Enter/Return
VK_RETURN
0x0D
Shift
VK_SHIFT
0x10
Control (Ctrl)
VK_CONTROL
0x11
Alt (Menu)
VK_MENU
0x12
Pause
VK_PAUSE
0x13
Caps Lock
VK_CAPITAL
0x14
IME Kana Mode
VK_KANA
0x15
IME Hangul Mode
VK_HANGUL
0x15
IME Junja Mode
VK_JUNJA
0x17
IME Final Mode
VK_FINAL
0x18
IME Hanja Mode
VK_HANJA
0x19
IME Kanji Mode
VK_KANJI
0x19
Escape
VK_ESCAPE
0x1B
IME Convert
VK_CONVERT
0x1C
IME NonConvert
VK_NONCONVERT
0x1D
IME Accept
VK_ACCEPT
0x1E
IME Mode Change Request
VK_MODECHANGE
0x1F
Spacebar
VK_SPACE
0x20
Page Up
VK_PRIOR
0x21
Page Down
VK_NEXT
0x22
End
VK_END
0x23
Home
VK_HOME
0x24
Left Arrow
VK_LEFT
0x25
Up Arrow
VK_UP
0x26
Right Arrow
VK_RIGHT
0x27
Down Arrow
VK_DOWN
0x28
Select
VK_SELECT
0x29
Print
VK_PRINT
0x2A
Execute
VK_EXECUTE
0x2B
Print Screen
VK_SNAPSHOT
0x2C
Insert
VK_INSERT
0x2D
Delete
VK_DELETE
0x2E
Help
VK_HELP
0x2F
Number and Letter Keys
Key Name
VK Code
Hex Value
0-9 Keys
VK_0 – VK_9
0x30 – 0x39
A-Z Keys
VK_A – VK_Z
0x41 – 0x5A
Windows and Application Keys
Key Name
VK Code
Hex Value
Left Windows Key
VK_LWIN
0x5B
Right Windows Key
VK_RWIN
0x5C
Applications Key
VK_APPS
0x5D
Sleep Key
VK_SLEEP
0x5F
Numeric Keypad (Numpad) Keys
Key Name
VK Code
Hex Value
Numpad 0
VK_NUMPAD0
0x60
Numpad 1
VK_NUMPAD1
0x61
Numpad 2
VK_NUMPAD2
0x62
Numpad 3
VK_NUMPAD3
0x63
Numpad 4
VK_NUMPAD4
0x64
Numpad 5
VK_NUMPAD5
0x65
Numpad 6
VK_NUMPAD6
0x66
Numpad 7
VK_NUMPAD7
0x67
Numpad 8
VK_NUMPAD8
0x68
Numpad 9
VK_NUMPAD9
0x69
Multiply (*)
VK_MULTIPLY
0x6A
Add (+)
VK_ADD
0x6B
Separator
VK_SEPARATOR
0x6C
Subtract (-)
VK_SUBTRACT
0x6D
Decimal (.)
VK_DECIMAL
0x6E
Divide (/)
VK_DIVIDE
0x6F
Function Keys (F1-F24)
Key Name
VK Code
Hex Value
F1 – F12
VK_F1 – VK_F12
0x70 – 0x7B
F13 – F24
VK_F13 – VK_F24
0x7C – 0x87
Lock Keys
Key Name
VK Code
Hex Value
Num Lock
VK_NUMLOCK
0x90
Scroll Lock
VK_SCROLL
0x91
Media Control and Special Keys
Key Name
VK Code
Hex Value
Left Shift
VK_LSHIFT
0xA0
Right Shift
VK_RSHIFT
0xA1
Left Ctrl
VK_LCONTROL
0xA2
Right Ctrl
VK_RCONTROL
0xA3
Left Alt
VK_LMENU
0xA4
Right Alt
VK_RMENU
0xA5
Browser Back
VK_BROWSER_BACK
0xA6
Browser Forward
VK_BROWSER_FORWARD
0xA7
Browser Refresh
VK_BROWSER_REFRESH
0xA8
Browser Stop
VK_BROWSER_STOP
0xA9
Browser Search
VK_BROWSER_SEARCH
0xAA
Browser Favorites
VK_BROWSER_FAVORITES
0xAB
Browser Home
VK_BROWSER_HOME
0xAC
Volume Mute
VK_VOLUME_MUTE
0xAD
Volume Down
VK_VOLUME_DOWN
0xAE
Volume Up
VK_VOLUME_UP
0xAF
Media Next Track
VK_MEDIA_NEXT_TRACK
0xB0
Media Previous Track
VK_MEDIA_PREV_TRACK
0xB1
Media Stop
VK_MEDIA_STOP
0xB2
Media Play/Pause
VK_MEDIA_PLAY_PAUSE
0xB3
OEM Keys (Special Characters)
Key Name
VK Code
Hex Value
OEM 1 (;)
VK_OEM_1
0xBA
OEM Plus (+)
VK_OEM_PLUS
0xBB
OEM Comma (,)
VK_OEM_COMMA
0xBC
OEM Minus (-)
VK_OEM_MINUS
0xBD
OEM Period (.)
VK_OEM_PERIOD
0xBE
OEM 2 (/)
VK_OEM_2
0xBF
OEM 3 (`~)
VK_OEM_3
0xC0
OEM 4 ([)
VK_OEM_4
0xDB
OEM 5 (|)
VK_OEM_5
0xDC
OEM 6 (])
VK_OEM_6
0xDD
OEM 7 (‘’/”)
VK_OEM_7
0xDE
This is the full list of Virtual-Key codes used in Windows.
Conclusion
Virtual-Key Codes are essential for Windows applications that handle keyboard inputs. Whether you’re a developer working with key events or a gamer setting up key bindings, understanding these codes can improve efficiency and functionality.