Skip to content

Keyboard shortcuts

Notebooks

This reference notebook covers nearly every command available in Observable! It’s a big list, but many should be familiar to you, being provided by your operating system. If you have trouble with any of these shortcuts, please let us know in the Observable GitHub feedback repository.

Use the keyboard to focus cells for editing.

Option-Shift-Down ⌥⇧↓
Focus next cell
Option-Shift-Up ⌥⇧↑
Focus previous cell
Ctrl-J CtrlJ
At cell reference, jump to definition
Control-Shift-J ⌃⇧J
Jump to previously-focused cell
Control-Shift-Down ⌃⇧↓
Move cell down
Control-Shift-Up ⌃⇧↑
Move cell up
Esc
Blur cell

Inserting and deleting cells

With a cell focused, add cells by inserting or splitting. Remove cells by merging them.

Ctrl-Return Ctrl↩︎
Insert cell below
Control-Shift-Return ⌃⇧↩︎
Insert cell above
Option-Return ⌥↩︎
Split cell, then focus below
Option-Shift-Return ⌥⇧↩︎
Split cell, then focus above
Option-Delete ⌥⌫
At cell start, merge with cell above
Control-Option-D ⌃⌥D
At cell end, merge with cell below
Option-Shift-Command-Down ⌥⇧⌘↓
Copy cell and insert it below
Option-Shift-Command-Up ⌥⇧⌘↑
Copy cell and insert it above

Editing text

Write text or code with contextual suggestions, indenting, commenting, and more.

Shift-Return ⇧↩︎
Ctrl-S CtrlS
Run cell
Shift-Ctrl-U ⇧CtrlU
Upload a file
Control-Space ⌃Space
Show code suggestions
Tab
Accept code suggestion
Control-Shift-P ⌃⇧P
Ctrl-. Ctrl.
Pin or unpin editor
Ctrl-, Ctrl,
Show or hide output
Option-Shift-F ⌥⇧F
Format code automatically
Shift-Tab ⇧⇥
Indent automatically
Ctrl-] Ctrl]
Indent more
Ctrl-[ Ctrl[
Indent less
Ctrl-Slash Ctrl/
Comment lines
Delete
Control-H ⌃H (macOS/iOS only)
Delete character before cursor
Delete Delete
Control-D ⌃D (macOS/iOS only)
Delete character after cursor
Control-Delete ⌃⌫
Delete to start of word before cursor
Control-Delete ⌃Delete
Option-Fn-Delete ⌥Fn⌫ (macOS/iOS only)
Delete to start of word after cursor
Command-Delete ⌘⌫ (macOS/iOS only)
Delete to start of line.
Command-Fn-Delete ⌘Fn⌫ (macOS/iOS only)
Delete to end of current line.
Return ↩︎
Insert a new line, and indent

Editing prose

In Markdown cells, use additional shortcuts for formatting rich text.

Ctrl-B CtrlB
Bold
Ctrl-I CtrlI
Italic
Option-Shift-5 ⌥⇧5
Strikethrough
Ctrl-K CtrlK
Link
Shift-Ctrl-7 ⇧Ctrl7
Numbered list
Shift-Ctrl-8 ⇧Ctrl8
Bulleted list
Option-Ctrl-1…6 ⌥Ctrl1…6
Heading 1 (or 2, 3, etc.)
Option-Ctrl-0 ⌥Ctrl0
Clear heading
Shift-Ctrl-F ⇧CtrlF
Monospaced font (code)

Text is inserted at the caret, or cursor. You can have multiple carets at the same time.

Left
Control-B ⌃B (macOS/iOS only)
Move the caret one character backward.
Right
Control-F ⌃F (macOS/iOS only)
Move the caret one character forward.
Up
Control-P ⌃P (macOS/iOS only)
Move the caret up one line.
Down
Control-N ⌃N (macOS/iOS only)
Move the caret down one line.
Control-Right ⌃→
Start of next word
Control-Left ⌃←
Start of previous word
Home Home
Option-Left ⌥←
Start of line
End End
Option-Right ⌥→
End of line
Command-Left ⌘←
Start of line, without wrapping
Command-Right ⌘→
End of current line, without wrapping
Control-Home ⌃Home
Start of cell
Control-End ⌃End
End of cell
PageUp PageUp
Previous screen
PageDown PageDown
Control-V ⌃V (macOS/iOS only)
Next screen

Multiple carets

Ctrl-Click CtrlClick
Add caret
Esc
Clear additional carets

Selecting text

Add the Shift key to the shortcuts above to turn a caret into a text selection. You can have multiple selections at the same time.

Shift-Left ⇧←
Control-Shift-B ⌃⇧B (macOS/iOS only)
Extend the selection one character backwards.
Shift-Right ⇧→
Control-Shift-F ⌃⇧F (macOS/iOS only)
Extend the selection one character forwards.
Shift-Up ⇧↑
Extend the selection up one line.
Shift-Down ⇧↓
Control-Shift-N ⌃⇧N (macOS/iOS only)
Extend the selection down one line.
Control-Shift-Left ⌃⇧←
Start of previous word
Control-Shift-Right ⌃⇧→
End of next word
Shift-Home ⇧Home
Option-Shift-Left ⌥⇧←
Start of current line
Shift-End ⇧End
Option-Shift-Right ⌥⇧→
Extend the selection to the end of the current line.
Shift-Command-Left ⇧⌘←
Start of current line without wrapping
Shift-Command-Right ⇧⌘→
End of the current line without wrapping
Control-Shift-Home ⌃⇧Home
Start of current cell
Control-Shift-End ⌃⇧End
End of current cell
Shift-PageUp ⇧PageUp
Previous screen
Shift-PageDown ⇧PageDown
Control-Shift-V ⌃⇧V (macOS/iOS only)
Next screen
Ctrl-A CtrlA
Select all
Esc
Clear selection

Multiple selections

Ctrl-Drag CtrlDrag
Add range selection
Option-Ctrl-Drag ⌥CtrlDrag
Add box selection
Option-Drag ⌥Drag
Replace selection with box selection
Esc
Clear additional selections

Selecting cells

Select cells with these page-level shortcuts to perform bulk actions on multiple cells.

J
Select next cell
K
Select previous cell
Shift-J ⇧J
Select next and current cell
Shift-K ⇧K
Select previous and current cell
X
Select or unselect current cell
Shift-Return ⇧↩︎
Run cells
Option-Up ⌥↑
Move cells up
Option-Down ⌥↓
Move cells down
Option-Shift-Up ⌥⇧↑
Copy cells up
Option-Shift-Down ⌥⇧↓
Copy cells down
.
Pin or unpin cells
,
Show or hide outputs
D
Option-Delete ⌥⌫
Delete cells
C
Add comment
O
Ctrl-Return Ctrl↩︎
Insert cell below
Shift-O ⇧O
Shift-Ctrl-Return ⇧Ctrl↩︎
Insert cell above
Option-Return ⌥↩︎
Insert cell of same type below
Option-Shift-Return ⌥⇧↩︎
Insert cell of same type above
Shift-A ⇧A
Select all
Esc
Clear selection

Find and Replace

Use the Find and Replace pane (magnifying glass icon) to find and replace text or code on the page.

Shift-Ctrl-F ⇧CtrlF
Open the Find pane
Ctrl-G CtrlG
Find next occurrence
Shift-Ctrl-G ⇧CtrlG
Find previous occurrence
Return ↩︎
In Find input, find next occurrence
Shift-Return ⇧↩︎
In Find input, find previous occurrence
Return ↩︎
In Replace input, replace current occurrence

Clipboard

You can copy-and-paste code either within or across cells.

Ctrl-C CtrlC
Copy the selected text. If there is no selection, copy the current line.
Ctrl-X CtrlX
Cut the selected text. If there is no selection, cut the current line.
Ctrl-V CtrlV
Paste the current clipboard contents. If the previous cut or copy was done without selecting (see the previous Clipboard key definitions), paste at the start of the next line rather than at the caret.
Control-K ⌃K
Kill (cut) the selected text. If there is no selection, kill the text between the caret and the end of the current line.
Control-Y ⌃Y
Yank (paste) the previously killed text.

History

You can undo and redo changes to code; each cell maintains a separate history. (Observable doesn’t yet support undo and redo to cell-level commands, but you can revert unwanted changes in the notebook menu.)

Ctrl-Z CtrlZ
Undo the last change.
Control-Y ⌃Y
Redo the last undone change.

Other

Question mark
If a cell is not focused, show keyboard shortcuts. Be sure text is not selected and the Search form is not in use.
Slash
If a cell is not focused, display the Search form.
F
Enter full screen.
T
Enter Tinker mode.