My touchpad has momentum enabled (or inertia, I do not know what the correct term is) - that is, even after my fingers leave the touchpad, it continues scrolling and gradually slows down (I believe it is a feature of every touchpad). However, in my Linux Mint Cinnamon, even in the momentum of the touchpad, Ctrl works, and often, when I use Ctrl right after scrolling, it suddenly zooms in or out, as Ctrl + scrolling changes zoom. How can I fix this such that Ctrl will not act upon the touchpad's momentum?
This is since coasting has been implemented in the libinput drivers, ostensibly to improve usability, but with side effects (originating in the translation to X11 events) that you are experiencing.
Increasing the coasting friction can help with the issue. This works by killing the scrolling much faster after your fingers leave the touchpad, causing the libinput X11 driver to generate fewer scroll events and making an event-key clash much less likely. If you want to keep some level of coasting, then you may need to play around with the second number after "Synaptics Coasting Speed" below to find one that works for you - higher values stop the coasting more quickly, lower values let it slide for longer.
From the guidance here (and other comments below) I find this fixes the issue for me:
xinput set-prop "16" "Synaptics Coasting Speed" 20.0 50000.0
You will probably need to change the 16 to the ID of your touchpad device, which can be identified by using
And to make the changes persist between sessions, create a file
.config/autostart/fix-scrolling.desktop with the contents:
[Desktop Entry] Name=Fix Scrolling Exec=xinput set-prop "16" "Synaptics Coasting Speed" 20.0 50000.0 Terminal=false Type=Application StartupNotify=false
In the long term, the X11 method of representing scroll events as discrete key presses should become less of an issue as more distributions shift to supporting Wayland or other modern "seat" architecture.