Wednesday, December 17, 2008

Sony function keys and OpenSolaris

The sound vol up/down/mute buttons on the Vaio nearly worked out of the box, all I had to do was to map them in the Gnome Keyboard Shortcuts preferences.
Running
# dtrace -n '::KeyboardConvertScan:entry {printf("%x", arg1)}'
I found the keycodes for some other keys (Play/Pause, Stop, Next, Prev).
Funny that the Keyboard Shortcuts preferences dialog didn't see the keycodes when I tried to map them directly. So I had a look at acerkb from frkit which I had been using for ages on my Acer Ferrari. Seems like I was lucky that acerkb mapped the keycodes for the sound control already and it therefore just worked. So I replaced the keycodes from the Ferrari with the ones from the Vaio. And voila I was able to map them to the according functions in Gnome.

I wonder how I can find out which keycode sequences the keys generate that I couldn't catch with above dtrace command. There are 4 more Sony keys (S1, S2, AV mode, Eject) that I couldn't grab. Also the keys for LCD brightness, suspend and internal/external display didn't generate a key code. So there is more research needed.

No comments:

Post a Comment