Click here to Skip to main content
Click here to Skip to main content

Tagged as

KeyToggle: get working function keys on you Windows Mobile device

, 13 Jan 2010
Rate this:
Please Sign up or sign in to vote.
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 aa application on a terminal server or use a terminal emulation like IBM 3270 or VT/ANSI.

If you dont 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 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

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Intermec\KeyToggle]
"Timeout"=dword:00000000
"autoFallback"=dword:00000001
"StickyKey"=dword:00000090

StickyKey:

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 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).

Timeout:

default “3″, three seconds

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

autoFallback:

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 a 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 cpkbdmap.cab from the ITC site (Device Resource Kit, see Dwonload link on right) and assign the Gold key to NUMLOCK.

cpkbdmap

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

(copied from www.hjgode.de/dev/iLock)

DOWNLOAD:KeyToggle - DOWNLOAD:KeyToggle exe ARM v4 (WM2003, WinCE4.x) - DOWNLOAD:KeyToggle exe ARM v4i (WM5/6, WinCE5.x) - <!-- Social Bookmarks BEGIN --> <!-- Social Bookmarks END -->

License

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

Share

About the Author

hjgode

Germany Germany
No Biography provided

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web04 | 2.8.140827.1 | Last Updated 13 Jan 2010
Article Copyright 2010 by hjgode
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid