Just got a new mouse (glorious model o) and I can get double clicks on it (I click once, get two clicks) however I can only get it to register two clicks on windows. I've done some research and I'm pretty sure that it is libinput preventing double clicks by default. Is there any way to make it so that it doesn't try to cancel the double clicks? I know for most people preventing double clicks is useful however I want to be able to double click to get higher CPS in Minecraft and I never manage to accidentally get a double click.
- 119,640
- 93
2 Answers
Just reposting the discussion in comments as an answer.
First of, to avoid confusion: OP does not have a hardware button for double-clicks. Rather, the double-click they were referring to is when you tap left mouse button in such a special way so it bounces and causes 2 clicks. I could reproduce it with my mouse too.
This is almost never a wanted behavior, so libinput has a debounce algorithm in place, which detects and discards such bounces. (and just for the record: it works fine with hardware double-click buttons). So OP asked if they can disable it locally.
It is indeed possible via quirk subsystem. Before I go on, I need to quote documentation:
For temporary local workarounds, libinput reads the
/etc/libinput/local-overrides.quirksfile. Users may add a sections to this file to add a device quirk for a local device but beware that any modification must be upstreamed or it may cease to work at any time.Warning: Model quirks are internal API and may change at any time. No backwards-compatibility is guaranteed. Local overrides should only be used until the distribution updates the libinput packages.
So quirks subsystem is not a configuration API. If you have a problem which can be solved with a quirk, the quirk most likely needs to be upstreamed.
With that said, the following code placed at /etc/libinput/local-overrides.quirks file helped the OP to get the bouncing-behavior:
[SINOWEALTH Wired Gaming Mouse]
MatchName=SINOWEALTH Wired Gaming Mouse
ModelBouncingKeys=1
The mouse model name is one from libinput list-devices | grep Device output. For this to work libinput needs to be at least of 1.12.0 version (for OP it worked on libinput 1.15.0).
- 4,810
Another way to do this is to execute the following command in terminal
#!/bin/sh
sudo mkdir -p /etc/libinput
sudo tee /etc/libinput/local-overrides.quirks >/dev/null <<ENDHERE
[Never Debounce]
MatchUdevType=mouse
ModelBouncingKeys=1
ENDHERE
Then Reboot your computer
I found this solution on Reddit: Disable double click prevention
- 41
- 7