I want to summarize the role of function keys in Windows Mobile, former Pocket PC, as I got several questions each week on how to use or enable
function keys in applications.
Here is some simple information about how function keys work in Windows Mobile.
As an example you have a web application which shows F3 and F4 as shortcuts to
the previous/next page:
SAP ITS Mobile screen Intermec Browser
Without some preparation, this screen will not react to function keys! As the screen shows Intermec Browser (IB) with a SAP ITS Mobile form, you are able to define
the settings in IB to be able to really use the Function Keys.
Windows Mobile uses function key values for its own purpose. The usage can be retrieved by looking at
winuserm.h of a Windows Mobile SDK:
#define VK_TSOFT1 VK_F1 #define VK_TSOFT2 VK_F2 #define VK_TTALK VK_F3 #define VK_TEND VK_F4 ...
#define VK_TRECORD VK_F10 #define VK_TFLIP VK_F17 #define VK_TPOWER VK_F18 #define VK_TVOLUMEUP VK_F6 #define VK_TVOLUMEDOWN VK_F7 ...
#define VK_TSPEAKERPHONE_TOGGLE VK_F16
#define VK_END_ALL_DATA_CALLS VK_F15
#define VK_TSTAR VK_F8 #define VK_TPOUND VK_F9 ...
#define VK_SYMBOL VK_F11
#define VK_REDKEY VK_F19 #define VK_ROCKER VK_F20 #define VK_DPAD VK_F21 #define VK_ACTION VK_F23
#define VK_VOICEDIAL VK_F24 #define VK_KEYLOCK VK_F22 #define VK_KEYUNLOCK VK_F25
#define VK_DONE VK_F6 #define MOD_DONE (MOD_WIN | MOD_KEYUP)
#define VK_MOJI VK_F7 #define MOD_MOJI (MOD_WIN | MOD_KEYUP) ...
You see that many function key values are assigned to OS specific functions like Phone, END, Volume Up/Down etc.
So, you can normally not use Function Keys in your application to provide shortcuts to function calls. This is also true for client applications like
Terminal Emulators (TE) like NaurTechTE and Intermec TE (ITE), browser based applications like Internet Explorer Mobile or Intermec Kiosk Mode Browser (IB),
thin clients like Java client apps (i.e., SAP ITS Mobile) or Remote Desktop client apps (i.e., Remote Desktop Mobile, zaDesktop).
Some of the kiosk mode apps provide a way to enable you to use Function Keys (see example at top). They can do so, as they use API calls like
GXOpenInput (deprecated!). These APIs instruct Windows Mobile OS to
not catch and use Function Keys but handle them like ‘normal’ keys.
If you are the coder of an application using C++, C#, VB.NET, or Java, you can use the Microsoft API function
AllKeys(TRUE) in your code and Windows Mobile will not tamper the function keys.
If you are not the coder you may use
UnregisterFunc1 (see my post
Freedom for Function Keys). But be warned, there are applications that even then will not process Function Keys or do not forward them. For example Internet Explorer Mobile (IEM) will
not process Function Keys except for internal functions like help or full-screen. Another bad example is Remote Desktop Mobile (RDM). It does not support Function Keys, even if you un-register them before you launch RDM, Function Keys will
not be processed or transmitted to the host application. An alternative to RDM with function key support is rdesktopCE.
When you use
UnregisterFunc1, you can check the Function Keys using a tool like KeyTest3AK. It will show the keydown and keyup values of keys and shows what happens if you use
More posts about AllKeys