Adding a single keycode to the existing XKB configuration
1
vote
0
answers
207
views
I have a MECHREV laptop, /sys/class/dmi/id/product_name "Jiaolong Series GM5ZG0O". Its keyboard has a button for toggling trackpad on/off. However this key emits keycode 93 which is not mapped to anything in /usr/share/X11/xkb/keycodes/evdev which is the auto-configuration Xorg chooses.
I don't want to modify this file because I'm going to lose these changes when xkeyboard-config gets updated by the package manager. However I would like my changes to be permanent and system-wide.
Ideally i'd like to have additional local configuration, something like this:
/etc/X11/xkb/keycodes/touchpadtoggle
default xkb_keycodes "touchpadtoggle" {
= 93;
};
/etc/X11/xorg.conf.d/touchpadtoggle.conf
Section "InputClass"
Identifier "Touchpad Toggle Key"
MatchIsKeyboard "on"
MatchProduct "AT Translated"
Option "XkbKeycodes" "+touchpadtoggle"
EndSection
This doesn't work, probably for multiple reasons:
- Xorg does not seem to look in /etc/X11/xkb for configurations
- The "+touchpadtoggle" syntax is probably invalid
Is this at all possible? Or is there another way to add a single key to the keymap without creating my own layout from scratch?
Asked by SnakE
(151 rep)
Oct 8, 2022, 11:41 PM