Reference/Datatypes/GuiKeybind
Datatype · Userdata

GuiKeybind

userdata

Keybind proxy returned by GuiCategory:add_keybind. Carries a bound key and an activation mode.

Fields

NameTypeDescription
categoryGuiCategory?

Back-reference to the owning category. nil after the owning tab is gone.

destroy() -> ()

Marks the keybind destroyed.

get_key() -> KeyCode

Returns the bound KeyCode.

get_mode() -> KeybindMode

Returns the activation mode.

is_active() -> boolean

Returns the current latched activation state.

is_destroyed() -> boolean

Returns the destroyed flag.

is_visible() -> boolean

Returns the visibility flag.

kindControlKind

Always Enum.ControlKind.Keybind.

labelstring

Current label text.

namestring

Alias for label.

on_activated(callback: (active: boolean) -> ()) -> GuiConnection

Registers an activation listener.

on_changed(callback: (key: number) -> ()) -> GuiConnection

Registers an additional rebind listener.

set_key(key: KeyCode) -> ()

Sets the bound key.

set_label(text: string) -> ()

Replaces the label.

set_mode(mode: KeybindMode) -> ()

Sets the activation mode.

set_visible(visible: boolean) -> ()

Shows or hides the keybind row.