1
1
I want to be able to use both selections in xterm.
I would like selecting text and using middle click to copy and paste to and from PRIMARY
.
I would like Ctrl+Shift+C
and Ctrl+Shift+V
to copy and paste to and from CLIPBOARD
.
With no changes to Xresources
, xterm seems to use PRIMARY
for selection and middle click copy/paste.
I've added the following to my Xresources
:
XTerm.vt100.translations: #override \n\
Ctrl Shift <Key>C: copy-selection(CLIPBOARD) \n\
Ctrl Shift <Key>V: insert-selection(CLIPBOARD)
Pasting is working how I want - I can use middle click to paste PRIMARY
and Ctrl+Shift+V
to paste CLIPBOARD
.
However copying isn't working - whenever I highlight text, it's being copied to both PRIMARY
and CLIPBOARD
.
How can I achieve what I want?
Details: Ubuntu 17.04, xterm version 324
You're probably getting caught by this line:
<BtnUp>:select-end(SELECT, CUT_BUFFER0) \n\
– Thomas Dickey – 2017-12-22T22:47:53.497@Tom Did you figure it out? I can reproduce the issue. – finefoot – 2018-06-18T21:16:59.177
@ThomasDickey Wouldn't this only be the case if
selectToClipboard: true
and thereforeSELECT
=CLIPBOARD
? – finefoot – 2018-06-18T21:24:36.973no - if he'd set selectToClipboard true, then both calls would go to CLIPBOARD – Thomas Dickey – 2018-06-18T22:31:54.973
@ThomasDickey Okay, but why would
SELECT
beCLIPBOARD
then? Why does the line matter, which you quoted above? :-/ – finefoot – 2018-06-18T23:36:37.963His example does that, without using
SELECT
. My comment pointed out where the program was copying toPRIMARY
. – Thomas Dickey – 2018-06-19T00:01:04.787@ThomasDickey So as soon as a selection is being made, there is no way to circumvent it being copied to
PRIMARY
? Using an empty parameter<BtnUp>: select-end()
did copy it as well. – finefoot – 2018-06-19T05:56:58.540@ThomasDickey Actually, adding
<BtnUp>: select-end()
to OP's code does make it not copy toPRIMARY
at first (with selecting only), butCTRL+SHIFT+C
still seems to copy to bothCLIPBOARD
andPRIMARY
. – finefoot – 2018-06-19T06:10:37.197Unfortunately I never found a solution, instead I have scrapped xterm in favour of termite, where this problem doesn't exist. – Tom – 2018-06-19T09:04:46.047