pythonpython-3.xmacosjupyter-notebook

Jupyter doesn't let me type the left square bracket


Recently I have installed Jupyter Notebook on my Mac for didactical use and I've noticed a problem: doing list = Jupyter doesn't let me type the left square bracket, and if I type that in a new line it allows me to type, for example:

[]

I've just tried to reinstall completely Jupyter from the prompt using Homebrew and it doesn't worked. How can I do?


Solution

  • This is a known issue:

    https://github.com/jupyterlab/jupyterlab/issues/15744

    You can do:

    Settings → Settings Editor → JSON Settings Editor → Keyboard Shortcuts → User → paste → save
    

    paste:

    {
      "shortcuts": [
        {
          "args": {},
          "command": "inline-completer:next",
          "keys": [
              "Alt ]"
          ],
          "selector": ".jp-mod-completer-enabled",
          "disabled": true
        },
        {
          "args": {},
          "command": "inline-completer:previous",
          "keys": [
              "Alt ["
          ],
          "selector": ".jp-mod-completer-enabled",
          "disabled": true
        },
        {
          "args": {},
          "command": "inline-completer:invoke",
          "keys": [
              "Alt \\"
          ],
          "selector": ".jp-mod-completer-enabled",
          "disabled": true
        }
      ]
    }
    

    https://github.com/jupyterlab/jupyterlab/issues/15744#issuecomment-1999433752

    As @everson commented please restart your notebook after changes.