input-remapper icon indicating copy to clipboard operation
input-remapper copied to clipboard

"Disable while typing" touchpad option not working when using input-remapper

Open Tai-Mai opened this issue 1 year ago • 0 comments

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.

  1. Identify the right keyboard event
    • Run $ libinput debug-events
    • Press a rebound key with the input-remapper preset active
    • Note the eventXY that pops up
  2. Identify the right name
    • Run $ libinput list-devices
    • Find the device with the same eventXY. For me, it was
      Device:           input-remapper keyboard
      Kernel:           /dev/input/event17
      
  3. Create the directory /etc/libinput/
  4. Create the file /etc/libinput/local-overrides.quirks with the following contents:
    [Serial Keyboards]
    MatchUdevType=keyboard
    MatchName=input-remapper keyboard
    AttrKeyboardIntegration=internal
    
  5. Reboot

This fixed "disable while typing" for me.

I'm using Fedora 40, KDE, Wayland on an HP laptop.

Tai-Mai avatar Sep 10 '24 09:09 Tai-Mai