Search Docs
Loading...
Skip to content

Interface: KeyboardShortcut

Unified keyboard shortcut definition

Properties#

PropertyTypeDescription
keysstringstring[]
description?stringOptional human-readable description of what this shortcut does.
category?stringOptional category for grouping shortcuts in the UI
runActionId
scopeany[]Restrict the shortcut to one or more UI scopes: it fires only when the active scope (resolved from the focused element’s data-shortcut-scope ancestor) is in this list. Pass an empty array [] to fire in any scope.
when?(context) => booleanOptional condition to determine if the shortcut should be active. Checks editor state only; scope gating is handled by scope. Example when: ({ cesdk }) => { if (!cesdk.feature.isEnabled('ly.img.duplicate')) return false; return cesdk.engine.editor.getEditMode() === 'Transform'; }
sequenceTimeout?numberFor multi-step (sequence) shortcuts: the maximum milliseconds allowed between key presses before the in-progress sequence is forgotten. Ignored for single-chord shortcuts. Default 1000