Skip to content

Instantly share code, notes, and snippets.

@pizofreude
Created March 5, 2025 11:28
Show Gist options
  • Save pizofreude/47740403532da9c7e61fdd152ef52d87 to your computer and use it in GitHub Desktop.
Save pizofreude/47740403532da9c7e61fdd152ef52d87 to your computer and use it in GitHub Desktop.
Jupyter Notebook Keyboard Shortcuts for Windows and Linux

Jupyter Notebook Keyboard Shortcuts for Windows and Linux

General Shortcuts

  • Enter: Enter edit mode
  • Esc: Enter command mode
  • Shift + Enter: Run cell, select below
  • Ctrl + Enter: Run cell
  • Alt + Enter: Run cell, insert below
  • Ctrl + S: Save and checkpoint

Command Mode Shortcuts (press Esc to enable)

  • Up: Select cell above
  • Down: Select cell below
  • A: Insert cell above
  • B: Insert cell below
  • X: Cut selected cell
  • C: Copy selected cell
  • Shift + V: Paste cell above
  • V: Paste cell below
  • Z: Undo cell deletion
  • D, D: Delete selected cell
  • Shift + M: Merge selected cells
  • Y: Change cell to code
  • M: Change cell to markdown
  • R: Change cell to raw
  • 1: Change cell to heading 1
  • 2: Change cell to heading 2
  • 3: Change cell to heading 3
  • 4: Change cell to heading 4
  • 5: Change cell to heading 5
  • 6: Change cell to heading 6
  • 0, 0: Restart the kernel (with dialog)
  • I, I: Interrupt the kernel
  • Q: Close the pager
  • H: Show keyboard shortcuts
  • P: Open the command palette

Edit Mode Shortcuts (press Enter to enable)

  • Tab: Code completion or indent
  • Shift + Tab: Tooltip
  • Ctrl + ]: Indent
  • Ctrl + [: Dedent
  • Ctrl + A: Select all
  • Ctrl + Z: Undo
  • Ctrl + Shift + Z: Redo
  • Ctrl + Y: Redo
  • Ctrl + Home: Go to cell start
  • Ctrl + End: Go to cell end
  • Ctrl + Left: Move cursor left one word
  • Ctrl + Right: Move cursor right one word
  • Ctrl + Shift + P: Open the command palette
  • Esc: Command mode
  • Ctrl + M: Command mode
  • Shift + Enter: Run cell, select below
  • Ctrl + Enter: Run cell
  • Alt + Enter: Run cell, insert below

Markdown Cells

  • Ctrl + 1: Convert to heading 1
  • Ctrl + 2: Convert to heading 2
  • Ctrl + 3: Convert to heading 3
  • Ctrl + 4: Convert to heading 4
  • Ctrl + 5: Convert to heading 5
  • Ctrl + 6: Convert to heading 6
  • Ctrl + M, M: Convert to markdown
  • Ctrl + M, Y: Convert to code

Navigation

  • Ctrl + Shift + -: Split cell at cursor
  • Ctrl + Up: Move cursor to cell start
  • Ctrl + Down: Move cursor to cell end
  • Ctrl + Shift + Up: Select to cell start
  • Ctrl + Shift + Down: Select to cell end

Kernel

  • Ctrl + .: Restart kernel
  • Ctrl + Alt + .: Interrupt kernel
  • Ctrl + Shift + .: Restart kernel and clear output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment