PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

GetSupportedGamepadKeyCodes

This function returns an array of Enum/KeyCode|KeyCodes that the gamepad associated with the given Enum/UserInputType supports.

This function can be used to determine which KeyCodes are supported and not supported by a connected gamepad. To determine if a specific KeyCode is supported, use UserInputService/GamepadSupports.

If called on a non existent, or non connected, gamepad, this function will return an empty array.

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

Check out this article to learn more about adding support for gamepad input into your game and 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/GetGamepadState
  • UserInputService/GetGamepadConnected
  • UserInputService/GamepadSupports
  • UserInputService/GamepadEnabled

Parameters

Name Type Default Description

The Enum/UserInputType of the gamepad

Returns

Return Type Summary

An array of Enum/KeyCode|KeyCodes supported by the given gamepad