Web SDKv1.0.0

Keyboard shortcuts

A viewer's shortcuts act only for that viewer: when the key comes from inside it, or when focus is on the page itself and the viewer was the last thing the user clicked or focused. A viewer takes the page-level keys (PageDown, Home, Ctrl/Cmd+P, Ctrl/Cmd+F, Ctrl/Cmd+Z, the zoom keys) only once the user has clicked or focused inside it — until then, and again once the user clicks elsewhere on your page, those keys are your page's own. Two viewers on one page never both act.

The page and zoom keys, Print, Undo/Redo, Find and the sidebar key are ignored while a text field, list or editable element has focus, and are off with navigation.keyboardShortcuts: false. Escape always leaves the current tool, so a viewer can never trap the user in one: it stays on with keyboardShortcuts: false, and inside one of the viewer's own text fields the field handles it first. The keys that act on something you have selected (the Selections and Search Bar tables, Delete on a placed object, and Enter in Add Text) belong to that control and stay on. A key that the toolbar or a selected object is using (an arrow, Home, End) does not also turn the page.

Example

TypeScript
new PDFViewer(container, doc, {
  navigation: { keyboardShortcuts: true },
});

Navigation & Zoom

ShortcutAction
ArrowLeft / PageUpPrevious page
ArrowRight / PageDownNext page
HomeFirst page
EndLast page
Ctrl/Cmd + =Zoom in
Ctrl/Cmd + -Zoom out
Ctrl/Cmd + 0Fit page
Ctrl/Cmd + 1Fit width
Ctrl/Cmd + PPrint, exactly as the toolbar's Print button: your callbacks.onPrint if set, otherwise the SDK's print, asking first unless print.ask: false. With toolbar.print: false, or a license without printing, the browser gets the key

Editing

ShortcutAction
Ctrl/Cmd + ZUndo (also with the buttons hidden by toolbar.history: false)
Ctrl/Cmd + Y or Ctrl/Cmd + Shift + ZRedo
Ctrl/Cmd + FOpen or close the search bar; with Search off (tools.search: false) the browser's own find gets the key
EscapeLeave the open block (first press) / leave the tool (second press). In Edit Text the second press writes the edits, as Done does
EnterConfirm text input (Add Text)
Delete / BackspaceDelete the selected placed object (stamp, image, shape, added text, signature) or the selected annotation the document came with
Ctrl/Cmd + \Open or close the sidebar

Selections

ShortcutAction
Tab / Shift + TabEdit Text: the next / previous text block
EnterEdit Text: edit the selected block. A placed object: put it down
Arrow keysA placed object: move it 1 screen pixel (Shift: 10)
EscapeA placed object: cancel the move or resize
Delete / BackspaceManage Pages: delete the selected pages

Comments panel

ShortcutAction
Tab / Shift + TabThe next / previous comment card
Enter / Space on a cardChoose it: its mark is scrolled to and outlined
Ctrl/Cmd + EnterSend the reply or the edit being written
Escape in a reply or an editCancel it
ArrowDown / ArrowUp in a menuMove through a card's menu; Escape closes it

Search Bar

ShortcutAction
EnterFind next match
Shift + EnterFind previous match
EscapeClose search bar

Notes

Keyboard access. Skip link: the first Tab stop in the viewer is "Skip to the document", visible only while it has focus; it puts focus on the page area.

The toolbar is one Tab stop. Tab reaches it, ArrowLeft / ArrowRight move between its controls, Home / End jump to the ends, and Tab leaves it. The active tool's button is the one Tab lands on. The ribbon's tab strip moves between tabs with ArrowLeft / ArrowRight.

Dialogs trap focus — the download, print, link, signature and security dialogs keep Tab inside while open and return focus to whatever opened them when they close.

What a screen reader hears. A polite live region announces tool changes ("Highlight tool active", "Highlight tool closed"), page changes ("Page 4 of 6"), the sidebar opening and closing, and completions such as a finished download. Errors are announced assertively.

Focus ring. One ring everywhere: 2 px of the accent, 2 px outside the control, drawn only for keyboard focus (:focus-visible), and the system highlight color under forced-colors mode. See Theme tokens for --ks-focus-ring and --ks-focus-offset.