Virtual-Key Codes
The following table shows the symbolic constant names, hexadecimal values, and keyboard equivalents for the virtual-key codes used by the Microsoft Windows CE operating system. The codes are listed in numeric order. You can combine any of the codes with a modifier key to create a hot key.
Virtual key codes
Symbolic constant
Hexadecimal value
Mouse or keyboard equivalentVK_LBUTTON
01
Left mouse buttonVK_RBUTTON
02
Right mouse buttonVK_CANCEL
03
Control-break processingVK_MBUTTON
04
Middle mouse button on a three-button mouse0507
UndefinedVK_BACK
08
BACKSPACE keyVK_TAB
09
TAB key0A0B
UndefinedVK_CLEAR
0C
CLEAR keyVK_RETURN
0D
ENTER key0E0F
UndefinedVK_SHIFT
10
SHIFT keyVK_CONTROL
11
CTRL keyVK_MENU
12
ALT keyVK_PAUSE
13
PAUSE keyVK_CAPITAL
14
CAPS LOCK key1519
Reserved for Kanji systems1A
UndefinedVK_ESCAPE
1B
ESC key1C1F
Reserved for Kanji systemsVK_SPACE
20
SPACEBARVK_PRIOR
21
PAGE UP keyVK_NEXT
22
PAGE DOWN keyVK_END
23
END keyVK_HOME
24
HOME keyVK_LEFT
25
LEFT ARROW keyVK_UP
26
UP ARROW keyVK_RIGHT
27
RIGHT ARROW keyVK_DOWN
28
DOWN ARROW keyVK_SELECT
29
SELECT key2A
Specific to original equipment manufacturerVK_EXECUTE
2B
EXECUTE keyVK_SNAPSHOT
2C
PRINT SCREEN keyVK_INSERT
2D
INS keyVK_DELETE
2E
DEL keyVK_HELP
2F
HELP key3A40
UndefinedVK_LWIN
5B
Left Windows key on a Microsoft Natural KeyboardVK_RWIN
5C
Right Windows key on a Microsoft Natural KeyboardVK_APPS
5D
Applications key on a Microsoft Natural Keyboard5E5F
UndefinedVK_NUMPAD0
60
Numeric keypad 0 keyVK_NUMPAD1
61
Numeric keypad 1 keyVK_NUMPAD2
62
Numeric keypad 2 keyVK_NUMPAD3
63
Numeric keypad 3 keyVK_NUMPAD4
64
Numeric keypad 4 keyVK_NUMPAD5
65
Numeric keypad 5 keyVK_NUMPAD6
66
Numeric keypad 6 keyVK_NUMPAD7
67
Numeric keypad 7 keyVK_NUMPAD8
68
Numeric keypad 8 keyVK_NUMPAD9
69
Numeric keypad 9 keyVK_MULTIPLY
6A
Multiply keyVK_ADD
6B
Add keyVK_SEPARATOR
6C
Separator keyVK_SUBTRACT
6D
Subtract keyVK_DECIMAL
6E
Decimal keyVK_DIVIDE
6F
Divide keyVK_F1
70
F1 keyVK_F2
71
F2 keyVK_F3
72
F3 keyVK_F4
73
F4 keyVK_F5
74
F5 keyVK_F6
75
F6 keyVK_F7
76
F7 keyVK_F8
77
F8 keyVK_F9
78
F9 keyVK_F10
79
F10 keyVK_F11
7A
F11 keyVK_F12
7B
F12 keyVK_F13
7C
F13 keyVK_F14
7D
F14 keyVK_F15
7E
F15 keyVK_F16
7F
F16 keyVK_F17
80H
F17 keyVK_F18
81H
F18 keyVK_F19
82H
F19 keyVK_F20
83H
F20 keyVK_F21
84H
F21 keyVK_F22
85H
F22 key(PPC only) Key used to lock device.
VK_F23
86H
F23 keyVK_F24
87H
F24 key888F
UnassignedVK_NUMLOCK
90
NUM LOCK keyVK_SCROLL
91
SCROLL LOCK keyVK_LSHIFT
0xA0
Left SHIFTVK_RSHIFT
0xA1
Right SHIFTVK_LCONTROL
0xA2
Left CTRLVK_RCONTROL
0xA3
Right CTRLVK_LMENU
0xA4
Left ALTVK_RMENU
0xA5
Right ALTBA-C0
Specific to original equipment manufacturer; reserved. See following tables.C1-DA
UnassignedDB-E2
Specific to original equipment manufacturer; reserved. See following tables.E3 – E4
Specific to original equipment manufacturerE5
UnassignedE6
Specific to original equipment manufacturerVK_PACKET
E7
Used to pass Unicode characters as if they were keystrokes. If VK_PACKET is used with SendInput, then the Unicode character to be delivered should be placed into the lower 16 bits of the scan code. If a keyboard message is removed from the message queue and the virtual key is VK_PACKET, then the Unicode character will be the upper 16 bits of the lparam.E8
UnassignedE9-F5
Specific to original equipment manufacturerVK_ATTN
F6
ATTN keyVK_CRSEL
F7
CRSEL keyVK_EXSEL
F8
EXSEL keyVK_EREOF
F9
Erase EOF keyVK_PLAY
FA
PLAY keyVK_ZOOM
FB
ZOOM keyVK_NONAME
FC
Reserved for future useVK_PA1
FD
PA1 keyVK_OEM_CLEAR
FE
CLEAR keyVK_KEYLOCK
F22
Key used to lock deviceOriginal equipment manufacturers should make special note of the VK key ranges reserved for specific original equipment manufacturer use: 2A, DBE4, E6, and E9F5.
In addition to the VK key assignments in the previous table, Microsoft has assigned the following specific original equipment manufacturer VK keys.
Symbolic constant
Hexadecimal value
Mouse or keyboard equivalentVK_OEM_SCROLL
0x91
NoneVK_OEM_1
0xBA
";:" for USVK_OEM_PLUS
0xBB
"+" any country/regionVK_OEM_COMMA
0xBC
"," any country/regionVK_OEM_MINUS
0xBD
"-" any country/regionVK_OEM_PERIOD
0xBE
"." any country/regionVK_OEM_2
0xBF
"/?" for USVK_OEM_3
0xC0
"`~" for USVK_OEM_4
0xDB
"[{" for USVK_OEM_5
0xDC
"\|" for USVK_OEM_6
0xDD
"]}" for USVK_OEM_7
0xDE
"'"" for USVK_OEM_8
0xDF
NoneVK_OEM_AX
0xE1
AX key on Japanese AX keyboardVK_OEM_102
0xE2
"<>" or "\|" on RT 102-key keyboardFor East Asian Input Method Editors (IMEs) the following additional virtual keyboard definitions must be observed.
Symbolic constant
Hexadecimal value
DescriptionVK_DBE_ALPHANUMERIC
0x0f0
Changes the mode to alphanumeric.VK_DBE_KATAKANA
0x0f1
Changes the mode to Katakana.VK_DBE_HIRAGANA
0x0f2
Changes the mode to Hiragana.VK_DBE_SBCSCHAR
0x0f3
Changes the mode to single-byte characters.VK_DBE_DBCSCHAR
0x0f4
Changes the mode to double-byte characters.VK_DBE_ROMAN
0x0f5
Changes the mode to Roman characters.VK_DBE_NOROMAN
0x0f6
Changes the mode to non-Roman characters.VK_DBE_ENTERWORDREGISTERMODE
0x0f7
Activates the word registration dialog box.VK_DBE_ENTERIMECONFIGMODE
0x0f8
Activates a dialog box for setting up an IME environment.VK_DBE_FLUSHSTRING
0x0f9
Deletes the undetermined string without determining it.VK_DBE_CODEINPUT
0x0fa
Changes the mode to code input.VK_DBE_NOCODEINPUT
0x0fb
Changes the mode to no-code input.Original equipment manufacturers should not use the unassigned portions of the VK mapping tables. Microsoft will assign these values in the future. If manufacturers require additional VK mappings, they should reuse some of the current manufacturer-specific and vendor-specific assignments.
See Also
Using Virtual-Key Codes | Manufacturer-specific Virtual-Key Codes
'개발이야기' 카테고리의 다른 글
블랙잭에서 SD를 내문서로 사용하기 (0) | 2007.08.30 |
---|---|
Popular Reg Tweaks - SPV-Developers Forums (0) | 2007.08.30 |
Windows Mobile Registry Tweaks and Hacks - htc (0) | 2007.08.30 |
Opera 8.60 for PPC 관련 팁 (0) | 2007.08.28 |
Accessing the Internet by E-mail FAQ (3) | 2007.08.18 |
Download details: Windows Mobile Developer Power Toys (0) | 2007.08.18 |