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: () => void) => void;
    OnDown: (callback: () => void) => void;
    OnUp: (callback: () => void) => void;
    Hide: () => void;
    Show: () => void;
    Destroy: () => void;
    SetText: (text: string) => void;
    SetStyle: (style: Record<string, unknown>) => void;
    GetValue: () => string;
    SetValue: (val: string) => void;
    OnChange: (callback: (newValue: string) => void) => void;
}

Hierarchy (View Summary)

Properties

OnPressed: (callback: () => void) => void

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

OnDown: (callback: () => void) => void

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

OnUp: (callback: () => void) => 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: Record<string, unknown>) => void

Merges safe CSS-like renderer style metadata into the element.

GetValue: () => string

Returns the current value of the element.

SetValue: (val: string) => void

Programmatically sets the element's value. Persists to storage and triggers OnChange listeners.

OnChange: (callback: (newValue: string) => void) => void

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