Buy Me a Coffee at ko-fi.com

Represents a key binding for your script
Instances are obtained using the KeybindAPI's create() function

Toggles if this keybind should be processed or not

overload 1:
Keybind.enabled(bool: Boolean): Keybind
typings.1729365000typings.849613564
Method PropertyFluent DescriptionRepresentation
bool accepts
Return Value

Returns the numeric ID of this keybind

overload 1:
Keybind.getID(): Integer
typings.-672261858
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the current key for this keybind

overload 1:
Keybind.getKey(): String
typings.-1808118735
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the name of the current key for this keybind

overload 1:
Keybind.getKeyName(): String
typings.-1808118735
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the name of the keybind, which you set when you created the keybind

overload 1:
Keybind.getName(): String
typings.-1808118735
Method PropertyFluent DescriptionRepresentation
Return Value

Set whenever or not this keybind should run when a GUI screen is open

overload 1:
Keybind.gui(bool: Boolean): Keybind
typings.1729365000typings.849613564
Method PropertyFluent DescriptionRepresentation
bool accepts
Return Value

Checks whether this key is currently set to its default state (not been changed using the keybind menu)

overload 1:
Keybind.isDefault(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Returns if this keybind is enabled or not

overload 1:
Keybind.isEnabled(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Returns if this keybind should work when a GUI screen (Chat, Inventory, etc) is open or not

overload 1:
Keybind.isGuiEnabled(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Gets whether this keybind is currently pressed down

overload 1:
Keybind.isPressed(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Sets the key for this keybind

overload 1:
Keybind.key(key: String): Keybind
typings.-1808118735typings.849613564
Method PropertyFluent DescriptionRepresentation
key accepts
Return Value

Sets the function that is executed when this key is pressed
The function has two arguments
The first argument is a number containing a bitmask of the currently held modifier keys
Shift = 1, Ctrl = 2, Alt = 4
The second argument is this keybind itself

overload 1:
Keybind.onPress(function: Function): Keybind
typings.1445582840typings.849613564
Method PropertyFluent DescriptionRepresentation
function accepts
Return Value

Sets the function that is executed when this key is released
The function has two arguments
The first argument is a number containing a bitmask of the currently held modifier keys
Shift = 1, Ctrl = 2, Alt = 4
The second argument is this keybind itself

overload 1:
Keybind.onRelease(function: Function): Keybind
typings.1445582840typings.849613564
Method PropertyFluent DescriptionRepresentation
function accepts
Return Value

Toggles if this keybind should be processed or not

overload 1:
Keybind.setEnabled(bool: Boolean): Keybind
typings.1729365000typings.849613564
Method PropertyFluent DescriptionRepresentation
bool accepts
Return Value

Set whenever or not this keybind should run when a GUI screen is open

overload 1:
Keybind.setGUI(bool: Boolean): Keybind
typings.1729365000typings.849613564
Method PropertyFluent DescriptionRepresentation
bool accepts
Return Value

Sets the key for this keybind

overload 1:
Keybind.setKey(key: String): Keybind
typings.-1808118735typings.849613564
Method PropertyFluent DescriptionRepresentation
key accepts
Return Value

Sets the function that is executed when this key is pressed
The function has two arguments
The first argument is a number containing a bitmask of the currently held modifier keys
Shift = 1, Ctrl = 2, Alt = 4
The second argument is this keybind itself

overload 1:
Keybind.setOnPress(function: Function): Keybind
typings.1445582840typings.849613564
Method PropertyFluent DescriptionRepresentation
function accepts
Return Value

Sets the function that is executed when this key is released
The function has two arguments
The first argument is a number containing a bitmask of the currently held modifier keys
Shift = 1, Ctrl = 2, Alt = 4
The second argument is this keybind itself

overload 1:
Keybind.setOnRelease(function: Function): Keybind
typings.1445582840typings.849613564
Method PropertyFluent DescriptionRepresentation
function accepts
Return Value

A function that runs when the key is pressed down
The function has two arguments
The first argument is a number containing a bitmask of the currently held modifier keys
Shift = 1, Ctrl = 2, Alt = 4
The second argument is this keybind itself
If the return value is true then all vanilla keybinds using same key will be ignored

field signature:
Keybind.press: Function
typings.1445582840
Method PropertyFluent DescriptionRepresentation
Field Type

A function that runs when the key is released
The function has two arguments
The first argument is a number containing a bitmask of the currently held modifier keys
Shift = 1, Ctrl = 2, Alt = 4
The second argument is this keybind itself
If the return value is true then all vanilla keybinds using same key will be ignored

field signature:
Keybind.release: Function
typings.1445582840
Method PropertyFluent DescriptionRepresentation
Field Type