Asger-P Software logo

Virtual Key-Codes Used in Windows Programming

Symbolic constant name Hex Value Dec Value Keyboard (or mouse) 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)
VK_BACK 08 8 BACKSPACE key
VK_TAB 09 9 TAB key
VK_CLEAR 0C 12 CLEAR key
VK_RETURN 0D 13 ENTER key
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
VK_ESCAPE 1B 27 ESC key
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 PRINT key
VK_EXECUTE 2B 43 EXECUTE key
VK_SNAPSHOT 2C 44 PRINT SCREEN key
VK_INSERT 2D 45 INS key
VK_DELETE 2E 46 DEL key
VK_HELP 2F 47 HELP key
VK_0 - VK_9 30 - 39 48 - 57 0 - 9 key, not defined use ASCII '0' - '9' or (0x30 - 0x39)
VK_A - VK_Z 41 - 5A 65 - 90 A - Z key, not defined use ASCII 'A' - 'Z' or (0x41 - 0x5A)
VK_LWIN 5B 91 Left Windows key (Natural keyboard)
VK_RWIN 5C 92 Right Windows key (Natural keyboard)
VK_APPS 5D 93 Applications key (Natural keyboard)
VK_SLEEP 5F 95 Computer Sleep key
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 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 ( . or , according to locale)
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
VK_F13 7C 124 F13 key
VK_F14 7D 125 F14 key
VK_F15 7E 126 F15 key
VK_F16 7F 127 F16 key
VK_F17 80 128 F17 key
VK_F18 81 129 F18 key
VK_F19 82 130 F19 key
VK_F20 83 131 F20 key
VK_F21 84 132 F21 key
VK_F22 85 133 F22 key
VK_F23 86 134 F23 key
VK_F24 87 135 F24 key
VK_NUMLOCK 90 144 NUM LOCK key
VK_SCROLL 91 145 SCROLL LOCK key
VK_LSHIFT A0 160 Left SHIFT key
VK_RSHIFT A1 161 Right SHIFT key
VK_LCONTROL A2 162 Left CONTROL key
VK_RCONTROL A3 163 Right CONTROL key
VK_LMENU A4 164 Left MENU key
VK_RMENU A5 165 Right MENU key
VK_BROWSER_BACK A6 166 Browser Back key
VK_BROWSER_FORWARD A7 167 Browser Forward key
VK_BROWSER_REFRESH A8 168 Browser Refresh key
VK_BROWSER_STOP A9 169 Browser Stop key
VK_BROWSER_SEARCH AA 170 Browser Search key
VK_BROWSER_FAVORITES AB 171 Browser Favorites key
VK_BROWSER_HOME AC 172 Browser Start and Home key
VK_VOLUME_MUTE AD 173 Volume Mute key
VK_VOLUME_DOWN AE 174 Volume Down key
VK_VOLUME_UP AF 175 Volume Up key
VK_MEDIA_NEXT_TRACK B0 176 Next Track key
VK_MEDIA_PREV_TRACK B1 177 Previous Track key
VK_MEDIA_STOP B2 178 Stop Media key
VK_MEDIA_PLAY_PAUSE B3 179 Play/Pause Media key
VK_LAUNCH_MAIL B4 180 Start Mail key
VK_LAUNCH_MEDIA_SELECT B5 181 Select Media key
VK_LAUNCH_APP1 B6 182 Start Application 1 key
VK_LAUNCH_APP2 B7 183 Start Application 2 key
VK_OEM_1 BA 186 Used for miscellaneous characters
VK_OEM_PLUS BB 187 For any country/region, the ( + ) key
VK_OEM_COMMA BC 188 For any country/region, the ( , ) key
VK_OEM_MINUS BD 189 For any country/region, the ( - ) key
VK_OEM_PERIOD BE 190 For any country/region, the ( . ) key
VK_OEM_2 BF 191 Used for miscellaneous characters;
VK_OEM_3 C0 192 Used for miscellaneous characters;
VK_OEM_4 DB 219 Used for miscellaneous characters;
VK_OEM_5 DC 220 Used for miscellaneous characters;
VK_OEM_6 DD 221 Used for miscellaneous characters;
VK_OEM_7 DE 222 Used for miscellaneous characters;
VK_OEM_8 DF 223 Used for miscellaneous characters;
VK_OEM_102 E2 226 Angle bracket key or the backslash key
VK_PROCESSKEY E5 229 IME PROCESS key
VK_PACKET E7 231 Used to pass Unicode characters as keystrokes
VK_ATTN F6 246 Attn key
VK_CRSEL F7 247 CrSel key
VK_EXSEL F8 248 ExSel key
VK_EREOF F9 249 Erase EOF key
VK_PLAY FA 250 Play key
VK_ZOOM FB 251 Zoom key
VK_PA1 FD 253 PA1 key
VK_OEM_CLEAR FE 254 Clear key


                    


Last Updated: Jun-28-2022   © Copyright 2003-2022 Asger-P