Configure mouse middle click

The “middle mouse button paste” behavior of X11 can lead to posting unwanted text in a document when you’re simply trying to scroll through it.[...]lity-in-all-programs


Disable Linux middle-mouse button paste in Terminal:

xmodmap -pp

Telling the active mouse button function indices. The second number is apparently the middle mouse button function, which we will map to an unused index. Example output of xmodmap -pp:

There are 10 pointer buttons defined.
Physical Button      Button Code
1                    1
2                    2
3                    3
4                    4
5                    5
6                    6
7                    7
8                    8
9                    9
10                   10

Edit /.Xmodmap – swap the last number with the second number. Keep a backup of your original /.Xmodmap file if one existed. For the example above, edit and save:

 pointer = 1 10 3 4 5 6 7 8 9 2

Finally, logout / login

the middle-mouse paste should be disabled, while you are still able to use the middle mouse button to scroll.


Right Click on Desktop → Configure Desktop and Wallpaper… → Mouse Actions and changed from Paste to Standard Menu, or simply deleting it altogether.


about:config → middlemouse.paste → false