Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Message Map for Navigation Controls

Windows Mobile 6.5
4/19/2010

Navigation controls communicate with the Windows Embedded CE operating system by sending messages. An OEM provides the driver that links each control with WM_KEYUP and WM_KEYDOWN messages individually or in a series. Each message has a virtual key message in its wParam parameter. The driver starts when the user presses a navigation control. The driver then sends the window messages to the device shell, which in turn shell passes the messages to the current application.

In the following message map table, the Action key and the Exit control do not send VK_RETURN and VK_EXIT messages until the user releases them. This makes the use of control combinations, or chording, easier. The direction keys each send a pair of WM_KEYDOWN and WM_KEYUP messages when held down. The driver continues sending these pairs for each auto-repeat, until the user releases the key. The messages for each operation on a control are sent in the order listed in table.

The "Done" key will do an "OK" action when there is an ok icon in the top-right corner and "close" action when the "x" icon is shown in the top right corner.

Bb158623.note(en-us,MSDN.10).gifNote:
This example may not be consistent with the driver installed on your target device.

Operation on control Messages wParam

Press Action key

WM_KEYDOWN

WM_KEYDOWN

VK_ACTION

VK_RETURN

Release Action key

WM_KEYUP

WM_KEYUP

VK_RETURN

VK_ACTION

Press Done key

WM_KEYDOWN

WM_KEYDOWN

VK_RWIN

VK_F6

Release Done key

WM_KEYUP

WM_KEYUP

VK_F6

VK_RWIN

Press Up control

WM_KEYDOWN

VK_UP

Hold down Up control

WM_KEYDOWN

WM_KEYUP

VK_PRIOR

VK_PRIOR

Release Up control

WM_KEYUP

VK_UP

Press Down control

WM_KEYDOWN

VK_DOWN

Hold down Down control

WM_KEYDOWN

WM_KEYUP

VK_NEXT

VK_NEXT

Release Down control

WM_KEYUP

VK_DOWN

Press App 1

WM_KEYDOWN

WM_KEYDOWN

VK_LWIN

0xC1

Release App 1

WM_KEYUP

WM_KEYUP

0xC1

VK_LWIN

Press App 2

WM_KEYDOWN

WM_KEYDOWN

VK_LWIN

0xC2

Release App 2

WM_KEYUP

WM_KEYUP

0xC2

VK_LWIN

Press App 3

WM_KEYDOWN

WM_KEYDOWN

VK_LWIN

0xC3

Release App 3

WM_KEYUP

WM_KEYUP

0xC3

VK_LWIN

Press App 4

WM_KEYDOWN

WM_KEYDOWN

VK_LWIN

0xC4

Release App 4

WM_KEYUP

WM_KEYUP

0xC4

VK_LWIN

Whenever a window receives a VK_RETURN message that is generated by pressing the action key(VK_ACTION or VK_F23), the system will know that the action key is pressed down simultaneously. Therefore, an application programmer can distinguish a plain return key press from an action key press as outlined below.

case VK_RETURN:
   if (GetAsyncKeyState(VK_ACTION) < 0
   {
       // Action key was pressed, perform action key behavior
   }
   else
   {
       // Perform plain return key behavior
   }

The following message map table lists the control operations, with their respective messages and wParam values, for Windows Mobile Standard keys.

Note that beginning with Windows Mobile 6.5.3, soft keys are replaced by touchable tiles on Windows Mobile Professional phones.

Operation on control Messages wParam

Press the Back key

WM_KEYDOWN

VK_TBACK

Press the Record key

WM_KEYDOWN

VK_TRECORD

Press the left soft key

WM_KEYDOWN

VK_TSOFT1

Press the right soft key

WM_KEYDOWN

VK_TSOFT2

Press the Volume down key

WM_KEYDOWN

VK_VOLUMEDOWN

Press the Volume up key

WM_KEYDOWN

VK_VOLUMEUP

Community Additions

Show:
© 2015 Microsoft