Rui d'Orey
Rui d'Orey

Reputation: 1022

Gamepad API - Different browser axis mapping

I'm using Gamepad API and, in the same computer, with chrome and firefox, I get different axis mapping, axis numbering and button mapping. Is there any way to make them use the same mapping? Or some library?

Thanks

Upvotes: 1

Views: 337

Answers (1)

DenverCoder9
DenverCoder9

Reputation: 2514

User agents are free, according to the spec, to remap buttons if a known configuration is detected. They do not have to, though. You can manually check the mapping and remap in your client-side code, though.

Each device manufacturer creates many different products and each has unique styles and layouts of buttons and axes. It is intended that the user agent support as many of these as possible.

Additionally there are de facto standard layouts that have been made popular by game consoles. When the user agent recognizes the attached device, it is RECOMMENDED that it be remapped to a canonical ordering when possible. Devices that are not recognized should still be exposed in their raw form.

Upvotes: 1

Related Questions