Hi Werner, On 5-Mar-25 1:18 PM, Werner Sembach wrote: > Hi Dmitry, > > Am 05.03.25 um 07:54 schrieb Dmitry Torokhov: >> Hi Werner, >> >> On Mon, Mar 03, 2025 at 08:04:34PM +0100, Werner Sembach wrote: >>> In the default xkeyboard-config used by both X11 and wayland touchpad >>> toggle is assigned to F21. >> We have dedicated KEY_TOUCHPAD_TOGGLE that is being used by several >> platform drivers: >> >> dtor@dtor-ws:~/kernel/work $ git grep -l KEY_TOUCHPAD_TOGGLE -- >> drivers/platform/x86/ >> drivers/platform/x86/acer-wmi.c >> drivers/platform/x86/asus-laptop.c >> drivers/platform/x86/asus-nb-wmi.c >> drivers/platform/x86/eeepc-wmi.c >> drivers/platform/x86/fujitsu-laptop.c >> drivers/platform/x86/ideapad-laptop.c >> drivers/platform/x86/msi-wmi.c >> drivers/platform/x86/toshiba_acpi.c >> >> Instead of piling on F21 hacks we should be using it. > Afaik KEY_TOUCHPAD_TOGGLE is not implemented in userspace, but a patch for xkeboard-configs could probably be enough to change that ... have to look into it. Quoting from the other reply in this thread I just send (our email crossed): Werner, we were using F21 in the past because we could not use evdev keycodes >= 248 (256 - 8 modifier keys) because of Xorg limitations. But recently the mapping of things like KEY_TOUCHPAD_TOGGLE / KEY_TOUCHPAD_ON / KEY_TOUCHPAD_OFF to F2x keys has been moved to xorg-x11-drv-libinput which gets the full range key-codes from libinput and can then do this mapping before passing the keys to the X-server. So it is no longer necessary to use KEY_F21 and even in the past we used to do the mapping in udev / hwdb rules not in the kernel in the kernel we've always (with a few exceptions which are my fault) used KEY_TOUCHPAD_TOGGLE as that is the correct keycode. Regards, Hans