Module · Engine client only
input
React to keys the player presses. You name the keys you want; your mod never sees anything else. Needs the "input" permission.
input.bind(key: string, fn: function): KeyBinding
client only
Calls fn each time a key is pressed.
input.bind("F7", function() panel:set("visible", not panel:get("visible")) end)input.bindRelease(key: string, fn: function): KeyBinding
client only
Calls fn each time a key is let go.
input.held(key: string): boolean
client only
True while a key is held down. Always false while the player is typing.
input.keys(): string[]
client only
Every key name you can use.
input.typing(): boolean
client only
True while the player is typing into a text box.