[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg
Subject:    Re: On Linux kernel / X keycodes
From:       Peter Hutterer <mailinglists () who-t ! net>
Date:       2007-12-30 5:39:31
Message-ID: 47772C43.6070609 () who-t ! net
[Download RAW message or body]

Dmitry Dzhus wrote:
> Some of the extra keys on my keyboard get really high *kernel* keycodes,
> like 418 or 432.
> 
> Does `evdev(4x)` pass such high keycodes to X?

no. the server ignores codes outside of the 0-255 range.

> > Where keycodes>255 seem to get lost. How can I use a device producing
> high kernel keycodes in X with `evdev(4x)`? `setkeycodes(1)` doesn't
> allow me to rebind kernel keycode; I've found that a possible solution
> (actually a kludge) is to change builtin kernel keycodes in
> `include/linux/input.h` for problem keys to some lower value not
> colliding with existing keycodes — then X server sees my keypresses
> wonderfully, but that's a dirty hack and I want to find out how X server
> and `evdev(4x)` really deal with kernel keycodes.

the problem is that there's only 8 bits in the protocol. so if you have 
keycodes > 256  you need two+ keymaps. if such a key occurs, you have to 
send a mapping notify to the app first to let it switch to the new 
keymap. that's how I understand it anyway.

it's a bit of a chicken and egg problem. when we get the data (SIGIO 
handling), we can't switch the keymap. on the other hand, when we can 
switch the keymap (event processing), the data is already lost 
(normalised to 256).

Cheers,
   Peter
_______________________________________________
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic