Key codes on Windows Mobile Field PCs
17 Mar 2009
Below is a listing of the key codes generated by the hardware keys on our Field PC products that use the Microsoft Windows Mobile operating system. Also included are the optional function key codes available on the Allegro MX Field PC and instructions on how to use them.
Key |
VK Code |
Hex |
Decimal |
Defined in winuser.h unless specified |
0 |
VK_0 |
0x30 |
48 |
|
1 |
VK_1 |
0x31 |
49 |
|
2 |
VK_2 |
0x32 |
50 |
|
3 |
VK_3 |
0x33 |
51 |
|
4 |
VK_4 |
0x34 |
52 |
|
5 |
VK_5 |
0x35 |
53 |
|
6 |
VK_6 |
0x36 |
54 |
|
7 |
VK_7 |
0x37 |
55 |
|
8 |
VK_8 |
0x38 |
56 |
|
9 |
VK_9 |
0x39 |
57 |
|
A |
VK_A |
0x41 |
65 |
|
B |
VK_B |
0x42 |
66 |
|
C |
VK_C |
0x43 |
67 |
|
D |
VK_D |
0x44 |
68 |
|
E |
VK_E |
0x45 |
69 |
|
F |
VK_F |
0x46 |
70 |
|
G |
VK_G |
0x47 |
71 |
|
H |
VK_H |
0x48 |
72 |
|
I |
VK_I |
0x49 |
73 |
|
J |
VK_J |
0x4A |
74 |
|
K |
VK_K |
0x4B |
75 |
|
L |
VK_L |
0x4C |
76 |
|
M |
VK_M |
0x4D |
77 |
|
N |
VK_N |
0x4E |
78 |
|
O |
VK_O |
0x4F |
79 |
|
P |
VK_P |
0x50 |
80 |
|
Q |
VK_Q |
0x51 |
81 |
|
R |
VK_R |
0x52 |
82 |
|
S |
VK_S |
0x53 |
83 |
|
T |
VK_T |
0x54 |
84 |
|
U |
VK_U |
0x55 |
85 |
|
V |
VK_V |
0x56 |
86 |
|
W |
VK_W |
0x57 |
87 |
|
X |
VK_X |
0x58 |
88 |
|
Y |
VK_Y |
0x59 |
89 |
|
Z |
VK_Z |
0x5A |
90 |
|
Home |
VK_APP1 |
0xC1 |
VK_APP1 |
winuserm.h |
Left Soft |
VK_APP2 |
0xC2 |
VK_APP2 |
winuserm.h |
Menu |
VK_APP3 |
0xC3 |
VK_APP3 |
winuserm.h |
Right Soft |
VK_APP4 |
0xC4 |
VK_APP4 |
winuserm.h |
OK |
VK_APP5 |
0xC5 |
VK_APP5 |
winuserm.h |
Esc |
VK_ESCAPE |
0x1B |
27 |
|
Backspace |
VK_BACK |
0x08 |
8 |
|
Enter |
VK_RETURN |
0x0D |
13 |
|
UP |
VK_UP |
0x26 |
38 |
|
Right
|
VK_RIGHT |
0x27 |
39 |
|
Down |
VK_DOWN |
0x28 |
40 |
|
Left |
VK_LEFT |
0x25 |
37 |
|
BackTab |
VK_SHIFT + VK_TAB |
0x10 + 0x09 |
16 + 9 |
|
Tab |
VK_TAB |
0x09 |
9 |
|
Alt |
VK_MENU |
0x12 |
18 |
|
Ctrl |
VK_CONTROL |
0x11 |
17 |
|
Shift |
VK_SHIFT |
0x10 |
16 |
|
Ins |
VK_INSERT |
0x2D |
45 |
|
Space |
VK_SPACE |
0x20 |
32 |
|
Delete |
VK_DELETE |
0x2E |
46 |
|
Underscore ''_'' |
VK_SHIFT + VK_HYPHEN |
0x10 + 0xBD |
16 + 189 |
|
Period |
VK_PERIOD |
0xBE |
190 |
|
F1 |
VK_OEM_F1 |
0xE9 |
233 |
JSAPI.h |
F2 |
VK_OEM_F2 |
0xEA |
234 |
JSAPI.h |
F3 |
VK_OEM_F3 |
0xEB |
235 |
JSAPI.h |
F4 |
VK_OEM_F4 |
0xEC |
236 |
JSAPI.h |
F5 |
VK_OEM_F5 |
0xED |
237 |
JSAPI.h |
F6 |
VK_OEM_F6 |
0xEE |
238 |
JSAPI.h |
F7 |
VK_OEM_F7 |
0xEF |
239 |
JSAPI.h |
F8 |
VK_OEM_F8 |
0xF0 |
240 |
JSAPI.h |
F9 |
VK_OEM_F9 |
0xF1 |
241 |
JSAPI.h |
F10 |
VK_OEM_F10 |
0xF2 |
242 |
JSAPI.h |
F11 |
VK_OEM_F11 |
0xF3 |
243 |
JSAPI.h |
F12 |
VK_OEM_F12 |
0xF4 |
244 |
JSAPI.h |
Blue |
Can''t be capture by itself |
|
|
|
Gold |
Can''t be capture by itself |
|
|
|
Windows |
Can''t be capture by itself |
|
|
|
/ |
VK_EXTEND_BSLASH |
0xE2 |
226 |
|
\ |
VK_SLASH |
0xBF |
191 |
|
: |
VK_SHIFT + VK_SEMICOLON |
0x10 + 0xBA |
16 + 186 |
|
* |
VK_SHIFT + VK_8 |
0x10 + 0x38 |
16 + 56 |
|
~ |
VK_SHIFT + VK_BACKQUOTE |
0x10 + 0xC0 |
16 +192 |
|
< |
VK_SHIFT + VK_COMMA |
0x10 + 0xBC |
16 + 188 |
|
> |
VK_SHIFT + VK_PERIOD |
0x10 + 0xBE |
16 + 190 |
|
( |
VK_SHIFT + VK_9 |
0x10 + 0x39 |
16 + 57 |
|
) |
VK_SHIFT + VK_0 |
0x10 + 0x30 |
16 + 48 |
|
+ |
VK_SHIFT +VK_EQUAL |
0x10 + 0xBB |
16 + 187 |
|
= |
VK_EQUAL |
0xBB |
187 |
|
| |
VK_BACKSLASH |
0x10 + 0xDC |
16 + 220 |
|
& |
VK_SHIFT + VK_7 |
0x10 + 0x37 |
16 + 55 |
|
{ |
VK_SHIFT + VK_LBRACKET |
0x10 + 0xDB |
16 + 219 |
|
} |
VK_SHIFT + VK_RBRACKET |
0x10 + 0xDD |
16 + 221 |
|
% |
VK_SHIFT + VK_5 |
0x10 + 0x35 |
16 + 53 |
|
@ |
VK_SHIFT + VK_2 |
0x10 + 0x32 |
16 + 50 |
|
# |
VK_SHIFT + VK_3 |
0x10 + 0x33 |
16 + 51 |
|
$ |
VK_SHIFT + VK_4 |
0x10 + 0x34 |
16 + 52 |
|
[ |
VK_LBRACKET |
0xDB |
219 |
|
] |
VK_RBRACKET |
0xDD |
221 |
|
^ |
VK_SHIFT + VK_6 |
0x10 + 0x36 |
16 + 54 |
|
, |
VK_COMMA |
0xBC |
188 |
|
; |
VK_SEMICOLON |
0xBA |
186 |
|
` |
VK_BACKQUOTE |
0xC0 |
192 |
|
'' |
VK_APOSTROPHE |
0xDE |
222 |
|
" |
VK_SHIFT + VK_APOSTROPHE |
0x10 + 0xDE |
16 + 222 |
|
"-" |
VK_HYPHEN |
0xBD |
189 |
|
! |
VK_SHIFT + VK_1 |
0x10 + 0x31 |
16 + 49 |
|
? |
VK_SHIFT + VK_SLASH |
0x10 + 0xBF |
16 + 191 |
|
Allegro MX Function Keys
The top twelve function keys on the Allegro MX Field PC can be set to output codes that can be captured to correspond with the function keys on previous Allegro models. Methods for programming the top function keys include:
- Monitor or assign Windows Mobile "soft" keys in application software (only applies to first five function keys), as explained in detail at: http://msdn.microsoft.com/en-us/library/bb985500.aspx
- Use Unregisterhotkey() function to enable the original function key codes as explained at: http://msdn.microsoft.com/en-us/library/aa924438.aspx
- Enable and monitor our alternative custom "OEM" function key codes in application software as provided in the JSAPI.dll included on the products.
- Use the JSSetKeyboardCustomMode() function in application software as provided in the C++JSAPI.h and JSAPI.lib reference files.
- Disable "soft" keys and enable custom function keys in all applications using Start > Settings > Personal tab > Buttons icon > FKey tab, select Function Keys radial button, and then tap OK. Note: Applications must be able to be set to recognize the new OEM key codes.
If the "OEM" function key codes are enabled while in application software or generally in the operating system using the custom Function Keys Control Panel Applet, each key can be monitored using the key codes provided in the table above.
If software will also be used on a previous Allegro model, each key should also be monitored using the recommended "VK_F1" through "VK_F12" as defined in winuser.h, or using the standard ASCII key decimal numbers 112 through 123.
Note: The original function key codes that were available on previous Windows CE and DOS Field PC models are now utilized by the operating system on newer Windows Mobile Field PCs, requiring the use of the Windows "soft" (hot) keys, unregisterhotkey(), or using our alternative custom OEM function key codes. More information is provided at:
- http://msdn.microsoft.com/en-us/library/bb431750.aspx
- http://msdn.microsoft.com/en-us/library/aa924438.aspx