Terminal insert A B C D on shift+arrows. Solution?

I've found a workaround to copy text from gnome-terminal. It is via screen. Credit goes to this answer

  1. Type screen in the terminal

  2. Press Ctrl-A-[ to Enter the copy mode

  3. Move your cursor to the desired start location.

  4. Hit Enter to start copying.

  5. Press and hold or key to select text

  6. Hit Enter again to stop copying.

  7. Then move your cursor the the location you want to paste.

  8. Press Ctrl-A-] to paste the text.

For a more complete screen tutorial, see this page.


OK, here is some historical background. Terminal comes from times from before the ubiquity of the ctrlC and ctrlD shortcuts. In fact, ctrl-C has already had a meaning for a very long time: in a terminal, it is used to interrupt the current foreground process in a terminal. And Ctrl-D is for sending EOF (end of file).

See for your self; start a program that would take a lot of time and produce a lot of output, such as find /, and press Ctrl-C to interrupt it. Start a program that expect some input, such as cat > testfile.txt, type some text, and then press Enter (for newline) and Ctrl-D such that the program thinks "end of file, fine" and exits.

Moreover, copy and paste could (and can) be achieved in X in a much simpler way. The moment that you have selected any text with your mouse – just selected, no keys pressed – it has been copied to the X clipboard. Whenever you now press the right mouse button, without any keyboard shortcut, the text will get pasted. No need for shortcuts at all. This works not only in terminal, but also in other programs – try it!

However, you cannot use this method to copy anything other than simple text; to copy graphics, files etc. you need ctrl-c and ctrl-v.

Nonetheless, to achieve some compatibility with the modern dogma, you can use CtrlShiftC and CtrlShiftV in a terminal.


I'm pretty sure this is default behaviour; it happens on my terminal, too. But you can select text with the mouse and then paste it by center-clicking. This means clicking both the left and right buttons at once!

If you want to select all the text you can do so under Edit --> Select All. And if you're new to the terminal you can learn more about certain programs with the man command. For example, man script should give information about a session-recording program that may be interesting to you.

Tags:

Command Line