[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: switch from ADB to linux keycodes ...



>>>>> On Wed, 29 Aug 2001 11:01:35 +0200 (CEST), Michael Schmitz <schmitz@zirkon.biophys.uni-duesseldorf.de> said:

[clone keyboard:]

>> >> 1st press:    0x39
>> >> 1st release:  0x80
>> >> 2nd press:    0xb9
>> >> 2nd release:  0x80
>> 
>> As noted previously, the PowerBook CapsLock generates:
>> 
>> 1st press:    0x39
>> 1st release:  0xff
>> 2nd press:    0xff
>> 2nd release:  0xb9 

[...]

m> That was it. Silly me. We need to ecplicitly test for 0x80 here. 
m> So in the Powerbook case we need a special hack (like toggle the last
m> pressed key state), in the other case we'd need to remember the last key
m> pressed, and fake a release event for that key if we see the 0x80. Can you
m> test what happens if you press another key and hold it down before
m> releasing capslock (or press and release another key before
m> releasing capslock). If that generates a 0x39 for the second capslock
m> press we can just remeber the last key pressed, otherwise we'll need to
m> keep track of capslock state. 

        On either keyboard, it doesn't seem to make a difference
whether or not you press other keys -- the same order of four keycodes
still gets generated for CapsLock.  So for the clone keyboard, the
patch I've been using keeps track of the CapsLock key state, as you said.
-- 
Gregorio Gervasio, Jr.
gtgj@pacbell.net



Reply to: