jupyter notebook keyboard shortcuts code example

Example 1: jupyter notebook make cell markdown shortcut

# select cell and press 'm'

Example 2: jupyter notebook insert cell

# Basic syntax (two options):
option + enter # Run cell and insert cell below
b	# Select cell + b (i.e. don't have cursor inside the cell)

Example 3: jupyter notebook custom keyboard shortcuts definition

// file ~/.jupyter/nbconfig/notebook.json

{
  "keys": {
    "command": {
        "bind": {
            "G,G,G":"jupyter-notebook:restart-kernel-and-run-all-cells"
        }
    }
  },
}