
我希望對筆記型電腦的內建鍵盤和我在工作中連接和使用的 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
由於另一個鍵盤具有完全不同的佈局,我不想要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
( 的值與列出的我的 USB 鍵盤MatchProduct
相符xinput
。)
然而,這並沒有達到預期的結果;兩個鍵盤最終的配置仍然完全相同。
有什麼方法可以實現我想要的嗎?
答案1
您可以將以下內容新增至 USB 鍵盤部分,這樣該部分將僅適用於您的特定 USB 裝置:
MatchUSBID "1e54:2030"
您可以執行下列操作來取得 TypeMatrix 鍵盤的正確 USB id lsusb
。