mlterm
mlterm copied to clipboard
Proper keyboard shortcut for copying content to CLIPBOARD
C-<insert> can be used to copy the selected text into the CLIPBOARD as expected but also prints ^[[2;5~ to the terminal which is annoying.
urxvt and xterm also do this, so I guess this is intentional?
Anyhow, it'd be very useful to have a proper C-c-like shortcut for copying text to CLIPBOARD, preferably configurable.
Related #19
By default, mlterm copies the selected text into not only the PRIMARY but also the CLIPBOARD by selecting text without pressing
C-
I see, thank you.
mlterm doesn't provide a way which copies the selected text into the CLIPBOARD without modifying the PRIMARY.
Which makes sense when you think about it because, even if it had a key for that, you still couldn't do that because you'd always have to select the text before copying it anyways.
Copying previously highlighted text after you copied text in another application would be a case where that doesn't apply but mlterm deselects highlighted text when another application takes control of the clipboard. That makes perfect sense in this model but is also a bit odd and unusual (most other programs and terminal emulators don't behave like that).
I generally have problems with shortcuts: Shift-Control-Return - does the same as Return/Enter Ctrl-shift-c is breaking editing the current line as ^C and it is the only way how to copy into clipboard Ctrl-insert prints ~5 or what Shift-inserts properly the content of clipboard
Am I doing something wrong? It is quite unusable this way... Unfortunately...
I have installed lxterminal recently and it is not doing it. Properly works - ctrl-shift-C/V. I would recommend to copy their code if possible and afterwards to thank them a lot for the inspiration - of course. :-)
jk
As @arakiken mentioned, there currently is no copy shortcut because mlterm always copies selected text. If you select some text, it's already "copied".
I'm personally of the opinion that this goes against the principle of least surprise because, ordinarily, programs put selected text into PRIMARY and only put text into CLIPBOARD upon pressing a specific "copy" shortcut.
Dear Atemu, I will try to demonstrate:
jk@T430:~$ : I want to copy this: "SELECTION"
jk@T430:~$ : I am editing this line, selecting SELECTION, pressing ctrl+shift+c ^C
jk@T430:~$ : Editing is broken, but in the clipboard is:
jk@T430:~$ xsel -b -o # this is in the cliboard
"SELECTION"
I do not want to have my editing broken after ctrl+shift+c. I want mlterm only to copy SELECTION. Is it clear? :-)
Thanks
jk
Dear Atemu,
I finally understand the idea.
mlterm is continuously changing my clipboard whenever I only select some text. It is a big surprise to me. Now I see this strange behaviour:
If I do some work in Libreoffice, copy with CTRL-C into clipboard say "LibreofficeSelection", then I go into mlterm. I can paste LibreofficeSelection by shift+instert. This is ok. I select something say "mltermSelection" then it disappears in LibreofficeSelection, I can paste in mltermSelection in mlterm, but i cannot paste nothing in Libreoffice: either LibreofficeSelection no mltermSelection, as it was errased by selecting in mlterm.
It is very curious behavior. Do you intent it should behave like that? JK
Thanks for your report. I fixed this issue. -> https://github.com/arakiken/mlterm/commit/f275093173892e05254da50b2e95b0a68926b972
mlterm doesn't change clipboard by selecting text unless Shift+Control+c is pressed. In addition, pressing Shift+Control+v pastes text from clipboard. These shortcut keys are configurable in ~/.mlterm/key. (See https://github.com/arakiken/mlterm/commit/f275093173892e05254da50b2e95b0a68926b972#diff-9442419d3f753347a514b3af47087210c95a76a2a575751fae17b03db8a5c33b )
Thank you, Arakiken & Atemu,
nice piece of code... :-)
JK