Click here to Skip to main content
14,361,624 members

KeyToggle: Get Working Function Keys on Your Windows Mobile Device

Rate this:
4.00 (1 vote)
Please Sign up or sign in to vote.
4.00 (1 vote)
13 Jan 2010CPOL
Using keyboard hooks to define special key functions

Consumer PDAs running Windows Mobile have either only some special keys (a rocker, home, back and action) or some have a qwertz keypad or a mobile phone like keypad. The industrial handhelds by ITC and other vendors of ruggedized handheld computers mostly have a number or alphanumeric (qwertz) keypad. Some of these ruggedized devices support also Function Keys. You may need function keys if you access an application on a terminal server or use a terminal emulation like IBM 3270 or VT/ANSI.

If you don't have function keys on your keypad, you can use KeyToggle to get the number keys work as function keys.

With keytoggle, you can define a ’sticky’ key that will change the beahviour of the number keys. As long as the sticky key is ‘active’, number keys from 1 to 0 will produce the function keys F1 to F10. If sticky key is active, the left LED will light in green (700) or the left LED will light yellow (CN3).

To start keytoggle, just tap it or let it start by a link in StartUp. If keytoggle is loaded, you can see a small yellow arrow sign in the taskbar.

keytoggle icon

If you tap this symbol, you are asked if you want to unload the app. If the registry does not have values defined for keytoggle, it will use default values. If you try to launch keytoggle a second time, you will get a message box. Only one instance of keytoggle can run at a time.

Using the registry, you can define the behaviour of the sticky key. In the example, you can have the sticky key remain active until it is pressed again, let it ‘go off’ or ‘fallback’ after a period of time or let it fallback after a number key has been pressed. If the sticky key is pressed again, it will always fallback.

Configuration is done by the registry.

The Registry Values




default “144″, decimal (VK_NUMLOCK)

The VK_ value of the sticky key. Here you define, what you will have as the sticky key. VK_ values are defined as in winuser.h. In the example, the VK_ value for the NumLock key is 0×90 (144 decimal, see VK_NUMLOCK). The sticky key will be consumed by keytoggle and is not visible to the system any more. That means, that you should choose key value that you do not need in any app you use. Another sample is VK_ADD (0×6B, 107).


default “3″, three seconds

Number of seconds the sticky key will remain active. If 0, the sticky key will not fallback automatically by time


default “0

If 0, the sticky key will not fallback after pressing a number key. If 1, the sticky key will fallback after a number key is pressed

Launch Arguments

Keytoggle only supports one argument: “-writereg”. This will create the registry keys used by keytoggle and fill them with the default values.

Usage Sample Scenario

You have a ITC 700 Color device. This has an alphanumeric keyboard but no function keys. You need the function keys to be able to use a web application within iBrowse. With keytoggle, you can now for example use the Gold key as sticky key. You have to download the keyboard remapper tool from the ITC site (Device Resource Kit, see download link on right) and assign the Gold key to NUMLOCK.


With this remapping and keytoggle running, you will get a function keystroke simulated if you press the Gold key and then a number key.

(Copied from


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Germany Germany
No Biography provided

Comments and Discussions

-- There are no messages in this forum --
Technical Blog
Posted 13 Jan 2010

Tagged as


1 bookmarked