[oe] [patch commit request] kdrive xserver: support for key codes 128-255

Stanislav Brabec utx at penguin.cz
Sun Feb 10 21:33:47 UTC 2008


On Sat, 09 Feb 2008 07:00:34 -0600 Junqian Gordon Xu wrote:

> On 02/03/2008 03:57 PM, Stanislav Brabec wrote:

> > It adds support for key codes 128-255 in general.
> 
> I understand this patch is general. But could you educate me that
> except for the Z clamshells, what's the use case for other devices? I
> guess my question is more in line with Paul's challenge. Is this
> patch just a why-not for other devices or something might be helpful?

Many devices have special keys with (input.h) keycodes outside 1-127
(e. g. Mail - KEY_MAIL).

Now you have to map them to a random keys from range 1-127, otherwise
it will not work. In particular it invalidates key interpretation in
the kernel - kernel knows, that the key is Mail and not F11 but it has
to send KEY_F11, because KEY_MAIL is lost.

Even after this patch the situation will not be ideal - for example
KEY_OK has keycode 352 and cannot pass through X11 protocol. That is
why it is only a partial solution. Final solution could be: upgrade to
X12 (rewrite X and give up 20 years of compatibility; in proposal
collection stage) or at least write X Evdev Extension and Xlib keyboard
code rewrite (simpler to implement, but not yet started to work on).

The opinion of kernel people: We have a good and modern keyboard
layer, which can provide exact key meaning. We don't want to be limited
to 1-127 and mangle our keycodes. Let userspace fix their broken
drivers.

And hardware manufacturers don't make things easier. Many USB keyboards
identify themselves as devices including keys defined in the HID
standard (it allows them to recycle the same chip).

-- 
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus




More information about the Openembedded-devel mailing list