notebook icon indicating copy to clipboard operation
notebook copied to clipboard

Keyboard shortcuts inconsistent across tabs, and not functioning within notebooks

Open gkiar opened this issue 1 year ago • 7 comments
trafficstars

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: [email protected]
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

  • Operating System and version: Windows 11, WSL2 running Ubuntu 20.04
  • Browser and version: Chrome
  • Jupyter Notebook version:
$ jupyter --version
Selected Jupyter core packages...
IPython          : 8.21.0
ipykernel        : 6.29.0
ipywidgets       : 8.1.1
jupyter_client   : 8.6.0
jupyter_core     : 5.7.1
jupyter_server   : 2.12.5
jupyterlab       : 4.1.0
nbclient         : 0.9.0
nbconvert        : 7.14.2
nbformat         : 5.9.2
notebook         : 7.0.7
qtconsole        : 5.5.1
traitlets        : 5.14.1
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.

gkiar avatar Feb 07 '24 20:02 gkiar

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.

avloss avatar Feb 08 '24 03:02 avloss

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"!

mobilarte avatar Feb 08 '24 19:02 mobilarte

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

PetrGlad avatar Feb 08 '24 23:02 PetrGlad

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?

jtpio avatar Feb 09 '24 09:02 jtpio

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!

mobilarte avatar Feb 09 '24 22:02 mobilarte

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

arnaud-feldmann avatar Feb 10 '24 17:02 arnaud-feldmann