Ubuntu – Making Ctrl+C copy text in gnome-terminal

clipboardgnome-terminal

Is it possible for me to make Ctrl+C perform a copy command if there is highlighted text in the terminal?
Otherwise, it should retain its normal behavior.

(If there is a terminal that can do this other than gnome-terminal, that's probably fine too.)

Best Answer

You can change the keybinding for Cut and Paste from the default Ctrl+Shift+C, Ctrl+Shift+V to what you say, namely Ctrl+C, Ctrl+V, in the Edit → Keyboard Shortcuts menu. Though you should also change the default terminal meaning associated with Ctrl+C (interrupt), for example in this way

stty intr ^J

(I chose Ctrl+J because I don't remember it is associate with some action, but you can make your own choice.)

I don't think it is possible to retain the default interrupt action for Ctrl+C only when there is no text highlighted.