I’ve been poking around with remapping the keys on the N810 keyboard and got xmodmap working this morning. I didn’t think it was available for OS2008, but you can snag the xmodmap binary for OS2008 from here. I used some of the information on the page about using a Bluetooth keyboard with older Maemo releases, but also just read some general hints about how to use xmodmap and where to find info about keysyms.

I started out just testing the modifications I wanted from the command line in xterm. You can use a command like the following to test out a mapping before adding it to any config files:

xmodmap -e ‘keysym m = m M bar bar bar’

My targets for remapping were the euro and pound signs (Fn-M and Fn-; on the built in keyboard). I live in the United States, and as everyone knows one of our favorite pastimes when not destroying other countries during religious crusades is to ignore them completely. So the chances of me needing to use those symbols is pretty low unless I suddenly decide to write some kind of political satire. What I wanted there were the tab character and the pipe character. Essential to sanity when doing a lot of command line stuff, which I do. So I ended up with this .xmodmap file:

keysym m = m M bar bar bar
keysym semicolon = semicolon colon Tab Tab Tab

Fantastic! Now I can run ‘xmodmap /home/user/.xmodmap’ and get the remapped keys I want. I had seen mentions on some of the discussion boards about the keymappings getting reset with every keypress or something. I’m not seeing that on my relatively recent OS2008 install (1.2007.42-19). Once I set the mappings they stay around till I reboot. What I can’t figure out how to do however is to run xmodmap automatically at startup and have it work. I tried adding it to a bunch of different places in startup files, but the remappings weren’t active for some reason. So I just created a nice short script I can run from xterm, which is mostly when I want to enact these mappings anyway. Good enough for now. Still, would be really slick to just have them working, is there a thread out there with a working example for .19? I didn’t run across one in my wanderings.