Clipboard selection
Clipboard selection
Posted Apr 5, 2018 10:09 UTC (Thu) by grawity (subscriber, #80596)In reply to: Clipboard selection by eru
Parent article: A look at terminal emulators, part 1
You can actually bind the same keys in xterm via ~/.Xresources:
XTerm*vt100.translations: #override \n\ Shift Ctrl <Key>C: copy-selection(CLIPBOARD) \n\ Shift Ctrl <Key>V: insert-selection(CLIPBOARD) \n\ Shift Ctrl <Key>N: spawn-new-terminal() \n
(If you wanted to do the same in urxvt, you would need to load a perl script into it.)
Posted Apr 7, 2018 11:05 UTC (Sat)
by eru (subscriber, #2753)
[Link]
Thanks! Now I can go back to the One True Terminal Emulator. Only problem is some of that stuff is not supported on older xterm versions. The copy-selection appears in patch Patch #267 - 2010/11/20 (https://invisible-island.net/xterm/xterm.log.html), the RHEL/CentOS bundled ones (which I often need to use) may be older, depending on the particular RHEL version. But on non-ancient distributions your solution works fine.
Posted Apr 17, 2018 19:26 UTC (Tue)
by Ross (guest, #4065)
[Link]
Alt <KeyPress>c: select-set(CLIPBOARD)\n\
If you like to use PRIMARY selections (highlight/middle-click), you might find that alt-spacebar is a convenient way to paste:
Alt <KeyPress>space: insert-selection(PRIMARY,CUT_BUFFER0)\n\
(CUT_BUFFER0 is a fallback there to the old cut buffer system which is useless except it works after the source window has been closed if it supports cut buffers, which xterm does)
Clipboard selection
Clipboard selection
Alt <KeyPress>v: insert-selection(CLIPBOARD)\n\