"Disable while typing" touchpad option not working when using input-remapper
This isn't input-remapper's fault per se but it took some time to troubeshoot until I found the right resource and since it has something to do with input-remapper, I wanted to share my solution here for visibility. If you think this problem isn't too niche, it might be a good idea to document it somewhere in the project?
I'm using input-remapper on my laptop in order to use a custom keyboard layout. As a result, the rebound keypresses are detected as coming from another device than the original, internal keyboard.
In order for the "disable while typing" option to work, libinput has to detect one of the following cases (source):
- The keyboard and touchpad are both “internal” devices (i.e. not plugged in via USB), or
- The keyboard and touchpad IDs match (i.e. their vendor ID, product ID are the same) and can be treated as a pair.
So, the fix is to register the input-remapper keyboard device as internal. The linked source explains how and I'll list my steps here, too.
- Identify the right keyboard event
- Run
$ libinput debug-events - Press a rebound key with the input-remapper preset active
- Note the
eventXYthat pops up
- Run
- Identify the right name
- Run
$ libinput list-devices - Find the device with the same
eventXY. For me, it wasDevice: input-remapper keyboard Kernel: /dev/input/event17
- Run
- Create the directory
/etc/libinput/ - Create the file
/etc/libinput/local-overrides.quirkswith the following contents:[Serial Keyboards] MatchUdevType=keyboard MatchName=input-remapper keyboard AttrKeyboardIntegration=internal - Reboot
This fixed "disable while typing" for me.
I'm using Fedora 40, KDE, Wayland on an HP laptop.