question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Copy-paste not working well in terminal

See original GitHub issue
  • code-server version: 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:

  1. Select text in terminal and press <⌘ + C> to copy text
  2. Press <⌘ + V> to paste text (not working)
  3. Go to the editor area, then return back to the terminal
  4. Press <⌘ + V> again

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:24 (8 by maintainers)

github_iconTop GitHub Comments

10reactions
xeron56commented, Jun 24, 2019

step:1 , make sure code server is running on “https://” not http step:2, In Chrome set clipboard permission go to chrome://settings/content/clipboard and add your server url step3: now ctrl + v will work in code server

2reactions
4oo4commented, Mar 23, 2019

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”.

  • Server OS: Ubuntu 16.04 (code-server running in Ubuntu 18.04 docker container)
  • Client OS: Ubuntu 16.04
  • Firefox: 65.0.1
  • Chromium: 73.0.3664.3 (Developer Build)

I’m wondering if the key combo doesn’t work some of the time because the nativeClibpoard condition may not always be satisfied? Selection_009

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Copy and paste doesn't work in the terminal - Ask Ubuntu
Mark the text, that you want to paste by pressing the left mouse button and move the mouse. · Press shift + ctrl...
Read more >
Copy-paste not working well in terminal · Issue #237 - GitHub
Select text in terminal and press <⌘ + C> to copy text · Press <⌘ + V> to paste text (not working) ·...
Read more >
How to Copy Paste in Linux Terminal [For Absolute Beginners]
Use Ctrl+Insert or Ctrl+Shift+C for copying and Shift+Insert or Ctrl+Shift+V for pasting text in the terminal in Ubuntu. Right click and selecting the...
Read more >
Why doesn't copy and paste work in the terminal? - Quora
Copying and Pasting inside a terminal is different from that to in normal OS. You have to use Ctrl+Shift+C for copy and Ctrl+Shift+V...
Read more >
copy paste option not working on terminal - 35891
copy paste option not working on terminal ... Ctrl + C and right botton + paste, and again the paste option was disable....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found