interface KeyBindingOptions {
    group?: string;
    hidden?: boolean;
    inText?: boolean;
    label?: string;
    layered?: boolean;
    when?: () => boolean;
}

Properties

group?: string

Section of the shortcuts panel. Default Widget.

hidden?: boolean

Keep out of the shortcuts panel (a binding that only exists to layer under another).

inText?: boolean

Fire even when the focus is in a text field. Default false.

label?: string

Shown in the shortcuts panel. Defaults to the chord itself.

layered?: boolean

Declares that this binding shares its chord on purpose: it declines when it does not apply, so an earlier widget binding or the engine's own command on the same chord still fires. Without it a second registration on a chord, or one on a chord the engine binds, is recorded as a conflict.

when?: () => boolean

Gate read at key time; a false skips the binding without declining for others.