Re: switch from ADB to linux keycodes ...
>>>>> On Mon, 27 Aug 2001 19:55:01 -0400, Adam Lazur <adam@lazur.org> said:
>> That is sort of what I did. However, the way the caps lock key works
>> makes it impracticle: The keypress event is sent when you first press
>> the key... The key release event is sent when the key is released the
>> second time. This leads to rather inconsistant behaivior.
a> That's what I thought as well until I saw:
a> http://www.gnufoo.org/macosx/icontrol.html
a> I was skeptical, but it seems to work (aside from the led being a little
a> annoying). It's open source... time to figure out how it works and get
a> it working under lignux.
I read the source code and it says that "special" events are
being generated for the first release and second press instead of the
regular key up/down events. I turned on dump_adb_input in Linux and
sure enough, the "special" keycode is 0xff:
1st press:
Aug 27 19:39:42 localhost kernel: adb packet: 2c 39 ff, id = 2
1st release:
Aug 27 19:39:44 localhost kernel: adb packet: 2c ff ff, id = 2
2nd press:
Aug 27 19:39:47 localhost kernel: adb packet: 2c ff ff, id = 2
2nd release:
Aug 27 19:39:52 localhost kernel: adb packet: 2c b9 ff, id = 2
So, I tried a quick hack in adbhid_input_keycode (drivers/macintosh/adbhid.c)
to translate the events appropriately and it seems to work (at last!).
Thanks a lot for the pointer!
--
Gregorio Gervasio, Jr.
gtgj@pacbell.net
Reply to: