Preventing false mouse double-clicks under linux

Newer versions of Kubuntu are missing the advanced mouse options which let you debounce the mouse

sudo apt install xserver-xorg-input-evdev
sudo mkdir -p /etc/X11/xorg.conf.d

Then edit /etc/X11/xorg.conf.d/xorg.conf

and append:

Section "InputClass"
    Identifier "evdev-mouse"
    MatchIsPointer "yes"
    Driver "evdev"

You may have to reboot at this point

xinput --list           # find the id of the mouse (e.g. 10)
xinput --list-props 10  # list the properties of this id
xinput --set-prop --type=int --format=32 10 286 20 # set debounce of ID 10 to 20 (can go up to 50 if need)
xinput --list-props 10  # repeat and see last item is KP0 (286):      20

Test out this value and see if it works.

If it does then create the file /usr/share/X11/xorg.conf.d/12-evdev-debounce.conf to make the change permanent

Section "InputClass"
 Identifier "evdev pointer debounce"
 MatchIsPointer "on"
 MatchDriver "evdev"
 Option "DebounceDelay" "20"