Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
28 views3 pages

Table of Virtual Key Codes

The document provides a comprehensive table of virtual key codes for various keyboard keys, including arrow keys, letter keys, number keys, function keys, numeric keypad keys, symbol keys, modifier keys, and other keys. Each key is associated with a specific code that represents its function. It also includes important notes on the usage of these codes and their specific contexts.

Uploaded by

broxtop
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views3 pages

Table of Virtual Key Codes

The document provides a comprehensive table of virtual key codes for various keyboard keys, including arrow keys, letter keys, number keys, function keys, numeric keypad keys, symbol keys, modifier keys, and other keys. Each key is associated with a specific code that represents its function. It also includes important notes on the usage of these codes and their specific contexts.

Uploaded by

broxtop
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Table of Virtual Key Codes

Arrow Keys:

Code Represents
VK_DOWN Down
VK_LEFT Left
VK_RIGHT Right
VK_UP Up

Letter Keys:

Code Represents Code Represents Code Represents Code Represents


VK_A A VK_H H VK_O O VK_V V
VK_B B VK_I I VK_P P VK_W W
VK_C C VK_J J VK_Q Q VK_X X
VK_D D VK_K K VK_R R VK_Y Y
VK_E E VK_L L VK_S S VK_Z Z
VK_F F VK_M M VK_T T
VK_G G VK_N N VK_U U

Number Keys:

Code Represents Code Represents


VK_0 0 VK_5 5
VK_1 1 VK_6 6
VK_2 2 VK_7 7
VK_3 3 VK_8 8
VK_4 4 VK_9 9

Note: ONLY use these codes for the number keys located above the letter keys!

Function Keys:

Code Represents Code Represents


VK_F1 F1 VK_F7 F7
VK_F2 F2 VK_F8 F8
VK_F3 F3 VK_F9 F9
VK_F4 F4 VK_F10 F10
VK_F5 F5 VK_F11 F11
VK_F6 F6 VK_F12 F12

Note: I don't recommend making F10 do anything special, in your programs.


Keys on the Numeric Keypad:

Code Represents Code Represents Code Represents


VK_ADD Numpad + VK_NUMPAD0 Numpad 0 VK_NUMPAD5 Numpad 5
VK_SUBTRACT Numpad - VK_NUMPAD1 Numpad 1 VK_NUMPAD6 Numpad 6
VK_MULTIPLY Numpad * VK_NUMPAD2 Numpad 2 VK_NUMPAD7 Numpad 7
VK_DIVIDE Numpad / VK_NUMPAD3 Numpad 3 VK_NUMPAD8 Numpad 8
VK_DECIMAL Numpad . VK_NUMPAD4 Numpad 4 VK_NUMPAD9 Numpad 9

Notes: ONLY use these codes for the keys on the numeric keypad! Also, the decimal point and numeric
keys of the keypad only work when Num Lock is on.

Symbol Keys:

Code Represents Code Represents


VK_BACK_QUOTE ` VK_OPEN_BRACKET [
VK_BACK_SLASH \ VK_PERIOD .
VK_CLOSE_BRACKET ] VK_QUOTE '
VK_COMMA , VK_SEMICOLON ;
VK_EQUALS = VK_SLASH /
VK_MINUS -

Note: ONLY use these codes for the symbol keys located around the letter keys! Don't use them for
anything on the numeric keypad, regardless of whether Num Lock is on or off!

Modifier Keys:

Code Represents Code Represents


VK_ALT Alt VK_NUM_LOCK Num Lock
VK_CAPS_LOCK Caps Lock VK_SCROLL_LOCK Scroll Lock

VK_CONTEXT_MENU  VK_SHIFT Shift

VK_CONTROL Ctrl VK_WINDOWS 

Notes: I don't recommend making Alt or  do anything special, in your programs. If your keyboard
has more than one Alt key, VK_ALT is the code for ANY of its Alt keys. If your keyboard has more
than one Ctrl key, VK_CONTROL is the code for ANY of its Ctrl keys. If your keyboard has more than
one Shift key, VK_SHIFT is the code for ANY of its Shift keys.
Other Keys:

Code Represents Code Represents


VK_BACK_SPACE Backspace VK_INSERT Ins
VK_DELETE Del VK_PAGE_DOWN PgDn
VK_END End VK_PAGE_UP PgUp
VK_ENTER Enter VK_PAUSE Pause
VK_ESCAPE Esc VK_SPACE Space
VK_HOME Home

Notes: VK_ENTER is the code for BOTH the Enter key near the letter keys AND the Enter key on the
numeric keypad (regardless of whether Num Lock is on or off). If your keyboard has a numeric
keypad, you probably have TWO of each of the following keys: Del, End, Home, Ins, PgDn, PgUp. Of
those keys, the ones on the numeric keypad only work when Num Lock is off. However, the ones NOT
on the numeric keypad work, regardless of whether Num Lock is on or off.

You might also like