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

allowing copy/paste in right click menu in notebook #3224

Open
fyears opened this issue Nov 10, 2017 · 23 comments
Open

allowing copy/paste in right click menu in notebook #3224

fyears opened this issue Nov 10, 2017 · 23 comments

Comments

@fyears
Copy link

fyears commented Nov 10, 2017

I usually select some text in the cell (input / output), then right-click in order to copy/paste. However, jupyter notebook (in jupyter lab) captures the right-click menu, and doesn't provide the copy/paste options.

I suggest providing such options back. Thank you!

And yes, I can always press keyboard (ctrl + c ctrl + v). But using mouse to select text then copy/paste is more fluent.

@jasongrout
Copy link
Contributor

A couple of thoughts

(a) you can shift-click to get the browser menu. Perhaps we should put a line of text in the right click menu at the bottom mentioning this?

(b) it does look like we could support copy, etc: https://developers.google.com/web/updates/2015/04/cut-and-copy-commands. There were restrictions on this prior to Chrome 43, for example.

@fyears
Copy link
Author

fyears commented Nov 10, 2017

(a) well, very interesting hint, which I never know before. But since my hand are already on the keyboard, I could just ctrl+c...
(b) maybe it's safe to assume that guys using jupyter lab use latest browsers? :-)

@homocomputeris
Copy link

IMHO, a very expected feature because one expects to see Copy/Paste/Cut in the context menu even if it's not native one.

@jasongrout jasongrout removed this from the 1.0 milestone Sep 5, 2018
@blink1073 blink1073 added this to the Future milestone Sep 11, 2018
@japrogramer
Copy link

also can't copy paste, either right clicking or ctrl + x/c

@aakhmetz
Copy link

aakhmetz commented Jun 5, 2019

actually, there is no way to copy the output at the moment, am I right?

@homocomputeris
Copy link

In Firefox 69 it is possible to right-click in a cell with Shift pressed to evoke your system's context menu instead of Jupyter's.

@telamonian
Copy link
Member

telamonian commented Oct 14, 2019

You can always right click with Shift held down anywhere in JupyterLab, using any browser, to open your browser's standard right click menu. If that's not working for you, that's a bug, and we need to fix it, so please post a new issue with a description (do not post it here).

@homocomputeris
Copy link

Anyway, having "Copy selected text" in Jupyter's menu would be convenient.

@MeghnaNatraj
Copy link

MeghnaNatraj commented Oct 23, 2019

All the ideas mentioned here are great and yes right click + shift key has the option to copy. But a simple scroll over text -> right click -> copy would be perfect!

It's not fun when you need to quickly debug errors using google/stack-overflow and struggle copying, so you google about this issue instead and end up spending time commenting about this issue on this thread instead. :/

@billharbert
Copy link

This is awesome! I had the same question--two seconds reading this thread and issue fully solved. Who doesn't want training and validation loss curves in Excel? Someone has to support MS eh? Thank you!

@wale919
Copy link

wale919 commented Sep 7, 2020

I am new to programming and about 24 hours ago, I started python self-studies online.

I am running jupyter notebook 6.0.3 on a Mac and I am unable to copy codes to Notes.

Please pardon my ignorance, but if I am researching how to use ‘copy’, ....

@liar666
Copy link

liar666 commented Oct 9, 2020

Hi,
To go a little further (but on a very related path)...
As a Linux/BSD user, I never use Ctrl-c/v nor menus to copy-paste, but the very intuitive/useful/fast/homogeneous way of achieving the same goal in the FOSS world: selection + middle click.
It would be nice if jupyterlab would not intercept the middle click and let the OS do its job correctly and homogeneously with ALL the other apps :)

@nabajour
Copy link

Hi,
To go a little further (but on a very related path)...
As a Linux/BSD user, I never use Ctrl-c/v nor menus to copy-paste, but the very intuitive/useful/fast/homogeneous way of achieving the same goal in the FOSS world: selection + middle click.
It would be nice if jupyterlab would not intercept the middle click and let the OS do its job correctly and homogeneously with ALL the other apps :)

I'm also looking for that, but I don't think Jupyter intercepts the middle click. I can paste with middle click, and I get the latest content I copied with selection elsewhere in my browser. Copy with selection elsewhere in the browser works. What doesn't work is copy by selection in jupyter notebook.

@mvoelk
Copy link

mvoelk commented Mar 1, 2021

To my surprise, the text editor in Jupyterlab has exactly that feature, and it works, at least in Firefox...

Why is this still an issue after years?

@camiyu1
Copy link

camiyu1 commented Apr 5, 2021

I found "Allow Right Click" chrome extension prevents right click menu of Jupyterlab.
After uninstalling it, everything works fine.

@CommanderPho
Copy link

To my surprise, the text editor in Jupyterlab has exactly that feature, and it works, at least in Firefox...

Why is this still an issue after years?

I just tested this, and indeed, the right click in the text editor mode (such as when you open a .py file instead of a notebook) has the normal copy/cut/paste options! This indicates that there's no longer any technical issue with the browser refusing the functionality. I'll look into getting this feature implemented in the same way as it is in the text editor.

@joshua-reynolds
Copy link

joshua-reynolds commented Nov 30, 2021

Just echoing others, being able to right-click selected text, copy, paste in Chrome without grabbing the whole cell would be great. The old jupyter notebook ide had this functionality; one had to do a "fast click" to get the menu though.

@whyboris
Copy link

🙇 Please add this feature into Jupyter Lab 🙇
It's so frustrating to carefully select a large chunk of code/text and right-click only to find out I'll have to exit out of the right-click menu and have to re-select the text I just selected 😞

@nmhlog
Copy link

nmhlog commented Jun 23, 2022

uninstall jupyterlab-emacskeys

@tmushayahama
Copy link

any words on this. This is a not a fun workflow. I thought it was expected to select text and copy and paste using the right click (context menu)

@astrowonk
Copy link

astrowonk commented May 24, 2023

I want to copy and paste selected text from the context menu more than anything I would want to do in the context-menu from jupyterlab, including copy/pasting entire cells.

Can we have a setting to disable the jupyter-lab context menu altogether? For me the utility of copy/paste text is much higher than anything the context menu offers.

@InCogNiTo124
Copy link

Is it possible to build a a JupyterLab extension which modifies the context menu and provides the Copy/Cut/Paste functionality?

@krassowski
Copy link
Member

Within the browser support limitations described in #13553, yes. There is no strong reason why it should not be a part of core JupyterLab IMO, so if someone were to write such an extension they could find it easier to directyl contribute to core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests