| Constant | Value (Hex) | Value (Dec) | Description |
|---|---|---|---|
| VK_LBUTTON | 0x01 | 1 | Left mouse button |
| VK_RBUTTON | 0x02 | 2 | Right mouse button |
| VK_CANCEL | 0x03 | 3 | Control-break processing |
| VK_MBUTTON | 0x04 | 4 | Middle mouse button |
| VK_XBUTTON1 | 0x05 | 5 | X1 mouse button (Windows 2000+) |
| VK_XBUTTON2 | 0x06 | 6 | X2 mouse button (Windows 2000+) |
| — | 0x07 | 7 | Undefined |
| VK_BACK | 0x08 | 8 | Backspace key |
| VK_TAB | 0x09 | 9 | Tab key |
| — | 0x0A–0x0B | 10–11 | Reserved |
| VK_CLEAR | 0x0C | 12 | Clear key |
| VK_RETURN | 0x0D | 13 | Enter key |
| — | 0x0E–0x0F | 14–15 | Undefined |
| VK_SHIFT | 0x10 | 16 | Shift key |
| VK_CONTROL | 0x11 | 17 | Ctrl key |
| VK_MENU | 0x12 | 18 | Alt key |
| VK_PAUSE | 0x13 | 19 | Pause key |
| VK_CAPITAL | 0x14 | 20 | Caps Lock key |
| VK_KANA / VK_HANGUL | 0x15 | 21 | IME Kana / Hangul mode (VK_HANGUEL is a compatibility alias) |
| — | 0x16 | 22 | Undefined |
| VK_JUNJA | 0x17 | 23 | IME Junja mode |
| VK_FINAL | 0x18 | 24 | IME final mode |
| VK_HANJA / VK_KANJI | 0x19 | 25 | IME Hanja / Kanji mode |
| — | 0x1A | 26 | Undefined |
| VK_ESCAPE | 0x1B | 27 | Esc key |
| VK_CONVERT | 0x1C | 28 | IME convert |
| VK_NONCONVERT | 0x1D | 29 | IME nonconvert |
| VK_ACCEPT | 0x1E | 30 | IME accept |
| VK_MODECHANGE | 0x1F | 31 | IME mode change request |
| VK_SPACE | 0x20 | 32 | Spacebar |
| VK_PRIOR | 0x21 | 33 | Page Up key |
| VK_NEXT | 0x22 | 34 | Page Down key |
| VK_END | 0x23 | 35 | End key |
| VK_HOME | 0x24 | 36 | Home key |
| VK_LEFT | 0x25 | 37 | Left arrow key |
| VK_UP | 0x26 | 38 | Up arrow key |
| VK_RIGHT | 0x27 | 39 | Right arrow key |
| VK_DOWN | 0x28 | 40 | Down arrow key |
| VK_SELECT | 0x29 | 41 | Select key |
| VK_PRINT | 0x2A | 42 | Print key |
| VK_EXECUTE | 0x2B | 43 | Execute key |
| VK_SNAPSHOT | 0x2C | 44 | Print Screen key |
| VK_INSERT | 0x2D | 45 | Insert key |
| VK_DELETE | 0x2E | 46 | Delete key |
| VK_HELP | 0x2F | 47 | Help key |
| — | 0x30–0x39 | 48–57 | 0–9 keys (no VK_ constant; use ASCII value) |
| — | 0x3A–0x40 | 58–64 | Undefined |
| — | 0x41–0x5A | 65–90 | A–Z keys (no VK_ constant; use ASCII value) |
| VK_LWIN | 0x5B | 91 | Left Windows key |
| VK_RWIN | 0x5C | 92 | Right Windows key |
| VK_APPS | 0x5D | 93 | Applications key |
| — | 0x5E | 94 | Reserved |
| VK_SLEEP | 0x5F | 95 | Sleep key |
| VK_NUMPAD0 | 0x60 | 96 | Numpad 0 |
| VK_NUMPAD1 | 0x61 | 97 | Numpad 1 |
| VK_NUMPAD2 | 0x62 | 98 | Numpad 2 |
| VK_NUMPAD3 | 0x63 | 99 | Numpad 3 |
| VK_NUMPAD4 | 0x64 | 100 | Numpad 4 |
| VK_NUMPAD5 | 0x65 | 101 | Numpad 5 |
| VK_NUMPAD6 | 0x66 | 102 | Numpad 6 |
| VK_NUMPAD7 | 0x67 | 103 | Numpad 7 |
| VK_NUMPAD8 | 0x68 | 104 | Numpad 8 |
| VK_NUMPAD9 | 0x69 | 105 | Numpad 9 |
| VK_MULTIPLY | 0x6A | 106 | Multiply key (*) |
| VK_ADD | 0x6B | 107 | Add key (+) |
| VK_SEPARATOR | 0x6C | 108 | Separator key |
| VK_SUBTRACT | 0x6D | 109 | Subtract key (−) |
| VK_DECIMAL | 0x6E | 110 | Decimal key (.) |
| VK_DIVIDE | 0x6F | 111 | Divide key (/) |
| VK_F1 | 0x70 | 112 | F1 key |
| VK_F2 | 0x71 | 113 | F2 key |
| VK_F3 | 0x72 | 114 | F3 key |
| VK_F4 | 0x73 | 115 | F4 key |
| VK_F5 | 0x74 | 116 | F5 key |
| VK_F6 | 0x75 | 117 | F6 key |
| VK_F7 | 0x76 | 118 | F7 key |
| VK_F8 | 0x77 | 119 | F8 key |
| VK_F9 | 0x78 | 120 | F9 key |
| VK_F10 | 0x79 | 121 | F10 key |
| VK_F11 | 0x7A | 122 | F11 key |
| VK_F12 | 0x7B | 123 | F12 key |
| VK_F13 | 0x7C | 124 | F13 key |
| VK_F14 | 0x7D | 125 | F14 key |
| VK_F15 | 0x7E | 126 | F15 key |
| VK_F16 | 0x7F | 127 | F16 key |
| VK_F17 | 0x80 | 128 | F17 key |
| VK_F18 | 0x81 | 129 | F18 key |
| VK_F19 | 0x82 | 130 | F19 key |
| VK_F20 | 0x83 | 131 | F20 key |
| VK_F21 | 0x84 | 132 | F21 key |
| VK_F22 | 0x85 | 133 | F22 key |
| VK_F23 | 0x86 | 134 | F23 key |
| VK_F24 | 0x87 | 135 | F24 key |
| — | 0x88–0x8F | 136–143 | Unassigned |
| VK_NUMLOCK | 0x90 | 144 | Num Lock key |
| VK_SCROLL | 0x91 | 145 | Scroll Lock key |
| VK_OEM_NEC_EQUAL | 0x92 | 146 | = key on numpad, NEC PC-9800 (Windows 95+) |
| VK_OEM_FJ_JISHO | 0x93 | 147 | Dictionary key, Fujitsu/OASYS (Windows 95+) |
| VK_OEM_FJ_MASSHOU | 0x94 | 148 | Unregister word key, Fujitsu/OASYS (Windows 95+) |
| VK_OEM_FJ_TOUROKU | 0x95 | 149 | Register word key, Fujitsu/OASYS (Windows 95+) |
| VK_OEM_FJ_LOYA | 0x96 | 150 | Left OYAYUBI key, Fujitsu/OASYS (Windows 95+) |
| VK_OEM_FJ_ROYA | 0x97 | 151 | Right OYAYUBI key, Fujitsu/OASYS (Windows 95+) |
| — | 0x98–0x9F | 152–159 | Unassigned |
| VK_LSHIFT | 0xA0 | 160 | Left Shift key (Windows 2000+) |
| VK_RSHIFT | 0xA1 | 161 | Right Shift key (Windows 2000+) |
| VK_LCONTROL | 0xA2 | 162 | Left Ctrl key (Windows 2000+) |
| VK_RCONTROL | 0xA3 | 163 | Right Ctrl key (Windows 2000+) |
| VK_LMENU | 0xA4 | 164 | Left Alt key (Windows 2000+) |
| VK_RMENU | 0xA5 | 165 | Right Alt key (Windows 2000+) |
| VK_BROWSER_BACK | 0xA6 | 166 | Browser Back key (Windows 2000+) |
| VK_BROWSER_FORWARD | 0xA7 | 167 | Browser Forward key (Windows 2000+) |
| VK_BROWSER_REFRESH | 0xA8 | 168 | Browser Refresh key (Windows 2000+) |
| VK_BROWSER_STOP | 0xA9 | 169 | Browser Stop key (Windows 2000+) |
| VK_BROWSER_SEARCH | 0xAA | 170 | Browser Search key (Windows 2000+) |
| VK_BROWSER_FAVORITES | 0xAB | 171 | Browser Favorites key (Windows 2000+) |
| VK_BROWSER_HOME | 0xAC | 172 | Browser Start and Home key (Windows 2000+) |
| VK_VOLUME_MUTE | 0xAD | 173 | Volume Mute key (Windows 2000+) |
| VK_VOLUME_DOWN | 0xAE | 174 | Volume Down key (Windows 2000+) |
| VK_VOLUME_UP | 0xAF | 175 | Volume Up key (Windows 2000+) |
| VK_MEDIA_NEXT_TRACK | 0xB0 | 176 | Next Track key (Windows 2000+) |
| VK_MEDIA_PREV_TRACK | 0xB1 | 177 | Previous Track key (Windows 2000+) |
| VK_MEDIA_STOP | 0xB2 | 178 | Stop Media key (Windows 2000+) |
| VK_MEDIA_PLAY_PAUSE | 0xB3 | 179 | Play/Pause Media key (Windows 2000+) |
| VK_LAUNCH_MAIL | 0xB4 | 180 | Start Mail key (Windows 2000+) |
| VK_LAUNCH_MEDIA_SELECT | 0xB5 | 181 | Select Media key (Windows 2000+) |
| VK_LAUNCH_APP1 | 0xB6 | 182 | Start Application 1 key (Windows 2000+) |
| VK_LAUNCH_APP2 | 0xB7 | 183 | Start Application 2 key (Windows 2000+) |
| — | 0xB8–0xB9 | 184–185 | Reserved |
| VK_OEM_1 | 0xBA | 186 | ; key (US) — varies by layout (Windows 2000+) |
| VK_OEM_PLUS | 0xBB | 187 | + key (US) — varies by layout (Windows 2000+) |
| VK_OEM_COMMA | 0xBC | 188 | , key (US) — varies by layout (Windows 2000+) |
| VK_OEM_MINUS | 0xBD | 189 | - key (US) — varies by layout (Windows 2000+) |
| VK_OEM_PERIOD | 0xBE | 190 | . key (US) — varies by layout (Windows 2000+) |
| VK_OEM_2 | 0xBF | 191 | / key (US) — varies by layout (Windows 2000+) |
| VK_OEM_3 | 0xC0 | 192 | ` key (US) — varies by layout (Windows 2000+) |
| — | 0xC1–0xDA | 193–218 | Unassigned |
| VK_OEM_4 | 0xDB | 219 | [ key (US) — varies by layout (Windows 2000+) |
| VK_OEM_5 | 0xDC | 220 | \ key (US) — varies by layout (Windows 2000+) |
| VK_OEM_6 | 0xDD | 221 | ] key (US) — varies by layout (Windows 2000+) |
| VK_OEM_7 | 0xDE | 222 | ' key (US) — varies by layout (Windows 2000+) |
| VK_OEM_8 | 0xDF | 223 | Miscellaneous — varies by keyboard |
| — | 0xE0 | 224 | Reserved |
| VK_OEM_AX | 0xE1 | 225 | AX key, Japanese AX keyboard (Windows 95+) |
| VK_OEM_102 | 0xE2 | 226 | <> or | key, RT 102-key keyboard (Windows 95+) |
| VK_ICO_HELP | 0xE3 | 227 | ICO help key (Windows 95+) |
| VK_ICO_00 | 0xE4 | 228 | ICO 00 key (Windows 95+) |
| VK_PROCESSKEY | 0xE5 | 229 | Process key (Windows NT 4.0+) |
| VK_ICO_CLEAR | 0xE6 | 230 | ICO clear key (Windows 95+) |
| VK_PACKET | 0xE7 | 231 | Pass Unicode characters as keystrokes (Windows 2000+) |
| — | 0xE8–0xF5 | 232–245 | Unassigned |
| VK_OEM_RESET | 0xF6 | 246 | Attn key (Windows 95+) |
| VK_OEM_JUMP | 0xF7 | 247 | Fin key (Windows 95+) |
| VK_OEM_PA1 | 0xF8 | 248 | PA1 key (Windows 95+) |
| VK_OEM_PA2 | 0xF9 | 249 | PA2 key (Windows 95+) |
| VK_OEM_PA3 | 0xFA | 250 | PA3 key (Windows 95+) |
| VK_OEM_WSCTRL | 0xFB | 251 | WSCTRL key (Windows 95+) |
| VK_OEM_CUSEL | 0xFC | 252 | CUSEL key (Windows 95+) |
| VK_OEM_ATTN | 0xFD | 253 | ATTN key (Windows 95+) |
| VK_OEM_FINISH | 0xFE | 254 | FINISH key (Windows 95+) |
| VK_OEM_COPY | 0xFF | 255 | COPY key (Windows 95+) |
| VK_ATTN | 0x100 | 256 | Attn key |
| VK_CRSEL | 0x101 | 257 | CrSel key |
| VK_EXSEL | 0x102 | 258 | ExSel key |
| VK_EREOF | 0x103 | 259 | Erase EOF key |
| VK_PLAY | 0x104 | 260 | Play key |
| VK_ZOOM | 0x105 | 261 | Zoom key |
| VK_NONAME | 0x106 | 262 | Reserved for future use |
| VK_PA1 | 0x107 | 263 | PA1 key |
| VK_OEM_CLEAR | 0x108 | 264 | Clear key |
Documentation
Virtual Keys
Docs menu
Was this page helpful?
Ready to feel every mile?