Custom key mappings on my small Zipit rootfs

2011-02-10 21:54
On my Zipit Z2 rootfs the key table is stored in the file z2.kmap located in the /etc folder. As required by busybox's loadkmap utility, this file needs to be in a special binary format. So you cannot simply edit the file to change the keymapping. What you need to do is edit the text version of that file and then compile it into the required binary format. You can do that on any Linux computer with the loadkeys utility.
To compile your modified z2.map file into a binary z2.kmap file you would execute loadkeys with the -b (or --bkeymap) switch:

$ loadkeys -b z2.map >z2.kmap


Older versions of the loadkeys utility do not necessarily understand the -b switch, so make sure you are using a recent version. 1.15.2 should work fine.

For further information on how to modify the actual keymap file have a look at this article.

One particular thing people have asked a few times was how to make some modifier keys sticky. So lets say you want to make the shift key sticky. All you need to to is to change the function assigned to the shift key from "Shift" to "SShift":

keycode 42 = SShift

The same thing can be done for the other modifier keys to. All you need to do is prepend a S to the name of the modifier function.
 

Leave a comment

Name
E-Mail
Website
Homepage
Comment