How to remove the "paste" feature of the middle button?

I am not asking to remove the middle button from the device (as many pages show as a solution) because I use this middle button for several operations like opening a tab on firefox, or whatever else.

Just to remove the "paste" operation by default.


Middle button is easy to press by mistake, and for a programmer, this kind of error could easily carry 2h looking for strange bugs, or worse, a crash 2 weeks later, or even worse, a comment in code with personal information, etc..

I am pretty fast to use Ctrl+V, so I do not need this dangerous feature.

Additional information:

I am currently using Linux OpenSuse with KDE. The version does not seem important, but I could provide it if requested.

  • There is no global setting, each application decides what it does with the middle button. Pasting is a convention, not a system feature. Commented Dec 19, 2015 at 22:00
  • 1
    P.S. If you find yourself pressing the middle button by accident, get a better mouse. You can find a decent mouse for about $5. Commented Dec 19, 2015 at 22:01
  • 1
    @Gilles: I have a quite decent mouse, this is not the problem. My fingers are the problem: as a human, I am not perfect, I make typos while writing and some times, I also click by mistake or in the wrong place. I just found this "convention" stupid from a user perspective. Like the Alt+right-click to resize in kde. I could probably explain why, but that would not fit in a comment. Thanks for your comment :-) Commented Dec 20, 2015 at 17:56

1 Answer 1


this could do the trick:

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

source: http://jaredrobinson.com/blog/howto-disable-middle-mouse-paste-in-linux/

  • 1
    "I am not asking to remove the middle button" It actually remove the middle-button pasting, but also remove the middle-button from any other gesture or use. Commented Dec 18, 2015 at 17:38
  • my mistake, i misread. I thought you used a wheel as a third button... did you try that ? wiki.mbirth.de/know-how/software/linux/…
    – dervishe
    Commented Dec 18, 2015 at 18:34
  • I will have a look, possibly some of those tricks can help :-) Is still consider this feature should be something easier to configure. Commented Dec 18, 2015 at 22:02

Not the answer you're looking for? Browse other questions tagged .