Skip to content

Keyboard shortcuts ​

The app binds JupyterLab's notebook shortcuts plus a few of its own. To see them in the app, press H in command mode, click the keyboard button in the toolbar, or choose Help › Keyboard Shortcuts in the Mac app. In the Mac, iPad and iPhone apps they are in Settings › Shortcuts, where H and Help › Keyboard Shortcuts take you.

Command mode is when a cell is selected but not being edited (press Esc to get there); edit mode is when the cursor is in a cell (press Enter). Single-letter shortcuts such as M (make the cell Markdown) work only in command mode; in edit mode they type the letter. The sheet says this too, and the toolbar's cell type picker changes a cell's type with the mouse.

Command palette ​

⇧⌘P (Ctrl+Shift+P on Windows and Linux) opens the command palette: every command in the tables below that works outside a cell editor, plus New Notebook, Save, Rename…, Download, Publish as Web Page…, Export as Markdown, Export as Script, Trust, Run All, Run with Parameters…, Clear All Outputs, Interrupt, Restart, a Change Kernel entry for each kernel, and the notebooks you opened recently. Type to filter, use ↑ and ↓ to pick, ↩ to run, and Esc to close. Rename… asks for the new name in the same field. The toolbar's command button opens it too (handy on a touch screen), and the Mac app has View › Command Palette…. Firefox keeps Ctrl+Shift+P (⇧⌘P) for a private window, so there use the toolbar button or rebind the palette in the Shortcuts sheet. In the Mac app the menu's ⇧⌘P stays as it is when you rebind it.

On a touch screen ​

While you edit a cell with the on-screen keyboard (an iPhone, or an iPad without a keyboard attached), a bar above the keyboard has Run (run and advance, Shift+Enter by default), esc, tab, the four arrows, and the symbols code needs most. tab, esc and the arrows do what the keys do: tab completes or indents, esc leaves edit mode. Swipe the bar sideways for more symbols.

On a touch screen, code in cells is 16 pixels, larger than elsewhere, so that iOS doesn't zoom in when you start editing a cell.

Changing a shortcut ​

Every shortcut can be rebound in the same sheet. On a row, + records a keystroke to add, × removes a binding, and Reset puts the row's defaults back; Reset All clears every change. Outside command mode, a single character (with or without Shift) types into the cell, so the sheet asks for ⌘, ⌃ or ⌥ (Ctrl or Alt elsewhere) with it, and it refuses a binding another shortcut already has where both could fire.

Changes are kept in the browser's local storage (ganymede-ui:shortcuts), so they belong to one browser and one origin: the same app served from another address starts with the defaults. The Mac and iPad apps keep their origin across launches, so changes there last.

Defaults ​

Notebook ​

ActionMacWindows, Linux
Run cell, select below⇧↩Shift+Enter
Run cell⌘↩Ctrl+Enter
Run cell, insert below⌥↩Alt+Enter
Find⌘FCtrl+F
Find next⌘GCtrl+G
Find previous⌘⇧GCtrl+Shift+G

Command mode ​

ActionMacWindows, Linux
Edit cell↩Enter
Select cell above↑, KUp, K
Select cell below↓, JDown, J
Extend selection above⇧↑, ⇧KShift+Up, Shift+K
Extend selection below⇧↓, ⇧JShift+Down, Shift+J
Select all cells⌘ACtrl+A
Insert cell aboveAA
Insert cell belowBB
Delete cellsD DD D
Cut cellsXX
Copy cellsCC
Paste cells belowVV
Undo cell operationZZ
Redo cell operation⇧ZShift+Z
Move cells up⌃⇧↑Ctrl+Shift+Up
Move cells down⌃⇧↓Ctrl+Shift+Down
Change to codeYY
Change to MarkdownMM
Change to rawRR
Collapse code⌘⌥[Ctrl+Alt+[
Expand code⌘⌥]Ctrl+Alt+]
Collapse all code⌘⌥⇧[Ctrl+Alt+Shift+[
Expand all code⌘⌥⇧]Ctrl+Alt+Shift+]
Show keyboard shortcutsHH

Edit mode ​

ActionMacWindows, Linux
Leave the cell (command mode)Esc, ⌃MEsc, Ctrl+M
Complete⇥Tab
Show documentation⇧⇥Shift+Tab

App ​

ActionMacWindows, Linux
Save⌘SCtrl+S
Command palette⌘⇧PCtrl+Shift+P

MIT license.