Reference API Roblox

Engine API

Website

Related

Reference API Roblox

InputBinding

Defines which hardware binding should trigger the parent InputAction.

This class is not browsable. It is not visible in Studio's object browser.
Tags: [NotBrowsable]

Member index 10

HistoryMember
667Down: KeyCode
663KeyCode: KeyCode
667Left: KeyCode
665PressedThreshold: float
665ReleasedThreshold: float
667Right: KeyCode
667Scale: float
663UIButton: GuiButton
667Up: KeyCode
667Vector2Scale: Vector2
inherited from Instance
553Archivable: bool
670Capabilities: SecurityCapabilities
553Name: string
553Parent: Instance
670Sandboxed: bool
616UniqueId: UniqueId
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
631GetAttributes(): Dictionary
648GetChildren(): Instances
462GetDebugId(scopeLength: int = 4): string
486GetDescendants(): Array
486GetFullName(): string
641GetStyled(name: string): Variant
657GetStyledPropertyChangedSignal(property: string): RBXScriptSignal
576GetTags(): Array
576HasTag(tag: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
664IsPropertyModified(property: string): bool
573Remove(): null
576RemoveTag(tag: string): null
664ResetPropertyToDefault(property: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
648children(): Instances
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
648getChildren(): Instances
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
657StyledPropertiesChanged()
553childAdded(child: Instance)
inherited from Object
647ClassName: string
647className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
650isA(className: string): bool
647Changed(property: string)

Description

An InputBinding defines which hardware binding should trigger the parent InputAction, for example a key press, gamepad button, or tap on a touch‑enabled device. There can be multiple InputBinding instances parented to an InputAction.

History 14

Members 10

Down

TypeDefault
KeyCodeUnknown

Specifies an alternate KeyCode for dispatching directionally "down" inputs to GetState() and the StateChanged event of the parent InputAction. When the parent action's Type is Direction1D, the dispatched value will be between 0 and -1. When the parent action's Type is Direction2D, the dispatched value will be a Vector2 between (0, 0) and (0, -1).

History 1

KeyCode

TypeDefault
KeyCodeUnknown

Specifies the KeyCode which triggers the parent InputAction. The code type should match the input action's Type, for example KeyCode.E for an action type of Bool or KeyCode.Thumbstick1 for an action type of Direction2D. Type mismatches will either not fire the InputAction or the StateChanged event will receive a converted value.

History 2

Left

TypeDefault
KeyCodeUnknown

Specifies an alternate KeyCode for dispatching directionally "left" inputs to GetState() and the StateChanged event of the parent InputAction. Only applies when the parent action's Type is Direction2D, in which case the dispatched value will be a Vector2 between (0, 0) and (-1, 0).

History 1

PressedThreshold

TypeDefault
float0.5

Numerical value above which to fire an InputAction with a Type of Bool, for example when a gamepad trigger such as KeyCode.ButtonL2 exceeds 0.5 (halfway pressed). Default is 0.5.

This property must be greater than or equal to ReleasedThreshold or else it will be clamped to ReleasedThreshold.

History 1

ReleasedThreshold

TypeDefault
float0.200000003

Numerical value below which to fire an InputAction with a Type of Bool, for example when a gamepad trigger such as KeyCode.ButtonL2 falls below 0.5 (less than halfway pressed). Default is 0.2.

This property must be less than or equal to PressedThreshold or else it will be clamped to PressedThreshold.

History 1

Right

TypeDefault
KeyCodeUnknown

Specifies an alternate KeyCode for dispatching directionally "right" inputs to GetState() and the StateChanged event of the parent InputAction. Only applies when the parent action's Type is Direction2D, in which case the dispatched value will be a Vector2 between (0, 0) and (1, 0).

History 1

Scale

TypeDefault
float1

Amount by which to linearly scale the values of an InputAction with Type of Direction1D or Direction2D.

History 2

UIButton

TypeDefault
GuiButton

GuiButton to connect to a boolean action.

History 2

Up

TypeDefault
KeyCodeUnknown

Specifies an alternate KeyCode for dispatching directionally "up" inputs to GetState() and the StateChanged event of the parent InputAction. When the parent action's Type is Direction1D, the dispatched value will be between 0 and 1. When the parent action's Type is Direction2D, the dispatched value will be a Vector2 between (0, 0) and (0, 1).

History 1

Vector2Scale

TypeDefault
Vector21, 1

Amount by which to linearly scale the values of an InputAction with Type of Direction2D.

History 1

Settings