Skip to content
Benjamin Schulte edited this page Jan 4, 2022 · 10 revisions

Feature overview

This table gives you a quick overview which features the different platform implementations provide and which are supported by this library's platform implementations. Read and understand the main documentation page first.

Android

  • A game controller is a special type of input device. Some controller buttons may return key codes from normal input devices, in most cases Select button is mapped to Input.Keys.BACK. You can adjust with AndroidControllers.ignoreNoGamepadButtons field if you want to ignore such buttons.
  • Game controller buttons and axis are mapped on the mappings returned by getMapping(), if possible
  • Vibration is not supported by operating system
  • Player index is not supported by operating system
  • getAxisCount() returns the real available axis count
  • getButtonMin/Max() return constants 0 to 300 for the platform, because all key codes are available in theory (see above)
  • Power Level not supported

Desktop

  • Game controllers have always the same input mapping based on a mapping file. If a game controller can't get mapped, it won't show up. This works on Mac, Windows and Linux. Raspi not tested.
  • L2 and R2 buttons are not reported as buttons, they are mapped on axis 4 and 5. This way, controllers with sliders can be supported without the need to define another mapping.
  • Vibration is supported on Windows and Linux, if connected game controller supports it
  • Player index is supported, but only emulated and won't affect hardware indicators
  • getAxisCount() and getButtonMin/Max() return real values (starting with version 2.1.0)
  • Power Level supported on Windows with some controllers

HTML

  • Game controllers have the same input mapping that is returned by getMapping(), if possible. The browsers ship an internal database to provide this. It works best on Chrome. You can try on html5gamepad, it will show "standard" mapping if your controller could get mapped.
  • Vibration is supported on Chrome
  • Player index is not supported
  • getAxisCount() and getButtonMin/Max() return real controller values.
  • Controllers won't get reported before a button is pressed.
  • Power Level not supported

iOS

  • Game controllers are guaranteed to have the input mapping returned by getMapping(). Only a few controllers are supported: MFi controllers, PS4 and Xbox One (since iOS 13) as well as iCade-compatible controllers (if enabled)
  • Vibration is supported on iOS 14 up
  • Player index is supported, if the controller supports it
  • getAxisCount() and getButtonMin/Max() return real controller values (except for iCade controllers)
  • Power Level supported
Clone this wiki locally