code-server: Copy-paste not working well in terminal
code-serverversion: 1.31.0-20-x86_64-linux- OS Version: Ubuntu 18.04.1 LTS
- Client Info: macOS 10.14.3 + Chrome 72.0.3626.121
I’ve read Issue #161 and tried @avelino 's solution, but the copy-paste function still can’t work in terminal.
Steps to Reproduce
I recorded a video to show how to reproduce this issue:
- Select text in terminal and press <⌘ + C> to copy text
- Press <⌘ + V> to paste text (not working)
- Go to the editor area, then return back to the terminal
- Press <⌘ + V> again
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 24 (8 by maintainers)
step:1 , make sure code server is running on “https://” not http step:2, In Chrome set clipboard permission go to
chrome://settings/content/clipboardand add your server url step3: now ctrl + v will work in code serverWhat browsers is everyone using? This problem only happens with me when using Firefox, with Chromium Ctrl + Shift + V works. One thing I noticed is that when I right click in the terminal, in Chromium next to paste it says the key combo, while in Firefox it says “must use keybind”.
I’m wondering if the key combo doesn’t work some of the time because the
nativeClibpoardcondition may not always be satisfied?I did some more testing and when I change that key combo condition to just
terminalFocus, Ctrl + Shift + C works in Firefox to copy (not sure if changing the setting made that work), and Chromium still works too.Firefox might be blocking access to the clipboard since it’s coming from javascript, according to this, if it’s still accurate: https://support.mozilla.org/en-US/questions/1068472#answer-744685
I’m also messing with
about:configin Firefox to see if I can allow that site access: http://kb.mozillazine.org/Granting_JavaScript_access_to_the_clipboardIn the meantime, in addition to Ctrl + Shift + C for copy, Ctrl + Ins works for that too, while Shift + Ins works for paste.
For me it also fails sometimes in safari on iPadOs beta 3
Sometimes cant even type or paste into editor when terminal is open ¯_(ツ)_/¯
I use the latest chrome.
copy and pasting doesn’t work for me even with the right click menu.
it’s hard to say when it works and when it doesn’t. Sometimes, I had trouble copying and pasting at a fresh launch. Then I saw chrome ask me if I allow the page to access clipboard. if I click “allow”, copying pasting will work fine. But sometimes, this notification won’t show.
At one point, I also saw an error pop up from the bottom right corner saying electron.clipboard isn’t a function or something. the error message went away pretty quickly, I didn’t capture it.
I couldn’t copy from the terminal and paste into the text editor