X and Y buttons are inverted on game pads in Firefox
Categories
(Core :: DOM: Device Interfaces, defect, P2)
Tracking
()
People
(Reporter: vikinghelmet99, Unassigned)
References
Details
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0
Steps to reproduce:
On any WebGL game (such as on Itch.io), Firefox works with game pads, but has swapped the X and Y buttons. Pressing Y will give you X, pressing X will give you Y.
To be specific, this is the X and Y buttons on the game pad, not the keyboard.
To see this in action, go to https://hardwaretester.com/gamepad and compare behavior with an XInput controller on Firefox and then Chromium; note the difference behavior of the button pad.
Actual results:
Pressing Y gives X functionality, pressing X gives Y functionality, in any program.
Expected results:
X should do what X does on builds for the desktop, or the Chromium browser; and Y should do what Y does.
Reporter | ||
Updated•8 months ago
|
Reporter | ||
Comment 1•8 months ago
|
||
Note that I have done this on KUbuntu 22.04, I can't speak for Windows and MacOS.
Comment 2•8 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Graphics: Canvas2D' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 3•8 months ago
|
||
dom/gamepad/moz.build suggests the right component for this is DOM: Device Interfaces, moving there as that seems like a better fit, if that is not the case please correct me.
From what I remember the Linux kernel driver for X-Box like controllers reports the wrong information for these buttons, so it doesn't map them to the right cardinal direct: BTN_NORTH, BTN_WEST etc. We could do some special re-mapping, but so far I tried to avoid doing that.
Comment 5•7 months ago
|
||
The severity field is not set for this bug.
:cmartin, could you have a look please?
For more information, please visit BugBot documentation.
Comment 6•7 months ago
|
||
Oof... This is bad enough that we should probably get it fixed quickly. Are you going to be able to take a look at it, Tom? If not, it will probably be a week or two until I'm able to get to it.
I am probably not going to be able to look at this before next month either.
Description
•