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

Re: switch from ADB to linux keycodes ...



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

>> Well, I know of at least one other type of ADB keyboard where
>> this wouldn't work.  The keyboard on my old PowerWave generates
>> different events for CapsLock:
>> 
>> 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 

Note the difference in order of events for second press/release:
0xff/0xb9 versus 0xb9/0x80.  (Anyone know what other ADB keyboards
do?)

>> 
>> So that requires a different hack to get CapsLock to behave the
>> "right" way.

m> :-) My ADB knowledge is a bit rusty - are there any other instances where
m> a response packet byte has the highest bit set? Otherwise reply[0]&0x80
m> would be a test to catch both.


        I'm not sure I follow you but the highest bit normally
distinguishes between a key "press" and a key "release":

	up_flag = (keycode & 0x80);
	keycode &= 0x7f;
-- 
Gregorio Gervasio, Jr.
gtgj@pacbell.net



Reply to: