OptionalcaptureThe key runs before the handlers of the element with the focus (in the capture phase on the window), and the key
stops there. For a key of an open card that must win over a key of the canvas: the arrows of an open annotation
over the arrow keys of the camera controls. It runs only while the focus is in the viewer (its canvas, a card in
its container) or on the page, so a focused panel (a list) keeps its keys. Default: false, a focused element has
its keys first.
OptionalgroupA group for a UI, like 'Edit' or 'Camera' (ViewerActions.list)
OptionaliconAn icon for a UI: an SVG string, or the name of an icon of the UI
Unique id, like 'undo' or 'editorCamera.toggleEditing'. A new action with the same id replaces the old one.
The name in a menu or a tooltip
OptionalpriorityWhen two enabled actions have the same key, the one with the higher priority runs (then the one registered last).
Default: 0. An action that ends a mode (Escape that ends the pivot edit) is above one that acts on the selection
(Escape that clears it).
OptionalrepeatA held key runs the action again on each repeat of the key. Default: false, the action runs once per press.
OptionalshortcutThe key, like 'Mod+Z' (Mod: Cmd on a Mac, Ctrl on other platforms), 'Shift+D' or 'Delete', or a list of keys
that run it (['Delete', 'Backspace']). See parseShortcut and matchShortcut. An app changes it
with ViewerActions.setShortcut.
OptionalenabledThe action can run now. Default: always. A key of a disabled action is left to other handlers.
Runs the action. It can return (or resolve to) an error or a warning for the person.
An action: a command that a person runs from a key, a toolbar, a menu or a command palette. A plugin defines it once and registers it with
viewer.actions.register(ViewerActions.register); a UI lists and runs it.