rojo/.cursor/rules/roblox/reference/engine/classes/InputBinding.yaml
2026-02-02 12:08:47 -06:00

419 lines
14 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# This file is automatically generated. Please don't edit it manually.
# To submit a bug report on the content, see
# https://devforum.roblox.com/c/bug-reports/documentation-issues/72
name: InputBinding
type: class
memory_category: Instances
summary: |
Defines which hardware binding should trigger the parent `Class.InputAction`.
description: |
An `InputBinding` defines which hardware binding should trigger the parent
`Class.InputAction`, for example a key press, gamepad button, or tap on a
touch‑enabled device. There can be multiple `InputBinding` instances parented
to an `Class.InputAction`.
code_samples: []
inherits:
- Instance
descendants: []
tags: []
deprecation_message: ''
properties:
- name: InputBinding.Backward
summary: |
Specifies an alternate `Enum.KeyCode` for dispatching directionally
"backward" inputs to the parent `Class.InputAction`.
description: |
Specifies an alternate `Enum.KeyCode` for dispatching directionally
"backward" inputs to `Class.InputAction:GetState()|GetState()` and the
`Class.InputAction.StateChanged|StateChanged` event of the parent
`Class.InputAction`. Only applies when the parent action's
`Class.InputAction.Type|Type` is `Enum.InputActionType|Direction3D`, in
which case the dispatched value will be a `Datatype.Vector3` with its
`Datatype.Vector3.Z|Z` component between `0` and `1`.
code_samples: []
type: KeyCode
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Composite Directions
serialization:
can_load: true
can_save: true
capabilities:
- Input
- name: InputBinding.Down
summary: |
Specifies an alternate `Enum.KeyCode` for dispatching directionally "down"
inputs to the parent `Class.InputAction`.
description: |
Specifies an alternate `Enum.KeyCode` for dispatching directionally "down"
inputs to `Class.InputAction:GetState()|GetState()` and the
`Class.InputAction.StateChanged|StateChanged` event of the parent
`Class.InputAction`.
When the parent action's `Class.InputAction.Type|Type` is
`Enum.InputActionType|Direction1D`, the dispatched value will be a number
between `0` and `-1`.
When the parent action's `Class.InputAction.Type|Type` is
`Enum.InputActionType|Direction2D`, the dispatched value will be a
`Datatype.Vector2` with its `Datatype.Vector2.Y|Y` component between `0`
and `-1`.
When the parent action's `Class.InputAction.Type|Type` is
`Enum.InputActionType|Direction3D`, the dispatched value will be a
`Datatype.Vector3` with its `Datatype.Vector3.Y|Y` component between `0`
and `-1`.
Not applicable when the parent action's `Class.InputAction.Type|Type` is
`Enum.InputActionType|Bool`.
code_samples: []
type: KeyCode
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Composite Directions
serialization:
can_load: true
can_save: true
capabilities:
- Input
- name: InputBinding.Forward
summary: |
Specifies an alternate `Enum.KeyCode` for dispatching directionally
"forward" inputs to the parent `Class.InputAction`.
description: |
Specifies an alternate `Enum.KeyCode` for dispatching directionally
"forward" inputs to `Class.InputAction:GetState()|GetState()` and the
`Class.InputAction.StateChanged|StateChanged` event of the parent
`Class.InputAction`. Only applies when the parent action's
`Class.InputAction.Type|Type` is `Enum.InputActionType|Direction3D`, in
which case the dispatched value will be a `Datatype.Vector3` with its
`Datatype.Vector3.Z|Z` component between `0` and `-1`.
code_samples: []
type: KeyCode
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Composite Directions
serialization:
can_load: true
can_save: true
capabilities:
- Input
- name: InputBinding.KeyCode
summary: |
Specifies the `Enum.KeyCode` which triggers the parent
`Class.InputAction`.
description: |
Specifies the `Enum.KeyCode` which triggers the parent
`Class.InputAction`. The code type should match the input action's
`Class.InputAction.Type|Type`, for example `Enum.KeyCode.E` for an action
type of `Enum.InputActionType|Bool` or `Enum.KeyCode.Thumbstick1` for an
action type of `Enum.InputActionType|Direction2D`. Type mismatches will
either not fire the `Class.InputAction` or the
`Class.InputAction.StateChanged|StateChanged` event will receive a
converted value.
code_samples: []
type: KeyCode
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Behavior
serialization:
can_load: true
can_save: true
capabilities:
- Input
- name: InputBinding.Left
summary: |
Specifies an alternate `Enum.KeyCode` for dispatching directionally "left"
inputs to the parent `Class.InputAction`.
description: |
Specifies an alternate `Enum.KeyCode` for dispatching directionally "left"
inputs to `Class.InputAction:GetState()|GetState()` and the
`Class.InputAction.StateChanged|StateChanged` event of the parent
`Class.InputAction`.
When the parent action's `Class.InputAction.Type|Type` is
`Enum.InputActionType|Direction2D`, the dispatched value will be a
`Datatype.Vector2` with its `Datatype.Vector2.X|X` component between `0`
and `-1`.
When the parent action's `Class.InputAction.Type|Type` is
`Enum.InputActionType|Direction3D`, the dispatched value will be a
`Datatype.Vector3` with its `Datatype.Vector3.X|X` component between `0`
and `-1`.
Not applicable when the parent action's `Class.InputAction.Type|Type` is
`Enum.InputActionType|Direction1D` or `Enum.InputActionType|Bool`.
code_samples: []
type: KeyCode
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Composite Directions
serialization:
can_load: true
can_save: true
capabilities:
- Input
- name: InputBinding.PressedThreshold
summary: |
Numerical value above which to fire an `Class.InputAction` with a
`Class.InputAction.Type|Type` of `Enum.InputActionType|Bool`.
description: |
Numerical value above which to fire an `Class.InputAction` with a
`Class.InputAction.Type|Type` of `Enum.InputActionType|Bool`, for example
when a gamepad trigger such as `Enum.KeyCode.ButtonL2` exceeds `0.5`
(halfway pressed). Default is `0.5`.
This property must be greater than or equal to
`Class.InputBinding.ReleasedThreshold|ReleasedThreshold` or else it will
be clamped to `Class.InputBinding.ReleasedThreshold|ReleasedThreshold`.
code_samples: []
type: float
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Behavior
serialization:
can_load: true
can_save: true
capabilities:
- Input
- name: InputBinding.ReleasedThreshold
summary: |
Numerical value below which to fire an `Class.InputAction` with a
`Class.InputAction.Type|Type` of `Enum.InputActionType|Bool`.
description: |
Numerical value below which to fire an `Class.InputAction` with a
`Class.InputAction.Type|Type` of `Enum.InputActionType|Bool`, for example
when a gamepad trigger such as `Enum.KeyCode.ButtonL2` falls below `0.5`
(less than halfway pressed). Default is `0.2`.
This property must be less than or equal to
`Class.InputBinding.PressedThreshold|PressedThreshold` or else it will be
clamped to `Class.InputBinding.PressedThreshold|PressedThreshold`.
code_samples: []
type: float
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Behavior
serialization:
can_load: true
can_save: true
capabilities:
- Input
- name: InputBinding.ResponseCurve
summary: |
Numerical value to configure scaling for more precise thumbstick aiming.
description: |
A numerical value to control the sensitivity of gamepad thumbstick input
by applying a quadratic response curve. Commonly used for camera control
to make small thumbstick inputs more precise, while ramping up quickly to
allow for large movements with higher magnitude input.
Ranges between `1` to `10`, with higher values providing a more intense
curve. Default is `1`, at which input is returned exactly as received.
Only applicable when the parent action's `Class.InputAction.Type|Type` is
`Enum.InputActionType|Direction2D` and the
`Class.InputBinding.KeyCode|KeyCode` is
`Enum.KeyCode.Thumbstick1|Thumbstick1` or
`Enum.KeyCode.Thumbstick2|Thumbstick2`.
code_samples: []
type: float
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Behavior
serialization:
can_load: true
can_save: true
capabilities:
- Input
- name: InputBinding.Right
summary: |
Specifies an alternate `Enum.KeyCode` for dispatching directionally
"right" inputs to the parent `Class.InputAction`.
description: |
Specifies an alternate `Enum.KeyCode` for dispatching directionally
"right" inputs to `Class.InputAction:GetState()|GetState()` and the
`Class.InputAction.StateChanged|StateChanged` event of the parent
`Class.InputAction`.
When the parent action's `Class.InputAction.Type|Type` is
`Enum.InputActionType|Direction2D`, the dispatched value will be a
`Datatype.Vector2` with its `Datatype.Vector2.X|X` component between `0`
and `1`.
When the parent action's `Class.InputAction.Type|Type` is
`Enum.InputActionType|Direction3D`, the dispatched value will be a
`Datatype.Vector3` with its `Datatype.Vector3.X|X` component between `0`
and `1`.
Not applicable when the parent action's `Class.InputAction.Type|Type` is
`Enum.InputActionType|Direction1D` or `Enum.InputActionType|Bool`.
code_samples: []
type: KeyCode
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Composite Directions
serialization:
can_load: true
can_save: true
capabilities:
- Input
- name: InputBinding.Scale
summary: |
Amount by which to linearly scale the values of a directional
`Class.InputAction`.
description: |
Amount by which to linearly scale the values of an `Class.InputAction`
with `Class.InputAction.Type|Type` of `Enum.InputActionType|Direction1D`,
`Enum.InputActionType|Direction2D`, or `Enum.InputActionType|Direction3D`.
code_samples: []
type: float
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Behavior
serialization:
can_load: true
can_save: true
capabilities:
- Input
- name: InputBinding.UIButton
summary: |
Connects a `Class.GuiButton` to a boolean action.
description: |
`Class.GuiButton` to connect to a boolean action.
code_samples: []
type: GuiButton
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Behavior
serialization:
can_load: true
can_save: true
capabilities:
- Input
- name: InputBinding.Up
summary: |
Specifies an alternate `Enum.KeyCode` for dispatching directionally "up"
inputs to the parent `Class.InputAction`.
description: |
Specifies an alternate `Enum.KeyCode` for dispatching directionally "up"
inputs to `Class.InputAction:GetState()|GetState()` and the
`Class.InputAction.StateChanged|StateChanged` event of the parent
`Class.InputAction`.
When the parent action's `Class.InputAction.Type|Type` is
`Enum.InputActionType|Direction1D`, the dispatched value will be a number
between `0` and `1`.
When the parent action's `Class.InputAction.Type|Type` is
`Enum.InputActionType|Direction2D`, the dispatched value will be a
`Datatype.Vector2` with its `Datatype.Vector2.Y|Y` component between `0`
and `1`.
When the parent action's `Class.InputAction.Type|Type` is
`Enum.InputActionType|Direction3D`, the dispatched value will be a
`Datatype.Vector3` with its `Datatype.Vector3.Y|Y` component between `0`
and `1`.
Not applicable when the parent action's `Class.InputAction.Type|Type` is
`Enum.InputActionType|Bool`.
code_samples: []
type: KeyCode
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Composite Directions
serialization:
can_load: true
can_save: true
capabilities:
- Input
- name: InputBinding.Vector2Scale
summary: |
Amount by which to linearly scale the values of a two-directional
`Class.InputAction`.
description: |
Amount by which to linearly scale the values of an `Class.InputAction`
with `Class.InputAction.Type|Type` of `Enum.InputActionType|Direction2D`.
code_samples: []
type: Vector2
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Behavior
serialization:
can_load: true
can_save: true
capabilities:
- Input
- name: InputBinding.Vector3Scale
summary: ''
description: ''
code_samples: []
type: Vector3
tags: []
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Behavior
serialization:
can_load: true
can_save: true
capabilities:
- Input
methods: []
events: []
callbacks: []