jupyter / notebook

Jupyter Interactive Notebook
https://jupyter-notebook.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
11.41k stars 4.76k forks source link

Keyboard shortcuts inconsistent across tabs, and not functioning within notebooks #7241

Open gkiar opened 5 months ago

gkiar commented 5 months ago

Description

I used to use Jupyter regularly, and relied on common keyboard shortcuts, such as 0 0, A, B, and of course Enter and Esc to jump between command and edit modes. In this recent installation of Jupyter, these keyboard shortcuts no longer work, despite appearing in the server-level keyboard shortcut list (screenshot 1). They don't appear in the within-notebook keyboard shortcut menu, aside from Ctrl+Enter (screenshot 2), and aside from Ctrl+Enter for running cells, none of these shortcuts work, despite being listed and referenced at other menus in the notebook (screenshot 3)... Thanks for your help!

image image image

Reproduce

$ pip install jupyter
$ pip show jupyter
Name: jupyter
Version: 1.0.0
Summary: Jupyter metapackage. Install all the Jupyter components in one go.
Home-page: http://jupyter.org
Author: Jupyter Development Team
Author-email: jupyter@googlegroups.org
License: BSD
Location: /home/gkiar/env/gp311/lib/python3.11/site-packages
Requires: ipykernel, ipywidgets, jupyter-console, nbconvert, notebook, qtconsole
Required-by:
$ jupyter-notebook --no-browser

Expected behavior

That the keyboard shortcuts work.

Context

Troubleshoot Output
Paste the output from running `jupyter troubleshoot` from the command line here.
You may want to sanitize the paths in the output.
Command Line Output
Paste the output from your command line running `jupyter notebook` here, use `--debug` if possible.
Browser Output
Paste the output from your browser Javascript console here, if applicable.

avloss commented 5 months ago

I can confirm this issue. It's really strange, but it feels like it was "working fine just yesterday" for me. And I'm not sure what has changed. I had "notebook=7.0.7" and keys were working fine. Now suddenly they've stopped working. I've tried few things, including previous versions of 7.x. Nothing helped. Downgrading to 6.5.6 resolved the issue. So, this is definitely NOT something that happens consistently. Very interesting that I've started experiencing this issue TODAY. Almost as if this is dependent on some external factor.

mobilarte commented 5 months ago

I can also confirm this: working in JupyterLab, but not working in Notebook. Tried version 7.0.6 -> 7.1.0b0, fresh install of everything (including deleting .jupyter). I miss "A"!

PetrGlad commented 5 months ago

I have the same problem. Using jupyter lab instead for now. The shortcuts seem to still work there.

jtpio commented 5 months ago

Thanks all for the report.

Wondering if this could be related to the recent JupyterLab 4.1.0 release, which may have introduced some incompatibility with the Notebook settings (in particular the keyboard shortcuts).

As a temporary workaround, does downgrading to the previous JupyterLab version (with pip install "jupyterlab<4.1.0") help fix the issue?

mobilarte commented 5 months ago

After updating to notebook 7.0.8, shortcuts are displayed in the menu and are working again. The downgrade of jupyterlab seems to fix it. Thanks!

arnaud-feldmann commented 5 months ago

Thanks all for the report.

Wondering if this could be related to the recent JupyterLab 4.1.0 release, which may have introduced some incompatibility with the Notebook settings (in particular the keyboard shortcuts).

As a temporary workaround, does downgrading to the previous JupyterLab version (with pip install "jupyterlab<4.1.0") help fix the issue?

Had the same thing in arch, with package jupyter-notebook 7.0.7-1 within pacman, after an update of jupyterlab to 4.1.0-1. Downgraded to jupyterlab 4.0.12-1 and it works again. So that must be it. I'll wait until notebook 7.0.8 to be on the repo. Thanks