input.bind

Registers a callback for an input chord.

Syntax

ue.input.bind(chord: string, callback: function, options?: table) -> integer

Parameters

ParameterTypeDescription
chordstringKey with optional Ctrl, Shift, or Alt modifiers.
callbackfunction(chord, event)Receives the chord and pressed or released.
options.eventstring?pressed (default), released, or both.

Returns

TypeDescription
integerInput binding ID.

Example

local id = ue.input.bind(
    "Ctrl+K",
    function(chord, event)
        print(chord, event)
    end,
    { event = "both" }
)

Notes

  • Bindings observe input but do not consume it.
  • Modifiers are exact: K does not fire while Ctrl is held.

On this page