A curated list of keyboard shortcuts that accelerate navigation, editing, and execution workflows inside Jupyter Notebook.
Jupyter Notebook shortcuts are predefined key combinations that let you perform common actions—running cells, editing code, switching modes, and navigating files—without reaching for the mouse. Mastering them noticeably speeds up exploratory programming, data analysis, and teaching sessions, allowing you to stay in a state of flow instead of constantly searching through menus.
Jupyter Notebook distinguishes between two primary interaction contexts:
Esc
. Keys act on the notebook structure (add, delete, move, run, etc.). A blue (or grey) border appears around the cell.Enter
or double-clicking a cell. Keys edit the cell’s contents. The border turns green.Most shortcuts are mode-specific, so learn to switch modes reflexively.
Shift + Enter
– Run current cell, select belowCtrl + Enter
– Run cell in placeAlt + Enter
– Run cell, insert new cell belowUp / Down Arrow
(Cmd Mode) – Select cell above / belowA
/ B
(Cmd Mode) – Insert cell Above / BelowM
(Cmd Mode) – Convert to MarkdownY
(Cmd Mode) – Convert to CodeD D
(double-tap D, Cmd Mode) – Delete cellZ
(Cmd Mode) – Undo delete cellCtrl + Shift + -
(Edit Mode) – Split cell at cursor0 0
(double-tap 0, Cmd Mode) – Restart kernelShift + L
(Cmd Mode) – Toggle line numbersS
(Cmd Mode) – Save notebookHold Shift
while clicking other cells to select a range. Once selected you can move the block with J
/K
or run them with Shift + Enter
.
When in Edit Mode, press Ctrl + F
for search; Ctrl + H
launches replace across the cell.
You can bind your own keys via the notebook’s advanced settings (Edit → Keyboard Shortcuts
) or programmatically:
%%javascript
Jupyter.keyboard_manager.command_shortcuts.add_shortcut('cmd-m', {
help : 'Convert cell to markdown',
handler : function(env) {
Jupyter.notebook.cells_to_markdown();
return false;
}
});
Shaving a second off every cell execution or markdown conversion may sound trivial, but notebooks routinely involve hundreds of these micro-interactions per session. Over days and weeks, shortcuts can reclaim hours of productive time, reduce wrist strain caused by mouse usage, and keep your cognitive focus in the code, not on the UI.
Pressing A
in Edit Mode simply types the letter a; in Command Mode it inserts a cell. Glancing at the cell border color before acting prevents unintended edits.
Relying on autosave can lead to lost work if the browser crashes. Remember to hit S
or Ctrl + S
to save checkpoints regularly.
Jumping back to the toolbar breaks flow. Challenge yourself to perform an entire analysis without touching the mouse to internalize shortcuts.
Below is a minimal workflow that demonstrates rapid cell execution and navigation using keyboard shortcuts.
# Cell 1 (Code): Shift+Enter to run
import pandas as pd
import seaborn as sns
# Cell 2 (Code): Alt+Enter inserts a new cell below after running
iris = sns.load_dataset('iris')
# Cell 3 (Markdown): Press M in Cmd Mode to convert to markdown
"""
### Quick Glance at Data
"""
# Cell 4 (Code): Shift+L toggles line numbers, Ctrl+Enter runs without moving
iris.head()
While Galaxy focuses on SQL editing rather than notebooks, the philosophy of keyboard-driven productivity carries over. Galaxy’s desktop app ships with its own set of SQL-specific shortcuts—such as Cmd + Enter
to execute a query or Cmd + /
to comment/uncomment lines—so notebook power-users will feel right at home.
Proficiency with Jupyter shortcuts eliminates repetitive mouse actions, accelerates exploratory data analysis, and keeps your cognitive load focused on solving data problems instead of UI navigation. Over time, this translates to hours saved each week, smoother live demos, and a more ergonomic workflow.
Press H
while in Command Mode to bring up the built-in cheat sheet with every key binding.
Yes. Navigate to Edit → Keyboard Shortcuts
, find the action you want, and reassign or remove the key binding. Changes are stored in your browser profile.
Galaxy includes a robust shortcut layer—such as Cmd + Enter
to run queries and Cmd + K
to open the command palette—mirroring the efficiency gains you get from Jupyter shortcuts.
Browser extensions, OS-level hotkeys, or international keyboard layouts may intercept certain combinations. Try disabling conflicting extensions or remapping the shortcut in Jupyter’s settings.