Xorg 中具有不同配置的多个键盘

Mag*_*nus 6 keyboard xorg

我希望对笔记本电脑的内置键盘和我在工作中连接和使用的 USB 键盘进行不同的配置。

使用 Gnome 的设置工具,我得到了以下结果/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
Run Code Online (Sandbox Code Playgroud)

由于另一个键盘具有完全不同的布局,我不想要caps:swapescape,所以我添加了/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
Run Code Online (Sandbox Code Playgroud)

( 的值与列出的我的 USB 键盘相MatchProduct匹配xinput。)

然而,这并没有达到预期的结果;两个键盘最终的配置仍然完全相同。

有什么方法可以实现我想要的吗?

noc*_*kin 3

您可以将以下内容添加到 USB 键盘部分,这样该部分将仅适用于您的特定 USB 设备:

MatchUSBID "1e54:2030"

您可以通过执行以下操作获取 TypeMatrix 键盘的正确 USB id lsusb