Customizing Keyboard Shortcuts in the VoIP Phone Suite (Windows Embedded CE 6.0)
1/5/2010
The keyboard shortcuts of the Voice over IP (VoIP) Phone Suite are not intended to imply any sort of standard. They simply serve as an example of how to map keyboard shortcuts to virtual key codes. You should treat the keyboard shortcuts as suggestive only and determine the best mappings for your own platform’s situation.
Keyboard shortcuts are used by the IP Home Screen component and the IP Dialer component. You may alter or add to these shortcuts by directly modifying the related sections of code.
The following keyboard shortcuts are from the IP Dialer component application of the VoIP Phone Suite. These mappings are located in the voipapp.cpp and hotkeys.cpp files in the following directory %_WINCEROOT%\Public\VoIP\Oak\Phone\phoneapp\phonecore.
Purpose | Keyboard equivalent | Virtual Key Code | Relevant case in vkHotKey switch statement |
---|---|---|---|
Voicemail |
Escape Key |
VK_ESCAPE |
vkVoicemail |
Hold |
Function Key F8 |
VK_F8 |
vkHold |
Redial |
Function Key F10 |
VK_F10 |
vkRedial |
Transfer |
Function Key F9 |
VK_F9 |
vkTransfer |
Mute |
Function Key F7 |
VK_F7 |
vkMute |
Handset Pick Up/Hang Up. Note: the "Handset" key is treated as inverted. Offhook means that the button is unpressed, while Onhook means the button is pressed. |
Function Key F5 |
VK_F5 |
vkHookSwitch |
Speaker Phone On/Off |
Function Key F6 |
VK_F6 |
vkSpeaker |
The following keyboard shortcuts are from the IP Home Screen component application of the VoIP Phone Suite. These mappings are located in the HomeScreen.cpp and HotKeys.cpp files in the following directory %_WINCEROOT%\Public\VoIP\Oak\Phone\homescreen.
Purpose | Keyboard Equivalent | Virtual Key Code | Relevant case in vkHotKey switch statement |
---|---|---|---|
Home - Return to Main Home Screen. |
Home key |
VK_HOME |
vkHome |
Menu |
End key |
VK_END |
vkMenu |
Softkey #1 - Bottom Leftmost Button on Home Screen. This softkey works only if this button is visible. It is also triggered by one of the four in a row blank buttons on the Emulator skin. The Emulator skin is for development use only. |
Function Key F1 |
VK_F1 |
vkButton1 |
Softkey #2 - Bottom Second from Left Button on Home Screen. This softkey works only if this button is visible. It is also triggered by one of the four in a row blank buttons on the Emulator skin. The Emulator skin is for development use only. |
Function Key F2 |
VK_F2 |
vkButton2 |
Softkey #3 - Bottom Third from Left Button on Home Screen. This softkey works only if this button is visible. It is also triggered by one of the four in a row blank buttons on the Emulator skin. The Emulator skin is for development use only. |
Function Key F3 |
VK_F3 |
vkButton3 |
Softkey #4 - Bottom Fourth from Left Button on Home Screen, or rather, Rightmost button. This softkey works only if this button is visible. It is also triggered by one of the four in a row blank buttons on the Emulator skin. The Emulator skin is for development use only. |
Function Key F4 |
VK_F4 |
vkButton4 |
Directory |
Enter/Return Key |
VK_RETURN |
vkDirectory |
Speed Dial |
Tab Key |
VK_TAB |
vkSpeedDial |
Volume Up |
Arrow Key Up |
VK_PRIOR |
vkVolumeUp |
Volume Down |
Arrow Key Down |
VK_NEXT |
vkVolumeDown |
Shutdown - This is for development and testing purposes only. For example, you can shut down the VoIP applications before the device is powered off. After you shut down an application, you can start it up again by using Platform Builder. |
Function Key F12 |
VK_F12 |
vkShutdown |
To modify or add keyboard shortcut functionality, add a new enumeration value to the end of HotKeyId_e enum in the appropriate hotkeys.hpp file. In the component application's resource (.rc) file, add a VK_xxx value to the hotkey table that corresponds to this new enumeration ID. Finally, in the relevant source code (.cpp) file (HomeScreen.cpp or voipapp.cpp) add code to handle the new HotKeyID_e value. In HomeScreen.cpp, this would be in HomeScreen_t::OnHotkey() and in voipapp.cpp, this would be in VoIPApp_t::RespondToHotKey().
Additionally, the keyboard or softkey arrow keys composing Up, Down, Left and Right, can allow users to navigate throughout the VoIP Phone Suite. This functionality is not original with the VoIP Phone Suite but rather, is default CE 6.0 operating system behavior.
Shutdown (F12) is screened out by the CE 6.0 Device Emulator when using the Emulator, so it will not shutdown the phone application in that situation. Though Shutdown (F12) works on an actual device, this feature is for development purposes only.
For development purposes, the Enter key has been mapped to a keyboard shortcut. Because of this, if you want to use a default 'enter' behavior, then you need to press either Control+Enter or Shift+Enter. These key combinations select an item from a menu dropdown on an actual device, such as the Transports menu for SIP Transport. Control+Enter also works on the Emulator. However, Shift+Enter does not work on the Emulator. This mapping is not original with the VoIP Phone Suite but is default CE 6.0 operating system behavior.
The Select button on the Emulator skin, located in the center of the four arrow buttons, maps to the Enter (or Return) keystroke and brings up the Directory.
The VoIP Phone Emulator skin is located at <Platform Builder installation path>\CoreCon\SDK\SAMPLES\DE_SKINS\VOIP_PHONE\VoIP_Phone.xml.
Finally, it is very important to note that some keys' behavior have been changed only for development purposes via these mappings. Shipping devices should NOT use these mappings. Instead, you should design your device such that your keyboard driver provides unique key mappings for these shortcuts and you should update the resource files (.rc files) to match your keyboard driver. F1 through F12 as well as other "normal" keys should NOT be used in shipping devices, only in development devices.
See Also
Other Resources
Common VoIP Phone Customization Tasks
Device Emulator
Virtual Key Codes
Keyboard Reference