Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Copy/Paste to the terminal right-click menu #3011

Open
apcamargo opened this issue Sep 19, 2017 · 15 comments

Comments

@apcamargo
Copy link

commented Sep 19, 2017

Currently, we need to use shift to get the system right-click menu in order to copy/paste in the terminal. This functionality is hidden, so it would be interesting if copy and paste were added to the JupyterLab's right click menu.

@sccolbert

This comment has been minimized.

Copy link
Contributor

commented Sep 26, 2017

Browser security policy does not allow us read from the clipboard outside of a native paste event. So unfortunately we can't have a paste option in a custom context menu. We could do something like google docs and open a separate dialog which then tells you do press Ctrl+V into a text field, but that's the best we can do.

@stephenakearns

This comment has been minimized.

Copy link

commented Nov 15, 2017

Hi @sccolbert - if it's not possible to add copy/paste to the right-click menu, would the team consider adding behavior like PuTTY where highlighted text is automatically copied to the clipboard?

@CptanPanic

This comment has been minimized.

Copy link

commented Nov 21, 2017

Yes this is true. If you look at the terminal in chromeos, or on google's online terminal for cloud. They utilize the putty method, whereas when you highlight text, it automatically gets copied, and a copy symbol appears overlayed on terminal. And then it is a right click paste's it.

@dhirschfeld

This comment has been minimized.

Copy link
Contributor

commented Jan 24, 2018

Wow. Glad I found this - I had no idea how to copy or paste!

I'm happy enough using shift-right-click however it's not very discoverable. Maybe the default context menu could have a not to that effect?

I'd like to give +💯 to @stephenakearns' suggestion to copy any selected text by default, or at least to have an option for such.

@gsemet

This comment has been minimized.

Copy link

commented Mar 8, 2018

+1

@consideRatio

This comment has been minimized.

Copy link
Member

commented Mar 8, 2018

Like @dhirschfeld I had no idea you could shift+rightclick in order to get the normal rightclick context menu available and paste that way.

If that is the way to paste, making that option discoverable is important.

@CleoQc

This comment has been minimized.

Copy link

commented Apr 9, 2018

took me a while to figure out why I couldn't paste. Firefox does not offer the paste option when using shift-right click, but Chrome does.

@jasongrout

This comment has been minimized.

Copy link
Contributor

commented Apr 9, 2018

If that is the way to paste, making that option discoverable is important.

What would you suggest? What would you have discovered?

@consideRatio

This comment has been minimized.

Copy link
Member

commented Apr 9, 2018

@jasongrout good question I respect the complexity of designing a good UI.

These are ideas on how I would had discovered it, if they are suitable is another question. My current best bet is that the context menu should disclose how to do it somehow.

  • If there was something written about it when right clicking
  • If there was a paste button with a tooltip about the shortcut
  • If there was some hint showing when CTRL+V was entered
@dhirschfeld

This comment has been minimized.

Copy link
Contributor

commented Apr 9, 2018

What would you suggest? What would you have discovered?

A description in the context menu itself. As it is it just has the Refresh Terminal option so there would be plenty of space to put a horizontal rule and then a suggestion to Shift-Right-Click to get the cut/copy/paste commands one would normally expect to see in a context menu - e.g.

image

@oxinabox

This comment has been minimized.

Copy link

commented May 8, 2018

Refresh Terminal does't seem as useful as copy-paste.
Maybe disable to custom right click menu when over the Terminal Pane,
and use the Native Menu.
and add the Refresh Terminal button to a tool-bar

@zuoxingdong

This comment has been minimized.

Copy link

commented May 17, 2018

It could be nice to add keyboard shortcut for copy selected block in terminal

@okTahvo

This comment has been minimized.

Copy link

commented Sep 15, 2018

Okay, so If I understand this correctly, JupyterLab terminal doesn't let you paste text in in Firefox and this has been an issue for a year now? Atleast I don't know how to paste text in Firefox Jupyter labs.

@steverweber

This comment has been minimized.

Copy link

commented Dec 10, 2018

I like @dhirschfeld direction with including some hints in the context menu.

But think we should go one more step and have the item in the context menu to open a popup with more details...

 - Refresh Terminal
 - Copy/Paste - hints

[Copy/Past - hints popup]

The terminal passes Ctrl + C and other commands directly to the shell.
We do this so a running program can be closed using the unix 'ctrl + c`

To copy and paste try:

(context menu) shift + mouse right click
(paste) shift + insert
(copy) ctrl + insert
@kfox1111

This comment has been minimized.

Copy link

commented Mar 18, 2019

I was playing around with the newest kubernetes-dashboard and was able to shift-ctrl-c and shift-ctrl-v copy and paste in/out of the terminal. Getting the equivalent into jupyter's terminal would be awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.