Skip to main content

Reference

Keyboard shortcuts

Every shortcut for viewing, finding and annotating — and how to remap them.


Shortcuts apply while the viewport, or something inside it, has focus. Turn the viewer’s off with keyboard={false} on Viewer.Root.

Viewer

Keys Action
Ctrl/⌘ + / = · - · 0 Zoom in · out · fit width
Ctrl/⌘ + wheel, trackpad pinch Zoom (centred on narrow pages, under the cursor on wide ones)
← → (when the page fits) · Home · End Previous / next page · first · last
PageUp · PageDown · Space Turn the page in single-page mode
Ctrl/⌘ [ · ] Rotate
Alt + ← · → Back / forward after a jump

Find

Keys Action
Ctrl/⌘ + F Focus the find input (seeded with the selected text)
Enter · Shift + Enter Next · previous match
Esc Clear and return to the document

Annotations

Normal mode is select: read, select text, and double-click annotations to edit them. The table below is the live defaultKeymap:

ActionKeysDoes
view.zoomIn Ctrl/⌘ + =Ctrl/⌘ + + view.zoomIn
view.zoomOut Ctrl/⌘ + - view.zoomOut
view.fitWidth Ctrl/⌘ + 0 view.fitWidth
view.rotateCw Ctrl/⌘ + ] view.rotateCw
view.rotateCcw Ctrl/⌘ + [ view.rotateCcw
nav.back Alt + ArrowLeft nav.back
nav.forward Alt + ArrowRight nav.forward
nav.nextPage ArrowRightPageDownSpace nav.nextPage
nav.prevPage ArrowLeftPageUp nav.prevPage
nav.firstPage Home nav.firstPage
nav.lastPage End nav.lastPage
find.open Ctrl/⌘ + F find.open
edit.copy Ctrl/⌘ + C edit.copy
edit.copyFormatted Shift + Ctrl/⌘ + C edit.copyFormatted
help.shortcuts ? help.shortcuts
menu.context Shift + F10ContextMenu menu.context
tool.select V Select tool
tool.highlight H Highlight tool
tool.underline U Underline tool
tool.strikeout S Strikeout tool
tool.squiggly Q Squiggly tool
tool.area A Area tool
tool.note N Note tool
tool.ink P Ink tool
tool.rect R Rect tool
tool.ellipse O Ellipse tool
tool.arrow L Arrow tool
tool.freetext T Freetext tool
tool.eraser E Eraser tool
markup.highlight H With text selected: highlight
markup.underline U With text selected: underline
markup.strikeout S With text selected: strikeout
markup.comment C With text selected: highlight and comment
color.1 1Alt + 1 Colour 1 (selection, pending annotation or next one)
color.2 2Alt + 2 Colour 2 (selection, pending annotation or next one)
color.3 3Alt + 3 Colour 3 (selection, pending annotation or next one)
color.4 4Alt + 4 Colour 4 (selection, pending annotation or next one)
color.5 5Alt + 5 Colour 5 (selection, pending annotation or next one)
color.6 6Alt + 6 Colour 6 (selection, pending annotation or next one)
color.7 7Alt + 7 Colour 7 (selection, pending annotation or next one)
color.8 8Alt + 8 Colour 8 (selection, pending annotation or next one)
color.9 9Alt + 9 Colour 9 (selection, pending annotation or next one)
confirm Enter Keep the annotation just created
cancel Escape Discard the annotation just created; otherwise deselect and return to select
delete DeleteBackspace Delete the selected annotations
edit EnterF2 Edit the selected annotation’s note
undo Ctrl/⌘ + Z Undo
redo Shift + Ctrl/⌘ + ZCtrl/⌘ + Y Redo
nudge.left ArrowLeft Nudge the selected shape left (Shift ×10)
nudge.right ArrowRight Nudge the selected shape right (Shift ×10)
nudge.up ArrowUp Nudge the selected shape up (Shift ×10)
nudge.down ArrowDown Nudge the selected shape down (Shift ×10)

Remap any action through the keymap prop (merged over the defaults):

<Annotations.Root keymap={{ 'tool.area': ['b'], undo: ['mod+z', 'alt+backspace'] }}>
<Annotations.Root keymap={{ 'tool.area': ['b'], undo: ['mod+z', 'alt+backspace'] }}>

Combos are written mod+z (Ctrl on Windows and Linux, ⌘ on macOS), shift+mod+z, alt+1 or plain keys (h, Delete, ArrowLeft). comboLabel(store.keymap, 'tool.area') prints one for tooltips (B, ⌘Z, Ctrl+Z).

While typing in a note, plain digits type; use Alt + 1–9 to recolour. With `noteEmojis` set, the digits pick a note emoji instead of a color while the note tool is active or notes are selected. Enter keeps a new annotation (Shift + Enter adds a line), Esc discards it.