Projects and resources (En) => Tips and tricks => Discussion démarrée par: Taco.22 le 16 janvier 2013 à 05:49:46

Titre: Copy/paste the Linux way
Posté par: Taco.22 le 16 janvier 2013 à 05:49:46
The x-server has a built in copy/paste function that uses the primary clipboard.  Yes, Linux has more than one keyboard - the primary doesn't use the C + V functions.

To copy text to the primary clipboard just highlight the required text with the left mouse button down.  Don't close that application yet though.  To paste simply press the middle mouse button at the desired point in your document.  You can also use the key command of Shift+insert*.  Voila!!  Copy and paste.  This also applies to terminal emulators, so you can copy and paste between terminals and gui apps with ease.  The primary clipboard is for text only.

By using the primary keyboard commands you then have two clipboards to play with at once.  Primary executes the process described and clipboard (as every one knows it) does C + V.  Put the two together and the power of Clipboard is more than doubled! 

(* - key command may not work out of some browsers)
Titre: Re : Copy/paste the Linux way
Posté par: melodie le 16 janvier 2013 à 18:58:39

In some consoles you can do copy+paste with "Ctrl+Shift+c / Ctrl+Shift+v" and also I have been told there are really three clipboards but I get lost there, and it becomes a bit confusing for me.
Titre: Re : Copy/paste the Linux way
Posté par: Taco.22 le 17 janvier 2013 à 00:02:39
Sakura is one terminal that uses the Ctrl+Shift+c / v command.

Just to confuse you further the third clipboard is known as the Secondary clipboard!  However it doesn't feature much.

The good thing is that the primary behaves pretty reliably across all areas.

Citation de: melodie in another thread wrote:
If your blinking cursor is at the prompt down the console, then you highlight what you want to copy and then middle-click it it will be pasted directly into the prompt of the console.

That's neat - tried it and it's cool!