5

I'd like to have different configurations for my laptop's builtin keyboard and the USB keyboard I attach and use at work.

Using Gnome's setup tools I've arrived at the following /etc/X11/xorg.conf.d/00-keyboard.conf:

Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "us,se"
        Option "XkbModel" ","
        Option "XkbVariant" "caps:swapescape"
EndSection

Since the other keyboard has a completely different layout I don't want the caps:swapescape, so I added /etc/X11/xorg.conf.d/50-typematrix.conf:

Section "InputClass"
        Identifier "TypeMatrix Keyboard"
        MatchProduct "TypeMatrix.com USB Keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "us,se"
        Option "XkbVariant" ","
        Option "XkbOptions" ""
EndSection

(The value for MatchProduct matches what xinput lists my USB keyboard as.)

However, this doesn't have the desired result; both keyboards still end up with exactly the same configuration.

Is there some way to achieve what I want?

1
  • 1
    GNOME's keyboard plugin will gladly steamroll over any device-specific settings, and the ability to disable it was removed a while back. Jun 20, 2018 at 17:02

1 Answer 1

3

You can add the following to your USB keyboard section, this way that section will apply to your specific USB device only:

MatchUSBID "1e54:2030"

You can get the correct USB id of your TypeMatrix keyboard by doing lsusb.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.