Keyboard Shortcuts | Jupyter Notebook Tutorial (2026) | Step-by-Step Guide
Keyboard Shortcuts | Jupyter Notebook Tutorial (2026) | Step-by-Step Guide
Keyboard shortcuts help you work faster by reducing the need to use the mouse. Learning these shortcuts can significantly improve your productivity while working with Jupyter Notebook.
Jupyter Notebook has two modes: Command Mode and Edit Mode. Each mode provides its own set of keyboard shortcuts.
1. Understand the Two Modes
Command Mode
Command Mode is used to manage notebook cells.
Steps:
- Press Esc.
- You are now in Command Mode.
Edit Mode
Edit Mode is used to edit the contents of a notebook cell.
Steps:
- Press Enter.
- You are now in Edit Mode.
2. View All Keyboard Shortcuts
Follow these steps to view all available keyboard shortcuts in Jupyter Notebook.
- Open Jupyter Notebook.
- Click Help → Show Keyboard Shortcuts.
- Or press Ctrl + Shift + H.
- A window displaying all available keyboard shortcuts will appear.
3. Command Mode Shortcuts
Press Esc to enter Command Mode, then use the following shortcuts.
| Shortcut | Description |
|---|---|
| A | Insert a new cell above. |
| B | Insert a new cell below. |
| X | Cut the selected cell. |
| C | Copy the selected cell. |
| V | Paste the copied or cut cell below. |
| D, D | Delete the selected cell. |
| Z | Undo the last cell operation. |
| Shift + Z | Redo the last cell operation. |
| M | Convert the selected cell to a Markdown cell. |
| Y | Convert the selected cell to a Code cell. |
| R | Convert the selected cell to a Raw cell. |
| Shift + L | Show or hide line numbers. |
| Shift + Up / Down | Select multiple cells. |
| Ctrl + Shift + Up / Down | Move the selected cell up or down. |
4. Edit Mode Shortcuts
Press Enter to enter Edit Mode, then use the following shortcuts.
| Shortcut | Description |
|---|---|
| Tab | Display code completion suggestions. |
| Shift + Tab | Display function documentation (tooltip). |
| Ctrl + Z | Undo text changes. |
| Ctrl + Shift + Z | Redo text changes. |
| Ctrl + A | Select all text. |
| Ctrl + C | Copy the selected text. |
| Ctrl + X | Cut the selected text. |
| Ctrl + V | Paste copied text. |
| Ctrl + / | Comment or uncomment the selected lines. |
5. Notebook Execution Shortcuts
These shortcuts are used to run notebook cells.
| Shortcut | Description |
|---|---|
| Shift + Enter | Run the current cell and move to the next cell. |
| Ctrl + Enter | Run the current cell and remain on the same cell. |
| Alt + Enter | Run the current cell and insert a new cell below. |
6. Save Notebook Shortcut
Use the following shortcut to quickly save your notebook.
| Shortcut | Description |
|---|---|
| Ctrl + S | Save the current notebook. |
Conclusion
Keyboard shortcuts make working with Jupyter Notebook faster and more efficient. By learning the shortcuts for Command Mode, Edit Mode, notebook execution, and saving files, you can improve your productivity and reduce your dependence on the mouse.
Comments
Post a Comment