More Programmers'/Hackers' Stuff, along with some cool Pocket Loox 7xx Hold Button Tips: More on Pocket PC Hardware Buttons

In my previous article (alternatives: PPC Magazine, BrightHand) on the secrets of programming/accessing/configuring the Pocket PC hardware buttons, I elaborated on where the Pocket PC stores hardware button configuration information in the Registry. In this blog post, I elaborate more on what you can do with the HKEY_LOCAL_MACHINE\ SOFTWARE\Microsoft \Shell\Keys\40CX\Flags value in the Registry. I also explain the implications this has on playing several, button-based games on Fujtisu-Siemens Pocket Loox devices. Finally, I elaborate on the button lag issue of the Pocket Loox devices.

Flags, as with, for example, the Flags value in file extension associations part of the Registry (you may want to read this blog post on how those flags work), is a multi-function tool. Having found no real information on them, I've played quite a bit with them to find out what the individual bits are for; I present the results here.

All bits off: the default mode (button associations work as configured: invoking an external program defined in the Default value of the given registry key)
Bit 1 (lowermost bit; that is, putting 00000001 in the given button's flah): invoke Start menu
Bit 2 (00000002): bring up the current SIP
Bit 3 (00000004): switch to the Today screen
Bit 4 (00000008): scroll right

Bit combinations:
Bit 1+3 (00000005): scroll up
Bit 2+3 (00000006): scroll down
Bit 1+2+3 (00000007): scroll left
Bit 1+4 (00000009): completely disable (a.k.a. <None>)
Bit 2+4 (0000000A): OK/Close
Bit 1+2+4 (0000000B ): Context Menu
Bit 3+4 (0000000C): screen orientation change in WM2003SE+

Note that the Buttons applet also stores these values in the Flags value. That is, if you choose anything that is between < and > marks in the Buttons applet, no "real" program name will be assigned to the button (that is, the default value under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shell\Keys\40CX will be left empty), only the Flags value will be accordingly updated.

Let's pay special attention to the value 9; that is, completely disable a button. What can you do with all this? What's the point in, say, disabling some hardware buttons altogether? Isn't it possible just to assign <None> in the Settings/Buttons applet to all hardware buttons you don't plan to use if you want to avoid the system wait for their press? Sure it is!

First, the advantage of disabling "hold" buttons is very easy to explain: a lot of games heavily rely on tap-and-hold buttons; for example, 4Pockets' Harry Putter's Crazy Golf (read this golf game roundup for more info on the game), Worms World Party (see this article). The former uses Button 2, while the latter Button 4 for aiming/shooting. If you don't disable the "hold" button functionality of these buttons, you won't be able to play these games. To play these games (or any games that behave the same on the Pocket Loox) you only need to disable a "hold" button. Then, the "non-hold" peer of the given button will be active even if you keep the button holding down.

You can, as has already been explained, just disable the "hold" buttons in the Buttons applet – just assign <None> to all buttons that should otherwise interfere in the game. For example, with Harry Putter, assign <None> to Btn 2 (HOLD) as can be seen in this screenshot.

If you prefer doing this in the Registry (because you want to use easy-to-execute registry import scripts to quickly disable/enable buttons, instead of always going to the Settings/Buttons applet), you only need to put '9' in [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shell\Keys\40C8\Flags] with Button 2 (the Harry Putter case). (Note that this button is referred to as C8 and not C3: with the Pocket Loox, to compute the "hold" button number, you need to add 5 to the key values published in my GBA Emulator roundup).

I've also created a registry import script for this button; it's accessible here. Again, after importing it, it's only the C2i button (which, when hold, starts Messaging) that has no longer the otherwise very useful double button functionality, all the other buttons still have it. When, programmatically (that is, by direct Registry editing/importing), you want to switch back to invoking an application instead of being disabled, just put a zero in there.

With Worms World Party, which uses the Today button (keycode C5; that is, it's C5+5 = CA, the number of the hold button, that you must overwrite) for aiming/shooting. Therefore, it's [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shell\Keys\40CA\Flags] that you must load the value 9 to.

There're two other files I give you: this one for deactivating the tap-and-hold functionality of all buttons at once, and this one for reactivating them all. Please note, however, than in most cases you will only want to deactivate the hold button functionality for individual buttons only – buttons that make it otherwise impossible to play some games. "Hold" buttons offer very nice additional capabilities – these are one of the reasons for why the Pocket Loox 718/720 is so darned good.

Please note that these are REGEDIT5-compliant registry import files; that is, use a REGEDIT5-compliant registry editor to import them; for example, Resco Registry Editor. You may want to read this registry editor roundup for more information on the available Pocket PC registry editors.

Finally, let me explain the button lag problem of the Pocket Loox 720, which can be an issue in platform games like R.C. in the excellent Retro Games 2 pack. Button lag means the command is executed some 50-100 milliseconds after you press the button, while on other Pocket PC's where there's no button lag (Casio E-125, iPAQ 36xx, iPAQ 2210, just to name a few), the button lag isn't noticeable. This, while using your PDA in a traditional way, isn't an issue. When, however, you play platform games where you'd like to as fast feedback as possible, this will be an issue.

To eliminate button lag, you need to put 0 in [HKEY_CURRENT_USER\Software\Platform\ Button\LongPress\TimeAPX], where X is between 1 and 7, depending on the number of the button. For example, the C2I (in Hold mode, Messaging) button has the number of 2; that is, if you want to elminate its button lag, put 0 in HKEY_CURRENT_USER\Software\Platform \Button\LongPressTimeAP2. You can also download this as a registry import file, readable by any Regedit 5-compliant registry editor.

Please note that you should not zero out the registry values of all these buttons. [HKEY_CURRENT_USER\Software\ Platform\Button\LongPress\TimeAPX] for buttons that should retain their double-button functionality should not be zeroed out; otherwise, the "hold" functionality will be invoked right after you press the button and you won't ever be able to access the non-hold functionality of these buttons at all.

Note that the changes to [HKEY_CURRENT_USER\Software\ Platform\Button\LongPress\TimeAPX] (that is, elminating button lag) will be visible only after a soft reset, unlike with editing Flags/assigning new functionality to a button in the Buttons applet.

Note that the infamous PPC tweaker Tweaks2k2 also supports enabling/disabling the button hold functionality (see "Turn off "hold button function"" in Tweaks/System Tricks/ System Tricks (the lowermost checkbox in the Collection 1 tab) (see screenshot here), but it will disable all your buttons at once – you can't selectively disable the button hold functionality individually (because, for example, only need it to play, for example, a game that relies on long button presses like the above-mentioned Harry Putter's Crazy Golf). It will also zero out all the LongPress values in the Registry. If you, however, don't want to disable (enable) all "hold" buttons at once (selective disabling/enabling may be much more useful), go for the manual way explained above (especially with quick-loadable registry import scripts).

A related thread can be found here.

Strange you find your K-Jam's buttons laggy. They shouldn't be - I've never had such problems on mine. Are you sure a hard reset doesn't help (that is, it's not a third-party software issue)?

I'll try to asnwer this ASAP - now, my Wizard is still being repaired. As soon as I get it back, I try to find a solution.

Dear Brother. Thats a very

Dear Brother. Thats a very good article. I am playing a game on K Jam WM 5 which needs asterisk * key to play. Now the problem is that it is not recognizing this key. My question is that can we assign the * key to any soft key. And if we can what would be its flag or bit value. Thanx in advance. I hope that my question was clear. :)

Syndicate content