code-server version: 1.31.0-20-x86_64-linuxI've read Issue #161 and tried @avelino 's solution, but the copy-paste function still can't work in terminal.
I recorded a video to show how to reproduce this issue:
VSCode configuration does not work for the terminal, it is editor configuration
Thanks @avelino. I can't find a place to configure the terminal, so it's a bug of code-server, right?
Similar problem on Linux, both with C-c C-v and X11 selection clipboard / middle click paste.
I couldn't copy from the terminal and paste into the text editor
What 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 nativeClibpoard condition 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:config in Firefox to see if I can allow that site access:
http://kb.mozillazine.org/Granting_JavaScript_access_to_the_clipboard
In the meantime, in addition to Ctrl + Shift + C for copy, Ctrl + Ins works for that too, while Shift + Ins works for paste.
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.
Sometimes cant even type or paste into editor when terminal is open ¯_(ツ)_/¯
I realized my copy and pasting issue might be due to "copy on select".
when I try to paste into the editor, I first select the text I want to replace.
it seems that during selection, the selected text gets copied into the clipboard, so when I paste, it actually pastes the same content as my selection. This made me thinking pasting didn't work.
But I googled, while you can enable "copy on select" with some extension, the default vscode won't do it.
Anyone has ideas?This troubles me.
it seems that during selection, the selected text gets copied into the clipboard, so when I paste, it actually pastes the same content as my selection
Same behaviour for me (serving code-server from Ubuntu Bionic, accessing it with Chrome / mac os). Copy on select is always on; it'd be great to be able to disable it.
This might be fixed now. We've made some changes to the copy/paste.
This might be fixed now. We've made some changes to the copy/paste.
Fresh install here on a Google Cloud Platform Ubuntu (specs below from Neofetch). I canno't paste into the terminal.
.-/+oossssoo+/-. mosthated@hpcsdev
`:+ssssssssssssssssss+:` -----------------
-+ssssssssssssssssssyyssss+- OS: Ubuntu 18.04.2 LTS x86_64
.ossssssssssssssssssdMMMNysssso. Host: Google Compute Engine
/ssssssssssshdmmNNmmyNMMMMhssssss/ Kernel: 4.15.0-1030-gcp
+ssssssssshmydMMMMMMMNddddyssssssss+ Uptime: 5 hours, 14 mins
/sssssssshNMMMyhhyyyyhmNMMMNhssssssss/ Packages: 921
.ssssssssdMMMNhsssssssssshNMMMdssssssss. Shell: bash 4.4.19
+sssshhhyNMMNyssssssssssssyNMMMysssssss+ Terminal: /dev/pts/4
ossyNMMMNyMMhsssssssssssssshmmmhssssssso CPU: Intel Xeon (1) @ 2.300GHz
ossyNMMMNyMMhsssssssssssssshmmmhssssssso Memory: 2069MiB / 3693MiB
+sssshhhyNMMNyssssssssssssyNMMMysssssss+
.ssssssssdMMMNhsssssssssshNMMMdssssssss.
/sssssssshNMMMyhhyyyyhdNMMMNhssssssss/
+sssssssssdmydMMMMMMMMddddyssssssss+
/ssssssssssshdmNNNNmyNMMMMhssssss/
.ossssssssssssssssssdMMMNysssso.
-+sssssssssssssssssyyyssss+-
`:+ssssssssssssssssss+:`
.-/+oossssoo+/-.
Just an update to this. It seems like Firefox has the most issue. In Chrome and Vivaldi it works just fine if you make sure to set clipboard permission.
If this is a Chromium permissions issue we might want to add a notification when users try the shortcut for the first time on Chromium browsers. CC: @code-asher @kylecarbs
For me it also fails sometimes in safari on iPadOs beta 3
fail on chrome Version 77.0.3865.120 (Official Build) (64-bit) + Mac OS 10.14.4
@jo32 refer to @shahidul56's workaround. This is a Chrome permissions issue.
Closing to consolidate into #1106.
@shahidul56 thx very much! it works for me!
I have the same problem in firefox 74.0 in Windows. Paste works fine on my chrome based browser.
@dentropy See #1106
is this solved, I am still facing it, I mean i can copy but not paste
@winetoys Please see #1106
Most helpful comment
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 urlstep3: now ctrl + v will work in code server