# InputBinding

Roblox Engine API class from Roblox Studio 0.744.0.7441077 (version-7aaa6838d36c4448).

- Inherits from, nearest first: [Instance](https://rapi.sleaze.dev/classes/Instance.md), [Object](https://rapi.sleaze.dev/classes/Object.md)
- Memory category: Instances
- HTML page: https://rapi.sleaze.dev/classes/InputBinding/
- Roblox documentation: https://create.roblox.com/docs/reference/engine/classes/InputBinding

Defines which hardware binding should trigger the parent [`InputAction`](https://rapi.sleaze.dev/classes/InputAction.md).

## Properties

### Deadzone

```luau
InputBinding.Deadzone: NumberRange = NumberRange.new(0.1, 1)
```

- Tags: Capabilities: Input

### KeyCode

```luau
InputBinding.KeyCode: Enum.KeyCode = Enum.KeyCode.None
```

- Tags: Read capabilities: Input

Specifies the [`KeyCode`](https://rapi.sleaze.dev/classes/InputBinding.md) which triggers the parent [`InputAction`](https://rapi.sleaze.dev/classes/InputAction.md).

### PointerIndex

```luau
InputBinding.PointerIndex: number = 0
```

- Tags: Read capabilities: Input

### PressedThreshold

```luau
InputBinding.PressedThreshold: number = 0.5
```

- Tags: Read capabilities: Input

Numerical value above which to fire an [`InputAction`](https://rapi.sleaze.dev/classes/InputAction.md) with a [`Type`](https://rapi.sleaze.dev/classes/InputBinding.md) of `Bool`.

### PrimaryModifier

```luau
InputBinding.PrimaryModifier: Enum.KeyCode = Enum.KeyCode.None
```

- Tags: Read capabilities: Input

Specifies a primary [`KeyCode`](https://rapi.sleaze.dev/classes/InputBinding.md) that must be pressed for the binding to activate.

### ReleasedThreshold

```luau
InputBinding.ReleasedThreshold: number = 0.200000003
```

- Tags: Read capabilities: Input

Numerical value below which to fire an [`InputAction`](https://rapi.sleaze.dev/classes/InputAction.md) with a [`Type`](https://rapi.sleaze.dev/classes/InputBinding.md) of `Bool`.

### ResponseCurve

```luau
InputBinding.ResponseCurve: number = 1
```

- Tags: Read capabilities: Input

Numerical value to configure scaling for more precise thumbstick aiming.

### Scale

```luau
InputBinding.Scale: number = 1
```

- Tags: Read capabilities: Input

Scalar multiplier applied uniformly to all components of a directional [`InputAction`](https://rapi.sleaze.dev/classes/InputAction.md)'s output.

### SecondaryModifier

```luau
InputBinding.SecondaryModifier: Enum.KeyCode = Enum.KeyCode.None
```

- Tags: Read capabilities: Input

Specifies a secondary [`KeyCode`](https://rapi.sleaze.dev/classes/InputBinding.md) that must be pressed for the binding to activate.

### Type

```luau
InputBinding.Type: Enum.InputBindingType = Enum.InputBindingType.Automatic
```

- Tags: Capabilities: Input

Determines whether this binding is triggered by hardware input or programmatically via [`Fire()`](https://rapi.sleaze.dev/classes/Fire.md).

### UIButton

```luau
InputBinding.UIButton: GuiButton
```

- Tags: Read capabilities: Input

Connects a [`GuiButton`](https://rapi.sleaze.dev/classes/GuiButton.md) to a boolean action.

### UIModifier

```luau
InputBinding.UIModifier: GuiButton
```

- Tags: Capabilities: Input

Specifies a [`GuiButton`](https://rapi.sleaze.dev/classes/GuiButton.md) that must be active for the binding to activate.

### Vector2Scale

```luau
InputBinding.Vector2Scale: Vector2 = Vector2.one
```

- Tags: Read capabilities: Input

Per-component scale applied to the output of a `Direction2D` action.

### Vector3Scale

```luau
InputBinding.Vector3Scale: Vector3 = Vector3.one
```

- Tags: Read capabilities: Input

Per-component scale applied to the output of a `Direction3D` action.

### Backward

```luau
InputBinding.Backward: Enum.KeyCode = Enum.KeyCode.None
```

- Tags: Read capabilities: Input

Specifies an alternate [`KeyCode`](https://rapi.sleaze.dev/classes/InputBinding.md) for dispatching directionally "backward" inputs to the parent [`InputAction`](https://rapi.sleaze.dev/classes/InputAction.md).

### ClampMagnitudeToOne

```luau
InputBinding.ClampMagnitudeToOne: boolean = true
```

- Tags: Capabilities: Input

Specifies how the binding normalizes composite directional input to a maximum magnitude of `1`.

### Down

```luau
InputBinding.Down: Enum.KeyCode = Enum.KeyCode.None
```

- Tags: Read capabilities: Input

Specifies an alternate [`KeyCode`](https://rapi.sleaze.dev/classes/InputBinding.md) for dispatching directionally "down" inputs to the parent [`InputAction`](https://rapi.sleaze.dev/classes/InputAction.md).

### Forward

```luau
InputBinding.Forward: Enum.KeyCode = Enum.KeyCode.None
```

- Tags: Read capabilities: Input

Specifies an alternate [`KeyCode`](https://rapi.sleaze.dev/classes/InputBinding.md) for dispatching directionally "forward" inputs to the parent [`InputAction`](https://rapi.sleaze.dev/classes/InputAction.md).

### Left

```luau
InputBinding.Left: Enum.KeyCode = Enum.KeyCode.None
```

- Tags: Read capabilities: Input

Specifies an alternate [`KeyCode`](https://rapi.sleaze.dev/classes/InputBinding.md) for dispatching directionally "left" inputs to the parent [`InputAction`](https://rapi.sleaze.dev/classes/InputAction.md).

### Right

```luau
InputBinding.Right: Enum.KeyCode = Enum.KeyCode.None
```

- Tags: Read capabilities: Input

Specifies an alternate [`KeyCode`](https://rapi.sleaze.dev/classes/InputBinding.md) for dispatching directionally "right" inputs to the parent [`InputAction`](https://rapi.sleaze.dev/classes/InputAction.md).

### Up

```luau
InputBinding.Up: Enum.KeyCode = Enum.KeyCode.None
```

- Tags: Read capabilities: Input

Specifies an alternate [`KeyCode`](https://rapi.sleaze.dev/classes/InputBinding.md) for dispatching directionally "up" inputs to the parent [`InputAction`](https://rapi.sleaze.dev/classes/InputAction.md).

### DisplayImage

```luau
InputBinding.DisplayImage: Content
```

- Tags: Capabilities: Input

Custom image asset to display for this binding.

### DisplayName

```luau
InputBinding.DisplayName: string = ""
```

- Tags: Capabilities: Input

Custom display text for this binding.

### Editor

```luau
InputBinding.Editor: boolean = false
```

- Tags: Not replicated, Not scriptable, Roblox script security, Read capabilities: Input

## Methods

### Fire

```luau
InputBinding:Fire(state: any)
```

- Tags: Capabilities: Input, Simulation access

Programmatically updates the parent [`InputAction`](https://rapi.sleaze.dev/classes/InputAction.md) state through this binding.

Parameters:

- `state`: The state value to apply; must match the parent action's [`Type`](https://rapi.sleaze.dev/classes/InputBinding.md).

## Inherited members

- From [Instance](https://rapi.sleaze.dev/classes/Instance.md): `Archivable`, `archivable`, `Attributes`, `AttributesReplicate`, `AttributesSerialize`, `HistoryId`, `Name`, `Parent`, `PredictionMode`, `PropertyStatusStudio`, `RobloxLocked`, `SerializedOverrides`, `SourceAssetId`, `Tags`, `UniqueId`, `numExpectedDirectChildren`, `DataCost`, `Capabilities`, `DefinesCapabilities`, `IsInSandbox`, `Sandboxed`, `AddTag`, `ClearAllChildren`, `Clone`, `Destroy`, `FindFirstAncestor`, `FindFirstAncestorOfClass`, `FindFirstAncestorWhichIsA`, `FindFirstChild`, `FindFirstChildOfClass`, `FindFirstChildWhichIsA`, `FindFirstDescendant`, `GetActor`, `GetAttribute`, `GetAttributeChangedSignal`, `GetAttributes`, `GetChildren`, `GetDebugId`, `GetDescendants`, `GetFullName`, `GetStyled`, `GetStyledPropertyChangedSignal`, `GetTags`, `HasTag`, `IsAncestorOf`, `IsDescendantOf`, `IsPropertyModified`, `QueryDescendants`, `RemoveTag`, `ResetPropertyToDefault`, `SetAttribute`, `WaitForChild`, `Remove`, `children`, `clone`, `destroy`, `findFirstChild`, `getChildren`, `isDescendantOf`, `remove`, `AncestryChanged`, `AttributeChanged`, `ChildAdded`, `ChildRemoved`, `DescendantAdded`, `DescendantRemoving`, `Destroying`, `StyledPropertiesChanged`, `childAdded`
- From [Object](https://rapi.sleaze.dev/classes/Object.md): `ClassName`, `className`, `GetPropertyChangedSignal`, `IsA`, `isA`, `Changed`
