
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
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.
| Action | Shortcut |
|---|---|
| Run cell and move to next cell | Shift + Enter |
| Run cell (stay on current cell) | Ctrl + Enter |
| Run cell and insert new cell below | Alt + Enter |
| Save and checkpoint | Ctrl + S |
| Switch to command mode | Esc |
| Switch to edit mode | Enter |
| Show shortcut list | H (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.
| Action | Shortcut |
|---|---|
| Insert cell above | A (command mode) |
| Insert cell below | B (command mode) |
| Delete cell | D, D (command mode) |
| Cut cell | X (command mode) |
| Copy cell | C (command mode) |
| Paste cell below | V (command mode) |
| Paste cell above | Shift + V (command mode) |
| Undo cell deletion | Z (command mode) |
| Merge cells | Shift + M (command mode) |
| Merge multiple cells | Shift + M (multi-select, command mode) |
| Split cell | Ctrl + 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.
| Action | Shortcut |
|---|---|
| Change to code cell | Y (command mode) |
| Change to Markdown | M (command mode) |
| Change to Raw cell | R (command mode) |
| Change to Heading 1 | 1 (command mode) |
| Change to Heading 2 | 2 (command mode) |
| Change to Heading 3 | 3 (command mode) |
| Change to Heading 4 | 4 (command mode) |
| Change to Heading 5 | 5 (command mode) |
| Change to Heading 6 | 6 (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.
| Action | Shortcut |
|---|---|
| Select cell above | Up / K (command mode) |
| Select cell below | Down / J (command mode) |
| Select multiple cells up | Shift + Up / Shift + K (command mode) |
| Select multiple cells down | Shift + 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.
| Action | Shortcut |
|---|---|
| Code completion / indent | Tab |
| Tooltip display | Shift + Tab |
| Show docstring | Press and hold Shift + Tab |
| Indent | Ctrl + ] |
| Dedent | Ctrl + [ |
| Select all | Ctrl + A |
| Undo | Ctrl + Z |
| Redo | Ctrl + Shift + Z / Ctrl + Y |
| Go to start of cell | Ctrl + Home / Home |
| Go to end of cell | Ctrl + End / End |
| Move one word left | Ctrl + Left |
| Move one word right | Ctrl + Right |
| Delete word before cursor | Ctrl + Backspace |
| Delete word after cursor | Ctrl + Delete |
| Open command palette | Ctrl + Shift + P |
| Toggle comment current line | Ctrl + / |
| Find and replace | Ctrl + 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.
| Action | Shortcut |
|---|---|
| Toggle output visibility | O (command mode) |
| Toggle line numbers | L (command mode) |
| Toggle output scrolling | Shift + O (command mode) |
| Close pager | Q (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.
| Action | Shortcut |
|---|---|
| Interrupt kernel | I, I (command mode) |
| Restart kernel | 0, 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.
| Action | Shortcut |
|---|---|
| Scroll notebook up | Shift + Space (command mode) |
| Scroll notebook down | Space (command mode) |
| Open command palette | P (command mode) |
| Search | Ctrl + F (Mac: Cmd + F) |