Cut and Paste - Windows vs Linux

Everyone pretty much knows that in Windows you highlight what you want to copy with your mouse, hit Ctrl-c to copy then Ctrl-v to paste. Although this is great, it’s even easier in Linux!

In Linux, you highlight what you want to copy with your mouse, and then just middle click on you mouse to paste. No need to use the keyboard.

There might be a few exceptions to this, like you’ll need to use Ctrl-v for pasting your password into the Steam client.

I realized watching a video Jason posted yesterday that some people weren’t aware of this, thus the post. :slight_smile:

5 Likes

Another thing.

To paste something into (most) terminal emulators, you can use CTRL+SHIFT+V.

7 Likes

Neat , however if you’re used to ctrl+c, ctrl+v I’m not sure there’d actually be any time saved doing it this way.

Sure there is, if you need to one-hand it for some reason.

I quite often use the ctrl+shift+v etc, especially when in the command line. Having to move my hand to the mouse just to cut and paste takes longer.

I totally prefer the keyboard.

But yes, middle click is cool, too.

1 Like

I know this is an old thread, but I just had to add a bit of explanation to this:

XWindows has a PRIMARY selection and a CLIPBOARD selection.

PRIMARY is the text that is “selected” on the screen. Only one application can own the PRIMARY selection at any given time. If you select in another window, the selection in the first window disappears. Once you’ve selected text, it goes into the PRIMARY selection. If you click somewhere and release the selection, the contents of PRIMARY are still available to middle-click as long as nothing else has been selected, as that would replace the contents of PRIMARY again.

If you press Ctrl-C, the currently selected text is copied to CLIPBOARD. (It also ends up in PRIMARY, because you had to select something to copy.)

When you middle-click, X is taking PRIMARY and pasting it wherever you middle click. This does not affect the CLIPBOARD.

If the PRIMARY selection is empty when you middle-click, X will paste the contents of the CLIPBOARD.

When you press Ctrl-V, X will paste the CLIPBOARD selection to where your cursor is.

You can select something, copy it, select something else, then alternate between Ctrl-V and middle-click to see that your CLIPBOARD is unmodified.

I’ve also left out the parts relating to things other than text in a CLIPBOARD. (Images, files, etc)

(Also, when I say XWindows and X above, I probably mean the X client (the application), not the X server, as it’s probably the X client that is implementing the copy/paste logic. This means that everything above could be different for non-compliant applications. There is also a SECONDARY selection, but I haven’t seen where this is used. The selections are in CAPS because this is how it is defined in the X11 Protocol.)

1 Like

While you are correct this is true . . . I hate middle click pasting. It gets in the way often and is more annoying to me than useful.

2 Likes

Well, I’ve rarely ran Windows full time since really NT, so ya. I kinda got used to using the middle mouse button for pasting. :wink:

I use the middle click for so many things that most of the time the middle click paste is just a nuisance to me. For example, I have custom settings for my desktop to use a different menu on middle click, middle click to open links and pasting urls is infuriating when I just want to click a link. :smiley: