В следующей таблице приведены имена констант (VK Codes), десятичные и шестнадцатеричные значения для кодов виртуальных клавиш, используемых в системах Windows.
Название клавиши | DEC | HEX | Константа |
---|---|---|---|
Left Button | 1 | 0x01 | VK_LBUTTON |
Right Button | 2 | 0x02 | VK_RBUTTON |
Middle Button | 4 | 0x04 | VK_MBUTTON |
X Button 1 | 5 | 0x05 | VK_XBUTTON1 |
X Button 2 | 6 | 0x06 | VK_XBUTTON2 |
Esc | 27 | 0x1B | VK_ESCAPE |
← Backspace | 8 | 0x08 | VK_BACK |
Tab ↹ | 9 | 0x09 | VK_TAB |
↵ Enter | 13 | 0x0D | VK_RETURN |
⇧ Shift | 16 | 0x10 | VK_SHIFT |
⇧ Shift левый | 160 | 0xA0 | VK_LSHIFT |
⇧ Shift правый | 161 | 0xA1 | VK_RSHIFT |
Ctrl | 17 | 0x11 | VK_CONTROL |
Ctrl левый | 162 | 0xA2 | VK_LCONTROL |
Ctrl правый | 163 | 0xA3 | VK_RCONTROL |
Alt | 18 | 0x12 | VK_MENU |
Alt левый | 164 | 0xA4 | VK_LMENU |
Alt правый | 165 | 0xA5 | VK_RMENU |
⊞ Win левый | 91 | 0x5B | VK_LWIN |
⊞ Win правый | 92 | 0x5C | VK_RWIN |
Caps Lock | 20 | 0x14 | VK_CAPITAL |
Num Lock | 144 | 0x90 | VK_NUMLOCK |
Scrol Lock | 145 | 0x91 | VK_SCROLL |
Pause/Break | 19 | 0x13 | VK_PAUSE |
Ctrl + Pause/Break | 3 | 0x03 | VK_CANCEL |
End | 35 | 0x23 | VK_END |
Home | 36 | 0x24 | VK_HOME |
Пробел | 32 | 0x20 | VK_SPACE |
Page Up | 33 | 0x21 | VK_PRIOR |
Page Down | 34 | 0x22 | VK_NEXT |
Clear | 12 | 0x0C | VK_CLEAR |
← | 37 | 0x25 | VK_LEFT |
↑ | 38 | 0x26 | VK_UP |
→ | 39 | 0x27 | VK_RIGHT |
↓ | 40 | 0x28 | VK_DOWN |
Select | 41 | 0x29 | VK_SELECT |
42 | 0x2A | VK_PRINT | |
Execute | 43 | 0x2B | VK_EXECUTE |
Print Screen | 44 | 0x2C | VK_SNAPSHOT |
Insert | 45 | 0x2D | VK_INSERT |
Delete | 46 | 0x2E | VK_DELETE |
Help | 47 | 0x2F | VK_HELP |
0 | 48 | 0x30 | VK_0 |
1 | 49 | 0x31 | VK_1 |
2 | 50 | 0x32 | VK_2 |
3 | 51 | 0x33 | VK_3 |
4 | 52 | 0x34 | VK_4 |
5 | 53 | 0x35 | VK_5 |
6 | 54 | 0x36 | VK_6 |
7 | 55 | 0x37 | VK_7 |
8 | 56 | 0x38 | VK_8 |
9 | 57 | 0x39 | VK_9 |
A | 65 | 0x41 | VK_A |
B | 66 | 0x42 | VK_B |
C | 67 | 0x43 | VK_C |
D | 68 | 0x44 | VK_D |
E | 69 | 0x45 | VK_E |
F | 70 | 0x46 | VK_F |
G | 71 | 0x47 | VK_G |
H | 72 | 0x48 | VK_H |
I | 73 | 0x49 | VK_I |
J | 74 | 0x4A | VK_J |
K | 75 | 0x4B | VK_K |
L | 76 | 0x4C | VK_L |
M | 77 | 0x4D | VK_M |
N | 78 | 0x4E | VK_N |
O | 79 | 0x4F | VK_O |
P | 80 | 0x50 | VK_P |
Q | 81 | 0x51 | VK_Q |
R | 82 | 0x52 | VK_R |
S | 83 | 0x53 | VK_S |
T | 83 | 0x54 | VK_T |
U | 85 | 0x55 | VK_U |
V | 86 | 0x56 | VK_V |
W | 87 | 0x57 | VK_W |
X | 88 | 0x58 | VK_X |
Y | 89 | 0x59 | VK_Y |
Z | 90 | 0x5A | VK_Z |
Context Menu | 93 | 0x5D | VK_APPS |
Sleep | 95 | 0x5F | VK_SLEEP |
Numpad 0 | 96 | 0x60 | VK_NUMPAD0 |
Numpad 1 | 97 | 0x61 | VK_NUMPAD1 |
Numpad 2 | 98 | 0x62 | VK_NUMPAD2 |
Numpad 3 | 99 | 0x63 | VK_NUMPAD3 |
Numpad 4 | 100 | 0x64 | VK_NUMPAD4 |
Numpad 5 | 101 | 0x65 | VK_NUMPAD5 |
Numpad 6 | 102 | 0x66 | VK_NUMPAD6 |
Numpad 7 | 103 | 0x67 | VK_NUMPAD7 |
Numpad 8 | 104 | 0x68 | VK_NUMPAD8 |
Numpad 9 | 105 | 0x69 | VK_NUMPAD9 |
Numpad * | 106 | 0x6A | VK_MULTIPLY |
Numpad + | 107 | 0x6B | VK_ADD |
Separator | 108 | 0x6C | VK_SEPARATOR |
Numpad - | 109 | 0x6D | VK_SUBTRACT |
Numpad . (Del) | 110 | 0x6E | VK_DECIMAL |
Numpad / | 111 | 0x6F | VK_DIVIDE |
Numpad Enter | 13 | 0x0D | VK_RETURN |
F1 | 112 | 0x70 | VK_F1 |
F2 | 113 | 0x71 | VK_F2 |
F3 | 114 | 0x72 | VK_F3 |
F4 | 115 | 0x73 | VK_F4 |
F5 | 116 | 0x74 | VK_F5 |
F6 | 117 | 0x75 | VK_F6 |
F7 | 118 | 0x76 | VK_F7 |
F8 | 119 | 0x77 | VK_F8 |
F9 | 120 | 0x78 | VK_F9 |
F10 | 121 | 0x79 | VK_F10 |
F11 | 122 | 0x7A | VK_F11 |
F12 | 123 | 0x7B | VK_F12 |
F13 | 124 | 0x7C | VK_F13 |
F14 | 125 | 0x7D | VK_F14 |
F15 | 126 | 0x7E | VK_F15 |
F16 | 127 | 0x7F | VK_F16 |
F17 | 128 | 0x80 | VK_F17 |
F18 | 129 | 0x81 | VK_F18 |
F19 | 130 | 0x82 | VK_F19 |
F20 | 131 | 0x83 | VK_F20 |
F21 | 132 | 0x84 | VK_F21 |
F22 | 133 | 0x85 | VK_F22 |
F23 | 134 | 0x86 | VK_F23 |
F24 | 135 | 0x87 | VK_F24 |
Browser Back | 166 | 0xA6 | VK_BROWSER_BACK |
Browser Forward | 167 | 0xA7 | VK_BROWSER_FORWARD |
Browser Refresh | 168 | 0xA8 | VK_BROWSER_REFRESH |
Browser Stop | 169 | 0xA9 | VK_BROWSER_STOP |
Browser Search | 170 | 0xAA | VK_BROWSER_SEARCH |
Browser Favorites | 171 | 0xAB | VK_BROWSER_FAVORITES |
Browser Home | 172 | 0xAC | VK_BROWSER_HOME |
Volume Mute | 173 | 0xAD | VK_VOLUME_MUTE |
Volume Down | 174 | 0xAE | VK_VOLUME_DOWN |
Volume Up | 175 | 0xAF | VK_VOLUME_UP |
Next Track | 176 | 0xB0 | VK_MEDIA_NEXT_TRACK |
Previous Track | 177 | 0xB1 | VK_MEDIA_PREV_TRACK |
Stop | 178 | 0xB2 | VK_MEDIA_STOP |
Play / Pause | 179 | 0xB3 | VK_MEDIA_PLAY_PAUSE |
180 | 0xB4 | VK_LAUNCH_MAIL | |
Media | 181 | 0xB5 | VK_LAUNCH_MEDIA_SELECT |
Проводник | 182 | 0xB6 | VK_LAUNCH_APP1 |
Калькулятор | 183 | 0xB7 | VK_LAUNCH_APP2 |
; : | 186 | 0xBA | VK_OEM_1 |
= + | 187 | 0xBB | VK_OEM_PLUS |
, < | 188 | 0xBC | VK_OEM_COMMA |
- _ | 189 | 0xBD | VK_OEM_MINUS |
. > | 190 | 0xBE | VK_OEM_PERIOD |
/ ? | 191 | 0xBF | VK_OEM_2 |
~ | 192 | 0xC0 | VK_OEM_3 |
Abnt C1 | 193 | 0xC1 | – |
Abnt C2 | 193 | 0xC2 | – |
] } | 219 | 0xDB | VK_OEM_4 |
| | 229 | 0xDC | VK_OEM_5 |
] } | 221 | 0xDD | VK_OEM_6 |
' " | 222 | 0xDE | VK_OEM_7 |
Разные знаки, может изменяться клавиатурой | 223 | 0xDF | VK_OEM_8 |
Ax | 225 | 0xE1 | – |
> < | 226 | 0xE2 | VK_OEM_102 |
IcoHlp | 227 | 0xE3 | – |
Process | 229 | 0xE5 | VK_PROCESSKEY |
IcoClr | 230 | 0xE6 | – |
Packet | 231 | 0xE7 | VK_PACKET |
Reset | 233 | 0xE9 | – |
Jump | 234 | 0xEA | – |
OemPa1 | 235 | 0xEB | – |
OemPa2 | 236 | 0xEC | – |
OemPa3 | 237 | 0xED | – |
WsCtrl | 238 | 0xEE | – |
Cu Sel | 239 | 0xEF | – |
Oem Attn | 240 | 0xF0 | – |
Finish | 241 | 0xF1 | – |
Copy | 242 | 0xF2 | – |
Auto | 243 | 0xF3 | – |
Enlw | 244 | 0xF4 | – |
Back Tab | 245 | 0xF5 | – |
Attn | 246 | 0xF6 | VK_ATTN |
Cr Sel | 247 | 0xF7 | VK_CRSEL |
Ex Sel | 248 | 0xF8 | VK_EXSEL |
Er Eof | 249 | 0xF9 | VK_EREOF |
Play | 250 | 0xFA | VK_PLAY |
Zoom | 251 | 0xFB | VK_ZOOM |
Зарезервировано | 252 | 0xFC | VK_NONAME |
Pa1 | 253 | 0xFD | VK_PA1 |
OemClr | 254 | 0xFE | VK_OEM_CLEAR |
Kana | 21 | 0x15 | VK_KANA, VK_HANGUEL, VK_HANGUL |
IME On | 22 | 0x16 | VK_IME_ON |
Junja | 23 | 0x17 | VK_JUNJA |
Final | 24 | 0x18 | VK_FINAL |
Kanji | 25 | 0x19 | VK_KANJI, VK_HANJA |
IME Off | 26 | 0x1A | VK_IME_OFF |
Jisho | 146 | 0x92 | – |
Mashu | 147 | 0x93 | – |
Touroku | 148 | 0x94 | – |
Loya | 149 | 0x95 | – |
Roya | 150 | 0x96 | – |
Convert | 28 | 0x1C | VK_CONVERT |
Non Convert | 29 | 0x1D | VK_NONCONVERT |
Accept | 30 | 0x1E | VK_ACCEPT |
Mode Change | 31 | 0x1F | VK_MODECHANGE |