ink-cartridge
    Preparing search index...

    Interface ShortcutOperationEntry

    A registered shortcut operation, addressable by actionId.

    Used by KeyboardEngine.defineShortcutAction / KeyboardEngine.addAction to register named callbacks that boundKeyboard and globalKeys can invoke by id. Actions decouple key bindings from callback logic — register once, reference by id everywhere, and change keys without touching every binding site.

    engine.defineShortcutAction([
    { actionId: 'save', action: () => saveFile(), keys: ['ctrl+s'] },
    ]);
    engine.boundKeyboard('save'); // uses the preset keys
    engine.boundKeyboard('f9', 'save'); // overrides keys locally
    engine.globalKeys([{ key: 'ctrl+s', operate: 'save' }]);
    interface ShortcutOperationEntry {
        action: () => void;
        actionId: string;
        keys?: string[];
    }
    Index
    action: () => void

    The callback invoked when the shortcut fires.

    actionId: string

    Unique identifier of the shortcut, used to retrieve and invoke the operation.

    keys?: string[]

    Preset keys that trigger this action.