twin
twin copied to clipboard
Mouse selections & Clipboard
I'm very curious what is so special TWIN is doing to disable copy/paste selection via mouse to the system clipboard ?..
- I'm running TWIN within a text terminal (iTerm2 or mrxvt or Konsole, etc.)
- I can select a text from any TWIN window and paste it any TWIN window via mouse..
- I can as well paste to any TWIN window a text from my system clipboard via Terminal key shortcut..
- however, until TWIN is active within my Terminal window, I cannot get any selected text from this Terminal to appear back in clipboard..
- while as soon as I "Detach" WMN from the Terminal, I can select any Terminal text back to the clipboard again..
so, what is so special TWIN is doing in the window to block the system clipboard ?..
currently the only workaround I found to paste the selected text to my clipboard is to detach TWIN, select what I need, see it appeared in my clipboard, then re-attach TWIN again.. -- but this is rather looking dumb ;-))
so :
- is there any way to "allow" mouse selections from Terminal ?..
- or also enable the text selection to be copied to the clipboard too ?..
and as a side note : will be great also to allow a "Paste" action to be involved via Key combinations (not only via mouse button)..
Thanks a lot for your help !
Rgds, -Dimitri
Hello Dimitri,
It's a side effect of asking the terminal emulator (iTerm2 or mrxvt or Konsole, etc.) to report mouse events, as stated here: http://unix.stackexchange.com/questions/139578/copy-paste-for-vim-is-not-working-when-mouse-set-mouse-a-is-on The solution suggested there is to keep SHIFT pressed while selecting text. I tried it with twin running inside xterm, xfce4-terminal and gnome-terminal and it works for me: I can paste into other X11 applications :)
Let me know if this solves your problem, or you still have difficulties
Regards, Max
Hi Max,
many thanks to pointing me to this article !!!
what is curious - I was already seen this article before while looking for a solution, but as holding SHIFT did not make any difference, I moved on to other articles.. -- however, this time you confirmed that SHIFT is working for you, and this involved my curiosity more deeply ;-) so, reading the article more attentively, I found a small comment mentioning that for MacOSX users the SHIFT will not work, but ALT will !.. -- and yes, I can confirm, ALT is working pretty well ! - and this is really making things much more simple ;-))
however, there are still 2 painful things:
- with ALT the Terminal driven mouse copy is involved, and Terminal has no idea about TWIN windows ;-) so if more than one line should be copied, it'll copy all the left & right parts of the screen too (out-passing the window limits).. -- workaround: switch a needed window into "full screen" size, do a copy, then bring the window back to its previous size
- with "native" TWIN mouse copy: unfortunately TWIN is not adding "new line" when selection is covering more than 1 line, so selecting 10 lines for ex. will result in one single line containing all 10 chunks inside.. -- so, once pasted, you then need yet to re-edit it again.. -- any workaround for this ?.. (except to copy lines one by one ;-))
And thanks again for such a great software !.. more I use it and more I enjoy ;-))
Rgds, -Dimitri
Hello Dimitri,
the two issues you point out are very real... I experienced the second one several times, and I met the first one yesterday when trying the SHIFT+select trick.
Unluckily I have no solution or workarounds to suggest at the moment :(
Max
Hello Max,
seems like the most "usable" workaround is to switch a given window to FullScreen and select with SHIFT/ALT via Terminal mouse..
however, what still remains painful is that there is no simple way just to switch back from FullScreen to the previous window position ;-)
my current workaround is:
- assign a key for FullScreen action
- assign a key for Resize x y (where x & y some values I'm using mostly in my terminals)
- so by a simple shortcuts I can switch to/from FullScreen from/to "normal" size
- however, when switching back from FullScreen mode the window remains in the top left corner position, with a title hidden by Menu..
- so the "Resize Back" shortcut is calling a function then to (Move +1 +1; Resize x y; )
- then all remains "usable" ;-)
what would be great instead is just to have "Toggle" option for FullScreen and Maximize (e.g. "remember" the initial window size & position before FullScreen/Maximize was involved -- this would be really cool ;-))
will add you this as an "enhancement" for future improvements ;-)
Thanks a lot !!
Rgds, -Dimitri