sshx icon indicating copy to clipboard operation
sshx copied to clipboard

[BUG] Cannot copy content into clipboard inside web browser

Open DawnMagnet opened this issue 1 year ago • 16 comments

Whether Ctrl+C or Ctrl+Shift+C is unavilable inside browser

DawnMagnet avatar Mar 28 '24 08:03 DawnMagnet

sshx's terminal does not support copy and paste at all, can it be supported?

jack9603301 avatar Apr 29 '24 12:04 jack9603301

Hey, Cmd+C and Cmd+V work for me on macOS / Chrome. Do you know which operating system and browser that copy/paste is unavailable in? I can see if I can reproduce and develop the appropriate change.

ekzhang avatar Apr 29 '24 13:04 ekzhang

Hey, Cmd+C and Cmd+V work for me on macOS / Chrome. Do you know which operating system and browser that copy/paste is unavailable in? I can see if I can reproduce and develop the appropriate change.

Operating system, customized system based on Linux from scratch Browser chromium Wayland environment

Other web pages can be copied normally, and the chat window can also be copied, but the terminal of sshx can not be copied at all, but can be pasted.

jack9603301 avatar Apr 29 '24 14:04 jack9603301

Thanks, if anyone else wants to chime in feel free! So far it sounds the keyboard shortcut is working on macOS but not on Linux.

ekzhang avatar Apr 29 '24 18:04 ekzhang

Thanks, if anyone else wants to chime in feel free! So far it sounds the keyboard shortcut is working on macOS but not on Linux.

When will it be resolved?

jack9603301 avatar Apr 30 '24 17:04 jack9603301

I test it on windows, I can paste commands into the web terminal, but can not copy contents in the web terminal and paste it into other place

xiebruce avatar May 01 '24 00:05 xiebruce

Hi @xiebruce, what is your Windows version and browser version?

ekzhang avatar May 01 '24 00:05 ekzhang

Hi @xiebruce, what is your Windows version and browser version?

Actually I'm using macOS and it works fine, I can paste contents into the web terminal or copy contents out from the web terminal.

And the Windows(x86_64) is installed in parallels desktop on my Mac(Intel cpu), here is the version:

  • Version: Windows 10 Professional
  • Version Number: 22H2
  • OS Internal Version: 19045.4291 image

xiebruce avatar May 01 '24 00:05 xiebruce

Just tested on Windows, Ctrl+C sends a SIGINT and Ctrl+Shift+C opens up inspect element.

Version: Windows 10 Home Version Number: 22H2 Chrome: Version 122.0.6261.69 (64-bit)

jameszhou02 avatar May 01 '24 00:05 jameszhou02

Hi @xiebruce, what is your Windows version and browser version?

Actually I'm using macOS and it works fine, I can paste contents into the web terminal or copy contents out from the web terminal.

And the Windows(x86_64) is installed in parallels desktop on my Mac(Intel cpu), here is the version:

  • Version: Windows 10 Professional
  • Version Number: 22H2
  • OS Internal Version: 19045.4291
image

Oh, the browser that I use on Windows is: Edge 124.0.2478.67 (64bit)

xiebruce avatar May 01 '24 00:05 xiebruce

Based on normal windows terminal behavior, this seems about the same. Only difference is Ctrl+V allows pasting which doesn't seem to work in sshx.

My guess is that it has to do with how Ctrl in windows terminals is reserved while in Mac, the default is also Ctrl but there's Cmd for copy paste instead.

jameszhou02 avatar May 01 '24 00:05 jameszhou02

Hi @xiebruce, what is your Windows version and browser version?

Actually I'm using macOS and it works fine, I can paste contents into the web terminal or copy contents out from the web terminal. And the Windows(x86_64) is installed in parallels desktop on my Mac(Intel cpu), here is the version:

  • Version: Windows 10 Professional
  • Version Number: 22H2
  • OS Internal Version: 19045.4291
image

Oh, the browser that I use on Windows is: Edge 124.0.2478.67 (64bit)

Oh, sorry, I forgot to tell you that I run the sshx on macOS(not windows), and then visit the link on Windows and test it.

xiebruce avatar May 01 '24 00:05 xiebruce

Control-shift-c does not work at all Control-shift-v works great Right click, no option to copy or paste text

Chrome Version 124.0.6367.91 (Official Build) (64-bit)

noah@zn210:~/bin$ cat /proc/version Linux version 6.5.0-28-generic (buildd@lcy02-amd64-001) (x86_64-linux-gnu-gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0, GNU ld (GNU Binutils for Ubuntu) 2.41) #29-Ubuntu SMP PREEMPT_DYNAMIC Thu Mar 28 23:46:48 UTC 2024

Same with Debian Bookworm.

I do not see any way to copy in my environment with the mouse, so I revert to vi commands for copy.

nslieske avatar May 02 '24 04:05 nslieske

On Fedora 40 with Brave browser Control-shift-v works perfectly all the time for pasting. Control-shift-c opens the command panel instead. Trying to copy with right click thinks the text is an image. Firefox works better, there at least the right click option works.

gregor160300 avatar May 03 '24 09:05 gregor160300

Firefox works fine for copy & paste on inux version 6.5.0-28-generic (buildd@lcy02-amd64-001) (x86_64-linux-gnu-gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0, GNU ld (GNU Binutils for Ubuntu) 2.41) https://github.com/ekzhang/sshx/pull/29-Ubuntu SMP PREEMPT_DYNAMIC Thu Mar 28 23:46:48 UTC 2024

nslieske avatar May 06 '24 14:05 nslieske

On Firefox for me this extension works: https://addons.mozilla.org/en-US/firefox/addon/ctrl-shift-c-should-copy/

gregor160300 avatar Sep 26 '24 08:09 gregor160300