Linux Lite Forums

Software - Support => Other => Topic started by: Sprintrdriver on May 26, 2019, 08:42:06 AM

Title: Middle mouse button paste text, can I disable?
Post by: Sprintrdriver on May 26, 2019, 08:42:06 AM
Whenever the mouse pointer hovers over a text field in a web browser or any local installed program (text editor) - when I hit the middle mouse button, it does a text paste from clipboard.

Can this behaviour be disabled somehow?

I have looking through Mouse and Touchpad settings, but cannot find any relevant options for this.


Thanks in advance
Title: Re: Middle mouse button paste text, can I disable?
Post by: torreydale on May 26, 2019, 01:11:45 PM
@Sprintrdriver ,


This is the default behavior of all Linux based operating systems, terminals, and command line interfaces.  The mouse has a "clipboard."  Whatever is last highlighted by the mouse is copied and you can paste from that "clipboard" by clicking on the right mouse button or in this case, the middle mouse button.  As I said, it is default in Linux based operating systems, and as a network engineer, I have seen the same behavior in the command line interface of routers, switches, and firewalls.  I do not know how to turn it off.  Maybe someone else here will.


The following is taken from the Linux Mint User Guide at https://www.linuxmint.com/documentation/user-guide/Cinnamon/english_18.0.pdf (https://www.linuxmint.com/documentation/user-guide/Cinnamon/english_18.0.pdf)

Copy and paste with the mouse
Most people are used to clicking on the “Edit” menu or to right clicking on the content they want to copy. In Linux Mint you can do this as well, but most GNU/Linux operating systems also let you copy and paste content from the comfort of your mouse. Here's how it works: The left button of the mouse copies and the middle button pastes. It's as simple as that! Let's give it a try. Launch LibreOffice Writer or a text editor, or any application of your choice that lets you input text. Now type a few sentences. Select some of the text you just typed with the left button of your mouse. Think you need to click on the “Edit” menu and press “Copy”? No? Bet you're thinking you would use a combination of keys on your keyboard such as “CTRL+C”. In Linux, it is much simpler. Just by selecting the text, you've already copied it. That's right... that text is now copied to your “mouse buffer” and you don't need to press anything else.

Now click on some other part of the document to move the cursor there and click the middle button of your mouse (or the wheel-click if you have a mouse with a wheel, or both the left and right buttons together if your mouse only has two buttons... everything's been thought of, apart from those weird Mac mice with only one button). As you can see the text you previously selected has now been pasted. The more you get used to this the faster you'll get at copying and pasting content. This technique also works on most Unix and GNU/Linux operating systems.
Title: Re: Middle mouse button paste text, can I disable?
Post by: Sprintrdriver on May 26, 2019, 08:28:33 PM
torreydale - thank you very much for that answer. To be hones I didn't know that one trick.

It seems to be a very useful Linux feature, and I totally change my mind now that I know what it does - I will have it there :)