input.bind
Registers a callback for an input chord.
Syntax
ue.input.bind(chord: string, callback: function, options?: table) -> integerParameters
| Parameter | Type | Description |
|---|---|---|
chord | string | Key with optional Ctrl, Shift, or Alt modifiers. |
callback | function(chord, event) | Receives the chord and pressed or released. |
options.event | string? | pressed (default), released, or both. |
Returns
| Type | Description |
|---|---|
integer | Input 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:
Kdoes not fire while Ctrl is held.