Im am using Elementary OS on a laptop and clicking in the middle of the trackpad's buttons would trigger a middle click. I would like to disable that.

  • This answer on askubuntu worked for me.
    – xendke
    Commented Sep 15, 2016 at 0:41

1 Answer 1


Running the following command in the terminal could solve this:

xmodmap -e "pointer = 1 25 3 4 5 6 7 8 9"

To make this persistent, edit your ~/.Xmodmap with a text editor either from the terminal:

nano ~/.Xmodmap

or with a graphical text editor:

open files --> go to your home directory --> open .Xmodmap (a hidden file) with a right click in "Scratch" or another text editor. If the file doesn't exist, create a new file with the name .Xmodmap

and add this line

pointer = 1 25 3 4 5 6 7 8 9
  • Be great if I could remap middle click to left click instead of disabling it. Commented May 17, 2017 at 2:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.