Skip to content

Input ​

Inherits Instance.

A service: the global Input is the game's one Input.

Properties ​

NameTypeNotes
GamepadEnabledbooleanRead-only.
KeyboardEnabledbooleanRead-only.
MouseEnabledbooleanRead-only.
TouchEnabledbooleanRead-only.

Methods ​

  • GetConnectedGamepads(): {EnumUserInputType}
  • GetGamepadConnected(gamepad: EnumUserInputType): boolean
  • GetGamepadState(gamepad: EnumUserInputType): {InputObject}
  • GetKeysPressed(): {InputObject}
  • GetMouseLocation(): Vector2
  • IsGamepadButtonDown(gamepad: EnumUserInputType, button: EnumKeyCode): boolean
  • IsKeyDown(keyCode: EnumKeyCode): boolean
  • IsMouseButtonPressed(mouseButton: EnumUserInputType): boolean

Events ​

  • GamepadConnected, whose handlers get (EnumUserInputType).
  • GamepadDisconnected, whose handlers get (EnumUserInputType).
  • InputBegan, whose handlers get (InputObject, boolean).
  • InputChanged, whose handlers get (InputObject, boolean).
  • InputEnded, whose handlers get (InputObject, boolean).
  • TouchEnded, whose handlers get (InputObject, boolean).
  • TouchMoved, whose handlers get (InputObject, boolean).
  • TouchStarted, whose handlers get (InputObject, boolean).
  • TouchTap, whose handlers get ({Vector2}, boolean).

Inherited ​

From Instance: AddTag, AncestryChanged, Archivable, AttributeChanged, Changed, ChildAdded, ChildRemoved, ClassName, ClearAllChildren, Clone, DescendantAdded, DescendantRemoving, Destroy, Destroying, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, GetDescendants, GetFullName, GetPropertyChangedSignal, GetTags, HasTag, IsA, IsAncestorOf, IsDescendantOf, IsPropertyModified, Name, Parent, QueryDescendants, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild.

Apache License 2.0