Skip to main content

Keyboard shortcuts

tip

Cmd/ctrl below indicates command on Mac and control on Windows and Linux. These instructions are for English/QWERTY keyboards.

Hex supports a number of keyboard shortcuts, most modeled after the standard Jupyter set, which make a distinction whether you are selected into a cell or not.

For a full list of supported keyboard shortcuts see the table here.

Edit mode

While in edit mode, you can type in a cell as with a normal text or code editor.

Press cmd + enter/return to run an individual cell

Press option + enter/return to run a cell and add a new cell after

Press shift + enter/return to run a cell and scroll to the next, or add a new cell if there isn't one immediately following

Press escape to enter Command mode. Users with Vim key bindings enabled will need to use shift + esc.

Press ctrl + space after a . to list the attributes for Python classes and objects

Press shift + tab to trigger in-line documentation for Python functions

Command mode

You can enter command mode by pressing escape. Command mode allows you to edit a notebook without typing into individual cells.

Press j or k to navigate down or up

Press a to add a cell above

Press b to add a cell below

Press dd (d twice) to delete a cell

Press enter/return to select into a cell (enter Edit mode)

Select multiple cells

To select multiple cells, first hit esc to enter Command mode, and then shift + up/down arrow or shift + j/k to select additional cells. After selecting a block of cells, you can move them up/down (with the usual j/k or cmd/ctrl up/down arrow) as well as copy/cut/paste (cmd/ctrl + c/x/v).

Command palette

You can access the command palette by hitting cmd+p. From there, you can filter the available actions by typing in the search bar and press enter, or use the corresponding keyboard shortcut, to execute.

Keyboard shortcuts list

Below are some actions we currently support with keyboard shortcuts. More complex actions (e.g. creating Input parameters, getting share links) are available via our Command palette.

ActionKeyboard CommandMode
Move cell downCmd + J, Cmd + DownCommand
Move cell upCmd + K, Cmd + UpCommand
Navigate to App builderAlt + 4Command, Edit
Navigate to Notebook viewAlt + 3Command, Edit
Restart and run allAlt + RCommand, Edit
Move cursor upUpEdit
Move cursor downDownEdit
UndoCmd + ZEdit
RedoCtrl + Shift + ZEdit
Select AllCmd + AEdit
DedentCmd + [Edit
IndentCmd + ]Edit
Code completion or indentTabEdit
Change the cell type to MarkdownMCommand
Change the cell type to CodeYCommand
Open the command paletteCmd + PCommand, Edit
Undo cell deletionZCommand
Delete selected cellsD + DCommand
Insert cell belowBCommand
Insert cell aboveACommand
Select cell belowDown, JCommand
Select cell aboveUp, KCommand
Select multiple cellsShift + Up/Down, Shift + J/KCommand
Copy/Cut/Paste cellCmd + C/X/VCommand
Exit Command (enter Edit )Enter (cell needs focus)Command
Enter Command (from Edit )Esc (cell needs focus), Shift + Esc for Vim usersCommand, Edit
Save checkpointCmd + SCommand, Edit
Run selected cellsCmd + EnterCommand, Edit
Run the current cell, select below⇧ + EnterCommand, Edit
Run the current cell, insert belowOption + EnterCommand, Edit
Open the Add Cell menuOption + A (note: the add cell menu will display additional shortcuts to create specific cell types)Command, Edit