Shortcuts that were present in Notebook 6.xx not available with 7.07?

Summary :

I’ve just installed Jupyter notebook 7.07

I’ve previously worked a while on v6, but I find the environment unfamiliar as many shortcuts that were practical don’t seem present by default.

Such shortcuts include navigation through cells (UP and DOWN arrows), starting to edit cell focus is on (enter), switching cell format (Esc + m/c/r).

After checking the builtin cheatsheet for shortcuts, it looks like those I’m trying aren’t listed. Is that normal? Were those shortcuts removed? Did I miss something somehow?

Here are the steps I followed to set up my environment and encountered the problem :

  1. Creating a virtualenv with Python3 : mkvirtualenv python3 --python=python3 myvirtualenv.
  2. Installing notebook once the virtualenv is active with : pip install notebook.
  3. Running notebook with jupyter notebook.
  4. Starting a new notebook in the page step #3 opened in my browser with default kernel (Python3, ipykernel).
  5. Manually creating a few cells and content.
  6. Trying shortcuts mentionned above and noticing they don’t work.

The output of pip freeze gives me this :

anyio==4.2.0
argon2-cffi==23.1.0
argon2-cffi-bindings==21.2.0
arrow==1.3.0
asttokens==2.4.1
async-lru==2.0.4
attrs==23.2.0
Babel==2.14.0
beautifulsoup4==4.12.3
bleach==6.1.0
certifi==2024.2.2
cffi==1.16.0
charset-normalizer==3.3.2
comm==0.2.1
debugpy==1.8.0
decorator==5.1.1
defusedxml==0.7.1
executing==2.0.1
fastjsonschema==2.19.1
fqdn==1.5.1
h11==0.14.0
httpcore==1.0.2
httpx==0.26.0
idna==3.6
ipykernel==6.29.2
ipython==8.21.0
isoduration==20.11.0
jedi==0.19.1
Jinja2==3.1.3
json5==0.9.14
jsonpointer==2.4
jsonschema==4.21.1
jsonschema-specifications==2023.12.1
jupyter-events==0.9.0
jupyter-lsp==2.2.2
jupyter_client==8.6.0
jupyter_core==5.7.1
jupyter_server==2.12.5
jupyter_server_terminals==0.5.2
jupyterlab==4.1.0
jupyterlab_pygments==0.3.0
jupyterlab_server==2.25.2
MarkupSafe==2.1.5
matplotlib-inline==0.1.6
mistune==3.0.2
nbclient==0.9.0
nbconvert==7.16.0
nbformat==5.9.2
nest-asyncio==1.6.0
notebook==7.0.7
notebook_shim==0.2.3
overrides==7.7.0
packaging==23.2
pandocfilters==1.5.1
parso==0.8.3
pexpect==4.9.0
platformdirs==4.2.0
prometheus-client==0.19.0
prompt-toolkit==3.0.43
psutil==5.9.8
ptyprocess==0.7.0
pure-eval==0.2.2
pycparser==2.21
Pygments==2.17.2
python-dateutil==2.8.2
python-json-logger==2.0.7
PyYAML==6.0.1
pyzmq==25.1.2
referencing==0.33.0
requests==2.31.0
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rpds-py==0.17.1
Send2Trash==1.8.2
six==1.16.0
sniffio==1.3.0
soupsieve==2.5
stack-data==0.6.3
terminado==0.18.0
tinycss2==1.2.1
tornado==6.4
traitlets==5.14.1
types-python-dateutil==2.8.19.20240106
uri-template==1.3.0
urllib3==2.2.0
wcwidth==0.2.13
webcolors==1.13
webencodings==0.5.1
websocket-client==1.7.0

Some of these are highlighted under ‘Keyboard Navigation’ on the current Jupyter Notebook documentation here. And so if those don’t work it may be other issues in your install perhaps?
Have you tried a different browser with Jupyter?

Are you saying that the JupyterLab version will affect the shortcuts over in Jupyter Notebook 7+? Do you have a reference for this that we can add here.

I came here from this stackoverflow question I typed. I’m having a very similar issue. I was editing a notebook and randomly keyboard shortcuts stopped working. I use Anaconda to manage my Jupyter installation. For clarity, older versions and JupyterLab’s keyboard shortcuts work just fine!

Hello,
Actually, I tried the same steps from my post from scratch and actually got this specific version this time. (And yes, it works with shortcuts now).

I don’t really get why though.

1 Like

I don’t think that the issue lies in JupyterLab 4.1.0. I was using 4.0.11 when I ran into the issues. Plus I’ve been using Jupyter Notebook 7 for about a month ish when I ran into the issues. I did downgrade, however to JLab 4.0.8 and now it works! I wonder if there was some dependency that downgrading helps fix this issue.

I’ve had the same problem: I’ve been using Jupyter for many years, and Notebook 7 for many months. A week or two ago, I upgraded to the latest versions of JupyterLab and Notebook, and suddenly all of these keyboard shortcuts went away. I checked on several computers and several browsers – and when I checked the list of shortcuts, they were gone. I also tried, unsuccessfully, to re-add them via the settings.

I’m also puzzled (and a bit frustrated) by these changes.

If you open JupyterLab and got to Settings Editor → JSON Settings Editor → Keyboard Shortcuts, what is in the JSON in the user panel? Can you paste it?

1 Like

Also, what version of Jupyter Notebook and JupyterLab do you have installed?

1 Like

Here’s what I’ve got, version-wise:

jupyter==1.0.0
jupyter-console==6.6.3
jupyter-events==0.9.0
jupyter-lsp==2.2.1
jupyter-telemetry==0.1.0
jupyter-ydoc==2.0.1
jupyter_client==8.6.0
jupyter_core==5.7.1
jupyter_server==2.12.4
jupyter_server_fileid==0.9.1
jupyter_server_terminals==0.5.1
jupyter_server_ydoc==0.8.0
jupyterhub==4.0.2
jupyterlab==4.1.0
jupyterlab-widgets==3.0.9
jupyterlab_pygments==0.3.0
jupyterlab_server==2.25.2
jupyterlite==0.2.3
jupyterlite-core==0.2.3
jupyterlite-javascript-kernel==0.2.2

As for the JSON settings in JupyterLab, I wanted to include them, but they’re too long to put into Discourse. Any suggestions?

I should note that the problem might be based on JupyterLab, but it doesn’t express itself when creating a notebook within JupyterLab. Rather, it only expresses itself when I run jupyter notebook from the command line, bringing up Notebook 7.

In the lab, I can create a new notebook and then:

  • ESC (put into command mode)
  • m (markdown mode)
  • ENTER (go into edit mode)
  • Type some markdown, press shift+ENTER, it shows up
  • press ESC and b, and a new cell appears below.

In Jupyter notebook, by contrast, I cannot switch into command mode with ESC nor edit mode with ENTER. I cannot copy, cut, or paste cells with c, x, and v. I cannot switch into markdown mode with m, or code mode with y.

I’ll gladly share preferences (global or user for lab or notebook), if there’s a good/easy way to do that.

I’m new on this community.
Should I flag my post as solved somehow? Downgrading jupiterlab to 4.0.12 seems to be the solution for me.

To fix the issue downgrade jupyterlab to 4.0.12 or upgrade jupyter notebook to 7.1 (currently in realease candidate phase).

2 Likes

Thank you thank you thank you!

I was searching through GitHub issues, trying to figure out if this had been identified. I should have come here first; your help was speedy and so so useful.