Constant Name | Hexadecimal Value | Decimal Value | Corresponding Button |
VK_LBUTTON | 1 | 1 | Left mouse button |
VK_RBUTTON | 2 | 2 | Right mouse button |
VK_CANCEL | 3 | 3 | Ctrl+Break (usually no need to handle) |
VK_MBUTTON | 4 | 4 | Middle mouse button (three-button mouse) |
VK_BACK | 8 | 8 | Backspace key |
VK_TAB | 9 | 9 | Tab key |
VK_CLEAR | C | 12 | Clear key (5 on the numeric keypad when Num Lock is off) |
VK_RETURN | D | 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 key |
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 | 4 | 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 (screenshot) |
VK_INSERT | 2D | 45 | Ins key ( on the numeric keypad when Num Lock is off) |
VK_DELETE | 2E | 46 | Del key (. on the numeric keypad when Num Lock is off) |
VK_HELP | 2F | 47 | Help key |
VK_ | 30 | 48 | 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 |
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 | 7 | 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_NUMPAD | 60 | 96 | Numeric keypad 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 on numeric keypad |
VK_ADD | 6B | 107 | Add key on numeric keypad |
VK_SEPARATOR | 6C | 108 | Separator key |
VK_SUBTRACT | 6D | 109 | Subtract key on numeric keypad |
VK_DECIMAL | 6E | 110 | Decimal key on numeric keypad |
VK_DIVIDE | 6F | 111 | Divide key on numeric keypad |
VK_F1 | 7 | 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_NUMLOCK | 9 | 144 | Num Lock key |
VK_SCROLL | 91 | 145 | Scroll Lock key |
Not mentioned above: (All on the main keyboard) |
VK_LWIN | | 91 | Left Windows key |
VK_RWIN | | 92 | Right Windows key |
VK_APPS | | 93 | Application key (next to the right Ctrl key) |
| | 186 | Semicolon key |
| | 187 | Equals key |
| | 188 | Comma key |
| | 189 | Minus key |
| | 190 | Period key |
| | 191 | Slash key |
| | 192 | Grave accent key |
| | 219 | Open bracket key |
| | 220 | Backslash key |
| | 221 | Close bracket key |
| | 222 | Single quote key |