Ulf Aslak
Ulf Aslak

Reputation: 8608

Disable Jupyter Notebook cell search

I want to disable cell search in Jupyter notebooks:

enter image description here

It's bound to cmd + f so I find it super annoying as most browsers have excellent built-in search. I looked through "Help -> Edit keyboard shortcuts" but couldn't find it.

Upvotes: 10

Views: 1369

Answers (1)

user6311045
user6311045

Reputation:

The simplest way to achieve this is pressing Ctrl(Cmd)+F twice; The first try will open Jupyter's search box and the second one will switch to Browser's search box.

If your prefered interface is classic notebook, there's a Keyboard shortcut editor extension that lets you add, edit, or remove keyboard shortcuts. But there is limitations in it.

Ex:

  • Some combinations may not be identified by jupyter at all

  • The editor won't accept anything with a comma in it

  • You're not allowed to add conflicting shortcuts (What you're looking for)

In the JupyterLab you can edit features as simple as possible. Go to Settings -> Advanced Settings Editor -> Keyboard Shortcuts. in the list of commands you can find documentsearch options.

To disable default search shortcut, copy the documentsearch:start command into the User Preferences window and then add "disabled": true to it as below and then save it.

{
    "shortcuts": [
        {
            "command": "documentsearch:start",
            "keys": [
                "Accel F"
            ],
            "selector": ".jp-mod-searchable",
            "disabled": true
        }
    ]
}

In the above command, Accel corresponds to Cmd on Mac and Ctrl on Windows.

After relaunching Jupyter you can access browser search box by pressing Ctrl(Cmd)+F.

Upvotes: 10

Related Questions