0

I have a Linux machine on which I frequently switch between a standard, wireless Logitech keyboard with built-in trackpad, and an "air mouse" with built-in mini keyboard. The keyboard has a Swedish layout and the air mouse has a US layout, and I would prefer not having to change the global layout in X every time I switch.

I have searched extensively and found several similar discussions, all involving setxkbmap -device <device> -layout <layout> as a solution, but no matter how I try that command always changes the layout of both devices.

I'm thinking this might have something to do with the fact that, for some reason, both devices are listed as 'pointer' in xinput -list. Here, device 9 is the Logitech keyboard, and device 11 is the keyboard part of the air mouse.

⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Logitech Unifying Device. Wireless PID:4032   id=9    [slave  pointer  (2)]
⎜   ↳ Usb Compliant device Usb Compliant device id=10   [slave  pointer  (2)]
⎜   ↳ Usb Compliant device Usb Compliant device id=11   [slave  pointer  (2)]
⎜   ↳ MCE IR Keyboard/Mouse (nuvoton-cir)       id=13   [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Power Button                              id=8    [slave  keyboard (3)]
    ↳ Nuvoton w836x7hg Infrared Remote Transceiver  id=12   [slave  keyboard (3)]

Maybe setting the layout of a pointer device is not allowed and thus my attempts to do so default to setting the master layout instead? I don't know.

I did try reattaching my devices to the master keyboard instead, with xinput reattach 11 3, but that just gives me this error message:

X Error of failed request:  XI_BadDevice (invalid Device parameter)
  Major opcode of failed request:  131 (XInputExtension)
  Minor opcode of failed request:  43 ()
  Device id in failed request: 0x17
  Serial number of failed request:  18
  Current serial number in output stream:  19

At this point I'm all out of ideas, and feel like I've exhausted all internet resources, so any ideas, anyone?

1 Answer 1

0

I had the same problem with my Logitech g600 mouse.

I had to make xorg see the mouse as a [slave keyboard]. here is how I solved it:

$ cat /etc/X11/xorg.conf.d/10-evdev.conf

Section "InputClass"
    Identifier "g600 hack"
    Driver     "evdev"

    MatchUSBID  "046d:c24a" # from lsusb
    MatchIsKeyboard "true" 

    Option "IgnoreRelativeAxes" "true"
    Option "IgnoreAbsoluteAxes" "true"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .