Search Docs
Loading...
Skip to content

Interface: KeyboardShortcut

Unified keyboard shortcut definition

Properties#

Property Type Description
keys string string[]
description? string Optional human-readable description of what this shortcut does.
category? string Optional category for grouping shortcuts in the UI
run ActionId
scope any[] 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) => boolean Optional 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? number For 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