Ubuntu – How to disable physical mouse buttons below touchpad

mousetouchpad

I'd like to disable the two click buttons below my touchpad because the right one keeps activating randomly. I've read doc about synaptics and synclient, and using xmodmap as suggested in Disable touchpad hardware buttons doesn't work because it also disables my usb mouse buttons.

Any help?

Thanks in advance

Best Answer

Ok, as described in https://unix.stackexchange.com/questions/156949/how-to-keep-the-touchpad-but-want-to-deactivate-the-buttons, it's possible to deactivate the hardware buttons in a laptop using xinput. The basic steps are the following:

  1. Get the name (or id) of your touchpad

    xinput list
    
  2. With that name (or id) you can disable you touchpad totally like this,

    xinput --disable 12
    

    being 12 the id of your touchpad, or you can disable only some buttons, using

    xinput list --long 12
    

    to get a map of the different buttons and then the option --set-button-map to remap them. For example,

    xinput --set-button-map 12 0 0 0 4 5 6 7 8 9 10 11 12
    

    disables the first three buttons in my touchpad, that is, left, center and right.