Individual keyboard remapping (again)

Florian Echtler floe at butterbrot.org
Fri Oct 29 07:54:12 PDT 2010


Hello again,

On Thu, 2010-10-28 at 16:35 +0200, Florian Echtler wrote:
> The devices in question are those with ID 9 (USB keyboard) and ID 8 (X10
> remote). Could the problem be related to the fact that the X10 remote is
> classified as a slave pointer? Can this be changed?
after some more testing, it looks like I ran into two separate problems
- thanks for the hint, Peter. Dirk Wallenstein's patch fixed the problem
on my work laptop with two regular keyboards, however, I still got the
same issue with my weird remote control.

Depending on the exact model, the remote can send mouse and keyboard
events. So I did some investigation in the kernel driver (ati_remote.c):

    idev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL);
    idev->keybit[BIT_WORD(BTN_MOUSE)] = BIT_MASK(BTN_LEFT) |
        BIT_MASK(BTN_RIGHT) | BIT_MASK(BTN_SIDE) | BIT_MASK(BTN_EXTRA);
    idev->relbit[0] = BIT_MASK(REL_X) | BIT_MASK(REL_Y);

I removed all mouse-related bits, just leaving:

    idev->evbit[0] = BIT_MASK(EV_KEY);

When I now load the driver,
a) xinput list correctly shows it as a slave keyboard, and
b) xkbcomp (patched) now also works as expected.

So I suspect there's some issue with xinput and composite devices. Sorry
that I can't give any more specific details, my knowledge of xinput
internals is very superficial.

Florian




More information about the xorg mailing list