Friday, October 07, 2005

Zaurus pdaXrom IR Keyboard Drivers (part 1)

My XVkbd IR keyboard hack worked reasonably well as a stopgap solution, but polishing it up to the point I can live with it long-term is going to be nearly impossible. The fact that it's only functional in the X11 GUI is a fundamental limitation. In addition to that, I'd have to learn a lot of low-level X11 programming to get performance up to a level I'd be satisfied with. Time to design a better solution!

It turns out there's a project at Handhelds.org called kbdd that aims to provide almost exactly what I'm looking for in Familiar Linux on Compaq iPaq PDAs. It has the advantage of being a daemon that injects the keystrokes at the Linux kernel level making them available to both the console and X11. And since it's not an X11 application, it can be modified without slogging through a big pile of low-level GUI code. Looks like a perfect candidate for a general purpose pdaXrom IR keyboard driver.

However, bringing it to the Zaurus presents a couple of issues. First of which is that it uses three Linux kernel drivers (uinput, keybdev, and input) to take data from the "user space" daemon and pipe it into the kernel's keyboard driver. Those driver modules don't exist in pdaXrom. In fact, the uinput driver didn't even exist until the 2.4.23 version of the Linux kernel and pdaXrom is based on Sharp's "official" 2.4.18 kernel version.

Luckily I have been able to backport the uinput driver to the 2.4.18 kernel, build all three drivers, and get them to run properly on my C760. The most difficult part was setting up a kernel cross-development environment and then reconstructing the source tree for the 2.4.18 Zaurus kernel from Sharp's collection of kernel source patches. Sharp's kernel source modifications can get pretty ugly, so I was pleased to find that it took nothing more than tweaking the .config file to get the needed additional drivers to build.

Next step, adapting the kbdd daemon ... (part 2)

1 Comments:

At 1:36 PM, Anonymous Leinadmx said...

Hi friend I am trying to contact you..

Last weekend I was working on palm_3169ww.lua config file, but I could not find the "@" symbol, I do not know which code is, I mean I know which key is pressed and the scancode got, but the problem is that no one ztoken seems works.
I tried using "xev" command and I got something like this:

Pressing "-" key from palmkeyboard with "zkbdd -d swtich" I got:
(which gives scancode(normal_map,0x29)-> ZK_PLUS -> token 59):

Pressing "-" key from palmkeyboard with "xev" I got:
state 0x2000, keycode 67 (keysym 0x2d, minus), same_screen YES,
XKeysymToKeycode return keycode: 63
XLookupString gives 1 byte: (2d) "-"

It works fine, but the problem is with other symbols, for me the most important is "@" that I cannot find sad.gif I got this trying to get "@":

Pressing "@" key from palmkeyboard with "zkbdd -d swtich" I got:
(which gives scancode(normal_map,0x79)-> ZK_AT -> token 61):

Pressing "@" key from palmkeyboard with "xev" I got:
state 0x0, keycode 67 (keysym 0x0, NoSymbol), same_screen YES,
XKeysymToKeycode return keycode:
XLookupString gives 0 byte:

I do not what to do or how the ztoken filter works, I guess that ztokens are translated to other keycodes which Zaurus gets.

Besides its funny that some scancodes works different if you use then in the map_normal or in map_shift.

Any advice please??, How could I know the way to get "@" symbol??

Best Regards,

 

Post a Comment

<< Home