TouchPad!

TouchPad So, I got one of the Internet-legendary $99 TouchPads (well, $149 actually, but whatever). As some of you may know, I was an enormous Palm fanboy during the 90's. So it was pretty inevitable that I would end up purchasing one of their WebOS products, even though there's not a lot in common between this and Jeff Hawkins' wooden cutout Palm Pilot. Anyhow, this is probably going to be the nerdiest review of the TouchPad posted on the Internet. It mostly is concerned with keyboard mappings. Enjoy!

I played with it for a couple of days in a vaguely-stock form, and then decided to have some fun with it. Using (sort of) the instructions from webos-internals for MetaDoctor, I rebuilt the image on the tablet to have a separate partition for doing real work in. This process was really awesome and reinforced how much the TouchPad really is just a linux box... running LVM and all. Once I had the extra partition (and the ever-essential Preware), I was able to install X11, a terminal, and a pre-built Debian chroot. This is pretty awesome... I have, for less than $150, a fairly powerful computer with a very long-lived battery, running Debian.

Of course, it's not all roses. First annoying things: everything runs as root. So, in my Debian chroot, I created a user, and changed /media/cryptofs/apps/usr/palm/applications/org.webosinternals.debian-squeeze-chroot/bin/chroot-wrapper.sh from executing /bin/bash to executing /bin/su - jbrown. I also put a bunch of good stuff in my .zlogin file (starting an ssh agent if one isn't already running, and loading my ~/.Xmodmap, specifically). However, the biggest bother for me so far has been that the virtual keyboard doesn't have an Escape or a Control key. I'm currently using the following ~/.Xmodmap, loaded via my shell rcs in the Debian chroot:

keycode 163 = Control_L
keycode 172 = Escape

This binds the € key to Escape and the £ key to Control. Which mostly works (which is to say, the Escape key mapping works great, and now I can use vi to my heart's content).

Of course, the Control key is generally more useful as a modifier instead of a button that gets keydown and keyup when you press it. I had high hopes that I could AccessX/xkbset to turn on sticky keys mode for Control and get things done that way; unfortunately, it doesn't look like the build of Xsdl in Preware supports accessx. Which is a major bummer. So I dove into XKB. That's right, I learned XKB syntax, almost entirely from the (highly perplexing) guide at charvolant.org/~doug/xkb/xkb.pdf. If you want to get a sticky control key under WebOS (after installing Xecutor and friends), apply the following diff to /media/cryptofs/apps/usr/palm/applications/org.webosinternals.xserver/share/X11/xkb/compat/basic:

--- basic
+++ basic.new
@@ -12,10 +12,14 @@
     interpret.repeat= False;
     setMods.clearLocks= True;
     latchMods.clearLocks= True;
     latchMods.latchToLock= True;
+    
+    interpret Control_L {
+       action= LatchMods(modifiers=Control);
+    };
     interpret Shift_Lock+AnyOf(Shift+Lock) {
    action= LockMods(modifiers=Shift);
     };

Such a simple amount of code, but it took me at least an hour and a half to write that.

Without any further ado, I present you nerd porn.

My TouchPad running htop on knuth, the HMC CS Department server, over ssh, under ZSH, from inside my debian chroot, in an xterm, under X11:

TouchPad Nerd Porn

TouchPad running xeyes and demonstrating that it all works inside the card multitasking doohickey:

TouchPad Xeyes

I'll be sure to post more interesting things here as they come to my mind. For now, I think I'm going to bed. Ciao!


Comments