Collapse Sidebar


This function returns whether the given Enum/UserInputType gamepad supports a button corresponding with the given Enum//KeyCode. This function is used to determine valid gamepad inputs.

To determine which Enum/UserInputType gamepads are connected, use UserInputService/GetConnectedGamepads.

As UserInputService is client-side only, this function can only be used in a LocalScript.

See this page for articles on cross-platform development.

See also

  • UserInputService/GamepadConnected
  • UserInputService/GamepadDisconnected
  • UserInputService/GetConnectedGamepads
  • UserInputService/GetNavigationGamepads
  • UserInputService/SetNavigationGamepad
  • UserInputService/IsNavigationGamepad
  • UserInputService/IsGamepadButtonDown
  • UserInputService/GetSupportedGamepadKeyCodes
  • UserInputService/GetGamepadState
  • UserInputService/GetGamepadConnected
  • UserInputService/GamepadEnabled


Name Type Default Description

The Enum/UserInputType of the gamepad

The Enum/KeyCode of the button in question


Return Type Summary

Whether the given gamepad supports a button corresponding with the given Enum/KeyCode|KeyCode

Code Samples

Binding Functions to Gamepad Controls

This example binds the Enum/KeyCode|ButtonX key to action if it is supported by controller (Enum/UserInputType|Gamepad1). If bound, pressing the X Button invokes the action() function, which prints “Action”.