0

I am using Jupyter Notebook in Firefox. If I highlight a code section and press Ctrl + # or Ctrl + }, nothing happens. If I highlight a code section and press Ctrl + /, Firefox switches to a different tab. I tried those shortcuts in editing mode (= the code section was framed by a green box).

Things I have tried: Jupyter Notebook -> Help -> Edit Keyboard Shortcuts did not solve the problem since commenting/uncommenting is not listed there. Beyond this, neither this nor this question helped.

It could be either because of Jupyter Notebook settings or because of Firefox settings. Since I am not an expert in any of them, it would be great if you could provide a detailed answer in case you have an idea on how to solve the issue. I personally would prefer to put the commenting/uncommenting on Ctrl + #, but Ctrl + / is also okay for me.

lonyen11
  • 91
  • 11
  • The `comment` shortcut is indeed not listed at `Help -> Edit Keyboard Shortcuts`, but the default `Ctrl + /` is listed at `Help -> Keyboard Shortcuts -> Edit Mode`. The shortcut did not work for me too, but restarting the kernel, closing the tab and reopening it helped. – Timo Dec 21 '22 at 10:00
  • The shortcut Ctrl+/ works for me (Ubuntu 22.04, Jupyter Notebook 6.4.12, firefox 108.0.1) – S_Bersier Dec 26 '22 at 10:11
  • Downvoted for not mentioning your FCI (Full Config Info), the FF Version would ***at least*** be very relevant... :idea: (+ OS and List of installed Add-ons..., and/)or if you tried with all Add-ons disabled or in a new/clean FF-Profile...) – chivracq Dec 28 '22 at 01:01

3 Answers3

1

There are a couple of things you can try.

  1. You change firefox keyboard shortcut settings (Probably the most accessible)
  2. You could download Jupyter Notebook
  3. You could try with a different browser
Blue Robin
  • 847
  • 2
  • 11
  • 31
0

I was not able to replicate (version details down here). You can try another browser to exclude firefox or the Jupyer configuration itself. Also you can try disabling all the browser extensions to verify there is nothing overriding the shortcuts setting

Windows 11
last Firefox version: 108.0.1

> jupyter --version

IPython          : 7.30.1
ipykernel        : 6.6.0
ipywidgets       : 7.6.5
jupyter_client   : 7.1.0
jupyter_core     : 4.9.1
-1

When working with Python in Jupyter-Notebook, these four tricks can certainly save your valuable time. And in turn, increases ⚡️ your productivity.

There are commonly known keyboard shortcuts such as Ctrl+ Shift+- to split the cell, Shift+M to merge multiple cells, and Shift+Down/Up to select the cells below or above the selected one.

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 27 '22 at 19:48
  • How does this relate to the post? – Blue Robin Dec 28 '22 at 00:26