PowerKeys Scripting API
    Preparing search index...

    Interface HotkeyCaptureWrapper

    A hotkey capture element that displays the currently bound trigger and lets the user rebind it by pressing a new keyboard, mouse, or HID device event.

    interface HotkeyCaptureWrapper {
        OnPressed: (callback: EventCallback) => void;
        OnDown: (callback: EventCallback) => void;
        OnUp: (callback: EventCallback) => void;
        Hide: () => void;
        Show: () => void;
        Destroy: () => void;
        SetText: (text: string) => void;
        SetStyle: (style: UIStyle) => void;
        GetValue: () => string;
        SetValue: (val: string) => void;
        OnChange: (callback: EventCallback<[newValue: string]>) => void;
    }

    Hierarchy (View Summary)

    Index
    OnPressed: (callback: EventCallback) => void

    Backwards-compatible alias for OnDown. Do not register both unless both callbacks should run.

    OnDown: (callback: EventCallback) => void

    Fires when the captured keyboard, mouse, or HID trigger activates.

    OnUp: (callback: EventCallback) => void

    Fires on keyboard/mouse release after this capture activated. HID captures do not emit generic release events.

    Hide: () => void

    Hides the element without destroying it. Call Show() to make it visible again.

    Show: () => void

    Makes a previously hidden element visible again.

    Destroy: () => void

    Permanently removes the element from the UI panel.

    SetText: (text: string) => void

    Updates the element's display text when the element has a label.

    SetStyle: (style: UIStyle) => void

    Merges supported renderer style properties into the element; unsupported keys are ignored.

    GetValue: () => string

    Returns the current value of the element.

    SetValue: (val: string) => void

    Validates and normalizes the value for this control, persists it, and triggers OnChange with the normalized value. A wrong type or invalid constrained value throws without changing storage.

    OnChange: (callback: EventCallback<[newValue: string]>) => void

    Registers a callback that fires whenever the user changes the value.