Log in

View Full Version : Where does the PPC Registry store button mapping info - a tutorial


Menneisyys
05-11-2005, 06:48 PM
Where does the PPC Registry store button mapping info - a tutorial

Where does the PPC Registry store button mapping info and why should I pay attention to it?

A question has just been posted to http://www.pocketmatrix.com/forums/viewtopic.php?t=21384 about hardware button problems caused by a button enhancer application, which is able to greatly extend the functionality and usability of a one-function hardware button. Buttons like these are the hardware buttons on most, mostly older, PPC's; they can't be programmed to react to long . This is where button enhancers come into picture; it's a completely different question that they sometimes do cause problems, just like the one in the above-linked thread.

It should be pointed out that a lot of newer devices like the last-generation Fujitsu-Siemens Pocket Loox 720 assign two functionalities to the same hardware button (that is, 12 functions overall - it has 6 hw buttons -, as opposed to, say, the meagre 4 functions of the previous-generation iPAQ 2210).

The tips I describe here are also very useful in swapping your favourite button configurations without using any external (and, sometimes, commercial) apps, not just at fixing your button configuration. Furthermore, you'll also learn a bit about where to look for things in Registry.

Fortunately, it's very easy to modify your button configuration in the Registry.

Everything related to the hardware button configuration is located in the registry under [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shell\Keys]. Every hardware button is given a registry key named 40Cx, where x is the serial number of the button. Traditionally, on Pocket PC's, Button 1 is Calendar and, on the majority of them, Button 2 is Contacts. Their subkey names are 40C1 and 40C2, respectively.

In these keys, the most important of them is the (Default) value (denoted by @ in registry exports) because it links the program to be called upon button press. With Button 1, Calendar, it's "\Windows\AppButtons\Calendar.lnk" by default. (In Registry exports, all " and \ characters are escaped - that is, preceded - by a \ character and all non-numeric values are between " marks; this is why registry export files are so different from what you can see in a Registry editor.

So, what you should do, in case your HW button configuration gets ****ed up and/or you want to backup/restore your button configuration, without gooing through in the painful process of reasssigning them by hand? It's pretty easy: get a registry editor (I recommend Resco Registry Editor (REE) because it's capable of both backing up a given key and also selectively restoring) and,

- if you want to back up: stand on HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shell\Keys, tap-and-hold the stylus and choose Export

- if you want to restore: just tap the registry file you previously backed up from inside File Explorer. This can be done even without starting REE. Alternatively, from inside Resco Registry Editor, choose File/Import.

Incidentally, the ability to load registry data with only one click, particularly if you put a shortcut to your registry file on your Today screen. With this, you can do a lot of previously undocumented things MUCH easier on your Pocket PC. For example, you can change your Pocket Internet Explorer (HTTP) or other proxies with just one click on the Today screen as described at, say, http://www.firstloox.org//forums/showthread.php?p=28878 and http://discussion.brighthand.com/showthread.php?s=&threadid=118113 .

- if you just want to fix something, you can also come here. For example, if you want to restore the default setting of a given button, you can just copy the contents of ResetCmd to Default. Or, if you want to change the default icon/name assigned to the button in the Buttons applet, just modify Icon/Name.

Menneisyys
01-21-2006, 08:12 PM
In my latest blog post at http://www.pocketpcmag.com/blogs/index.php?blog=3&p=463&more=1 , I explain what the HKEY_LOCAL_MACHINE\ SOFTWARE\Microsoft \Shell\Keys\40CX\Flags Registry value is for and what it can contain. Also, I elaborate on the hold button and the button lag functionality/implications for Fujitsu-Siemens Pocket Loox users.

msafi
01-21-2006, 11:12 PM
this is very helpful stuff. i also noticed in my HTC Wizard there are no registry data in the 'keys' folder related to the Green and Red phone buttons and two softkey buttons.