---- Wiadomość Oryginalna ---- Od: David Dawes <[EMAIL PROTECTED]> Do: [email protected] Data: Thu, 6 Jan 2005 12:57:06 -0500 Temat: Re: Tracer TRK 21 MTS mm kbd - patches
> On Thu, Dec 30, 2004 at 03:00:19PM +0100, Radoslaw Warowny wrote: > >Hello again ! > > > >After some development I made few patches for xfree86 source code to > >allow succesfull use of the Tracer TRK 21 MTS multimedia keyboard. > >My environment is Athlon x86 PC, linux Debian sarge - xfree86 4.3.0. > >The first two patches modify keyboard handling of XFree86 server. > >This makes the additional 0xe2 codes sent by the keyboard to be ignored. > > That code is currently (4.4.0 and later) passed up to the DDX, and there > seems to be at least one keyboard mapping that makes use of it. Filtering > it out like this would be a problem for that case. Is there perhaps a > more context-specific way that you could handle this? > > David > _______________________________________________ > Devel mailing list > [email protected] > http://XFree86.Org/mailman/listinfo/devel > My patch should filter only the first E2 scancode (not prefixed with E0 or other). The workaroud provided by this should be safe at least for 4.3.0, becouse without it the E2 scancode is wrongly passed as "Insert" key event by xf86PostKbdEvent and it shouldn't be able to be handled by any keyboard mapping properly. Here is an example of xev output from pressing some multimedia key: KeyPress event, serial 27, synthetic NO, window 0x3400001, root 0x8d, subw 0x0, time 449115, (411,238), root:(419,332), state 0x0, keycode 106 (keysym 0xff63, Insert), same_screen YES, XLookupString gives 0 bytes: "" KeyRelease event, serial 27, synthetic NO, window 0x3400001, root 0x8d, subw 0x0, time 449115, (411,238), root:(419,332), state 0x0, keycode 106 (keysym 0xff63, Insert), same_screen YES, XLookupString gives 0 bytes: "" KeyPress event, serial 27, synthetic NO, window 0x3400001, root 0x8d, subw 0x0, time 449120, (411,238), root:(419,332), state 0x0, keycode 234 (keysym 0x1008ff26, XF86Back), same_screen YES, XLookupString gives 0 bytes: "" KeyRelease event, serial 27, synthetic NO, window 0x3400001, root 0x8d, subw 0x0, time 449227, (411,238), root:(419,332), state 0x0, keycode 234 (keysym 0x1008ff26, XF86Back), same_screen YES, XLookupString gives 0 bytes: "" KeyPress event, serial 27, synthetic NO, window 0x3400001, root 0x8d, subw 0x0, time 449230, (411,238), root:(419,332), state 0x0, keycode 106 (keysym 0xff63, Insert), same_screen YES, XLookupString gives 0 bytes: "" KeyRelease event, serial 27, synthetic NO, window 0x3400001, root 0x8d, subw 0x0, time 449230, (411,238), root:(419,332), state 0x0, keycode 106 (keysym 0xff63, Insert), same_screen YES, XLookupString gives 0 bytes: "" The "Insert" key event is generated becouse xf86PostKbdEvent is passing the value: (0xE2 & 0x7F) + 8 = 106 (The 8 is from MIN_KEYCODE definition) which is accidently equal to "Insert" keycode. I didn't test the keyboard with xfree86 4.4.0 becouse debian still uses 4.3.0, still I will try to install and test it with the newer version. I don't know if it is right for naming the E2 scancode "Prefix" till I really don't know function of this code. I have read a little about keyboard protocol specifications and didn't find anything about E2 scancode. It would be good if somebody would provide some information about this. It would help for writting support for such kind of keyboard. The xf86PostKbdEvent function seems to be good place to add support for the keyboard, but maybe there is other - better one ? I am not too familiar with xfree86 source code, so any suggestions welcome. I will provide additional information when I test the keyboard with XFree 4.4.0. Regards, Radek. _______________________________________________ Devel mailing list [email protected] http://XFree86.Org/mailman/listinfo/devel
