Complete List of Jupyter Notebook Keyboard Shortcuts and Key Assignments thumbnail

Complete List of Jupyter Notebook Keyboard Shortcuts and Key Assignments

A comprehensive list of Jupyter Notebook keyboard shortcuts organized by their uses, for data analysis and machine learning. Covers cell operations, edit mode, output display, kernel management, and other key assignments that boost productivity. A definitive reference that maximizes workflow efficiency from beginners to advanced users.

Posted at: 2025.11.12

Editorial Note: We earn a commission from partner links on keyboardista - English version. Commissions do not affect our editors' opinions or evaluations.

Basic Operations

The fundamental operations in Jupyter Notebook shortcuts include execution, saving, and mode switching. Learning these forms the foundation for working quickly. Especially, Shift+Enter is the most frequently used shortcut that runs the cell and moves to the next one simultaneously. Mastering mode switches with Esc/Enter greatly improves operational efficiency.

ActionShortcut
Run cell and move to next cellShift + Enter
Run cell (stay on current cell)Ctrl + Enter
Run cell and insert new cell belowAlt + Enter
Save and checkpointCtrl + S
Switch to command modeEsc
Switch to edit modeEnter
Show shortcut listH (command mode)

Cell Operations

Editing tasks like adding, deleting, copying, and pasting cells generally use OS-standard shortcuts without Ctrl. Added shortcuts such as "Add cell (A key)" and "Merge cells (Shift + M key)" make these relatively easy to master.

ActionShortcut
Insert cell aboveA (command mode)
Insert cell belowB (command mode)
Delete cellD, D (command mode)
Cut cellX (command mode)
Copy cellC (command mode)
Paste cell belowV (command mode)
Paste cell aboveShift + V (command mode)
Undo cell deletionZ (command mode)
Merge cellsShift + M (command mode)
Merge multiple cellsShift + M (multi-select, command mode)
Split cellCtrl + Shift + - (edit mode)

Change Cell Type

Changing cell type is a commonly used command, so it is good to memorize. Only three keys Y, M, R for different types are needed and will be natural to remember once used.

ActionShortcut
Change to code cellY (command mode)
Change to MarkdownM (command mode)
Change to Raw cellR (command mode)
Change to Heading 11 (command mode)
Change to Heading 22 (command mode)
Change to Heading 33 (command mode)
Change to Heading 44 (command mode)
Change to Heading 55 (command mode)
Change to Heading 66 (command mode)

Cell Selection and Movement

Mastering cell selection and movement significantly speeds up work. Use J/K or arrows to move, and hold Shift to select multiple cells for batch operations like delete or merge.

ActionShortcut
Select cell aboveUp / K (command mode)
Select cell belowDown / J (command mode)
Select multiple cells upShift + Up / Shift + K (command mode)
Select multiple cells downShift + Down / Shift + J (command mode)

Edit Mode

Editing shortcuts determine coding productivity. They largely conform to OS conventions, with some editor-specific additions. It is good to learn them if not familiar.

ActionShortcut
Code completion / indentTab
Tooltip displayShift + Tab
Show docstringPress and hold Shift + Tab
IndentCtrl + ]
DedentCtrl + [
Select allCtrl + A
UndoCtrl + Z
RedoCtrl + Shift + Z / Ctrl + Y
Go to start of cellCtrl + Home / Home
Go to end of cellCtrl + End / End
Move one word leftCtrl + Left
Move one word rightCtrl + Right
Delete word before cursorCtrl + Backspace
Delete word after cursorCtrl + Delete
Open command paletteCtrl + Shift + P
Toggle comment current lineCtrl + /
Find and replaceCtrl + H

Display and Output Control

Output visualization controls are surprisingly useful. Toggle output display with O, scroll output with Shift+O to keep note clarity while reviewing results. Show line numbers with L for smoother review and discussion.

ActionShortcut
Toggle output visibilityO (command mode)
Toggle line numbersL (command mode)
Toggle output scrollingShift + O (command mode)
Close pagerQ (command mode)

Kernel Operations

Stopping or restarting the kernel is handy when needed. The "I, I" interrupt shortcut is great for breaking infinite loops or long processes. The "0, 0" restart shortcut cleans the environment.

ActionShortcut
Interrupt kernelI, I (command mode)
Restart kernel0, 0 (command mode)

Scroll and Others

Navigation shortcuts improve notebook browsing efficiency. Scroll page-wise with Space/Shift+Space, open command palette with P or Ctrl+Shift+P for all-in-one function search and execution. Search quickly with Ctrl+F.

ActionShortcut
Scroll notebook upShift + Space (command mode)
Scroll notebook downSpace (command mode)
Open command paletteP (command mode)
SearchCtrl + F (Mac: Cmd + F)