ekzhang / sshx

Fast, collaborative live terminal sharing over the web

Home Page:https://sshx.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Cannot copy content into clipboard inside web browser

DawnMagnet opened this issue · comments

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

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

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.

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.

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.

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?

commented

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

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

commented

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

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)

commented

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)

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.

commented

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.

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.

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.

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) #29 SMP PREEMPT_DYNAMIC Thu Mar 28 23:46:48 UTC 2024