Keyboard and Mouse Button Value Comparison Table

This table summarizes the common keyboard and mouse button corresponding button names, decimal, hexadecimal representation and button functions. It is convenient for users to query. Provided for friends who need it.


Constant NameHexadecimal ValueDecimal ValueCorresponding Button
VK_LBUTTON11Left mouse button
VK_RBUTTON22Right mouse button
VK_CANCEL33Ctrl+Break (usually no need to handle)
VK_MBUTTON44Middle mouse button (three-button mouse)
VK_BACK88Backspace key
VK_TAB99Tab key
VK_CLEARC12Clear key (5 on the numeric keypad when Num Lock is off)
VK_RETURND13Enter key
VK_SHIFT1016Shift key
VK_CONTROL1117Ctrl key
VK_MENU1218Alt key
VK_PAUSE1319Pause key
VK_CAPITAL1420Caps Lock key
VK_ESCAPE1B27Esc key
VK_SPACE2032Spacebar key
VK_PRIOR2133Page Up key
VK_NEXT2234Page Down key
VK_END2335End key
VK_HOME2436Home key
VK_LEFT2537Left Arrow key (←)
VK_UP2638Up Arrow key (↑)
VK_RIGHT2739Right Arrow key (→)
VK_DOWN284Down Arrow key (↓)
VK_SELECT2941Select key
VK_PRINT2A42Print key
VK_EXECUTE2B43Execute key
VK_SNAPSHOT2C44Print Screen key (screenshot)
VK_INSERT2D45Ins key ( on the numeric keypad when Num Lock is off)
VK_DELETE2E46Del key (. on the numeric keypad when Num Lock is off)
VK_HELP2F47Help key
VK_3048 key
VK_131491 key
VK_232502 key
VK_333513 key
VK_434524 key
VK_535535 key
VK_636546 key
VK_737557 key
VK_838568 key
VK_939579 key
VK_A4165A key
VK_B4266B key
VK_C4367C key
VK_D4468D key
VK_E4569E key
VK_F467F key
VK_G4771G key
VK_H4872H key
VK_I4973I key
VK_J4A74J key
VK_K4B75K key
VK_L4C76L key
VK_M4D77M key
VK_N4E78N key
VK_O4F79O key
VK_P5080P key
VK_Q5181Q key
VK_R5282R key
VK_S5383S key
VK_T5484T key
VK_U5585U key
VK_V5686V key
VK_W5787W key
VK_X5888X key
VK_Y5989Y key
VK_Z5A90Z key
VK_NUMPAD6096Numeric keypad key
VK_NUMPAD16197Numeric keypad 1 key
VK_NUMPAD26298Numeric keypad 2 key
VK_NUMPAD36399Numeric keypad 3 key
VK_NUMPAD464100Numeric keypad 4 key
VK_NUMPAD565101Numeric keypad 5 key
VK_NUMPAD666102Numeric keypad 6 key
VK_NUMPAD767103Numeric keypad 7 key
VK_NUMPAD868104Numeric keypad 8 key
VK_NUMPAD969105Numeric keypad 9 key
VK_MULTIPLY6A106Multiply key on numeric keypad
VK_ADD6B107Add key on numeric keypad
VK_SEPARATOR6C108Separator key
VK_SUBTRACT6D109Subtract key on numeric keypad
VK_DECIMAL6E110Decimal key on numeric keypad
VK_DIVIDE6F111Divide key on numeric keypad
VK_F17112F1 key
VK_F271113F2 key
VK_F372114F3 key
VK_F473115F4 key
VK_F574116F5 key
VK_F675117F6 key
VK_F776118F7 key
VK_F877119F8 key
VK_F978120F9 key
VK_F1079121F10 key
VK_F117A122F11 key
VK_F127B123F12 key
VK_NUMLOCK9144Num Lock key
VK_SCROLL91145Scroll Lock key
Not mentioned above: (All on the main keyboard)
VK_LWIN91Left Windows key
VK_RWIN92Right Windows key
VK_APPS93Application key (next to the right Ctrl key)
186Semicolon key
187Equals key
188Comma key
189Minus key
190Period key
191Slash key
192Grave accent key
219Open bracket key
220Backslash key
221Close bracket key
222Single quote key

For your convenience in checking the key code values of keyboard keys in real-time, here is an additional online KeyCode key code detection tool