Wednesday, May 8, 2024
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 20996  / 2 Years ago, sun, february 27, 2022, 11:25:32

I would like to press Shift+Insert
and have that execute a paste from the clipboard (the thing that Ctrl+C copies to) inside of gnome-terminal.



In 13.10, Shift+Insert pastes from the selection buffer (the thing that selecting text writes to). In Libre Office, Chrome, and Firefox, Shift+Insert pastes from the clipboard. I would thus like to configure gnome-terminal to do the same.



I would not like to use Ctrl+Shift+V. EDIT: I phrased this poorly. I would still like to use Ctrl+Shift+V but I did not want people to post that as a solution. The reason why I would like to use Shift+Insert is because a program I use sends the keys Shift+Insert assuming that it will paste.



Unfortunately, in gnome-terminal there is no setting for this under Edit → Profile Preferences → Compatibility, nor is there under Edit → Keyboard Shortcuts.



The only other related post I can find is:
https://askubuntu.com/questions/266096/how-to-restore-proper-x-clipboard-behaviour-shiftinsert-in-12-10
which I think prefers the opposite of what I prefer and is probably happy now with the change.


More From » shortcut-keys

 Answers
0

There is a simple workaround for what you need.




  1. First you will have to install xdotool Install xdotool.


  2. Then launch the Keyboard configuration gnome-control-center keyboard:

    (Go to Shortcuts → Custom shortcuts)



    enter image description here


  3. Click on "+" and add a name like "Paste into terminal" and the command



    xdotool key --clearmodifiers ctrl+shift+v


    enter image description here


  4. Then choose Shift+Insert as the key binding:



    enter image description here




Because of a bug, you will have to logout and log back in so the shortcut can take effect.


[#27746] Tuesday, March 1, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
aciousoun

Total Points: 178
Total Questions: 110
Total Answers: 98

Location: Lithuania
Member since Fri, Sep 4, 2020
4 Years ago
;