Framework Keyboard Is Not Quirky Enough

As a clumsy writer, one thing I noticed immediately on my Framework 16 was that my mouse cursor was running wild due to the touchpad not being disabled while I was typing. Within Ubuntu one would usually control that using disable-while-typing setting, i.e. something like this:

gsettings set org.gnome.desktop.peripherals.touchpad disable-while-typing 'true'

However, this was already set appropriately on Ubuntu 23.10. Set correctly, but not functioning. After troubleshooting a bit and reading a lot, I sorta had a working understanding. Libinput assumed that Framework 16 keyboard (due to it using USB connection) had nothing to do with the touchpad. Thus, it didn't see any need to disable the said trackpad while someone is using the keyboard.

Fortunately, libinput has a solution for that - quirks. After testing a few things, I decided onto a following definition:

[Framework Laptop 16 Keyboard Module]
MatchName=Framework Laptop 16 Keyboard Module*
MatchUdevType=keyboard
MatchDMIModalias=dmi:*svnFramework:pnLaptop16*
AttrKeyboardIntegration=internal

Device name (MatchName) matches (hopefully) all Framework 16 keyboards (MatchUdevType) and we further limit device (MatchDMIModalias) to only Framework 16 laptops. Whatever survives all that matching will get pronounced an internal keyboard (AttrKeyboardIntegration).

To add that on your system, you can execute something like this

cat << EOF | sudo tee -a /usr/share/libinput/50-framework.quirks
[Framework Laptop 16 Keyboard Module]
MatchName=Framework Laptop 16 Keyboard Module*
MatchUdevType=keyboard
MatchDMIModalias=dmi:*svnFramework:pnLaptop16*
AttrKeyboardIntegration=internal
EOF

PS: If you want to do it for some other laptop, you can get most of the information from sudo libinput list-devices output and to match device, check /sys/class/dmi/id/modalias file.

PPS: There is a merge request for this. Hopefuly, already the next libinput release will have it.

Leave a Reply

Your email address will not be published. Required fields are marked *