Closed Palessan closed 2 months ago
This is expected. Button mappings vary among platforms.
To mitigate the issue, use StandardGamepadButton.
If you would add the middle central button and touchpad as an ebiten.StandardGamepadButton
Unfortunately I cannot control this (how the center touch pad is assigned)
b34f9977f6d36ca054178071641933a5ed24745c might change the situation as this updated the gamepad database.
(forgot to mention that the gamepad is a PS4 controller) Found the StandardGamepadButtonCenterCenter as middle center which solves all my issues. Any idea about touchpad?
b34f997 might change the situation as this updated the gamepad database.
no change unfortunately
Any idea about touchpad?
There is no easy solution. If a browser doesn't treat the touchpad as a pointer device, there is nothing we can do.
Ebitengine Version
v2.7.8
Operating System
Go Version (
go version
)1.22.5
What steps will reproduce the problem?
Run your
examples\gamepad\main.go
locally and on wasm. When you press the same buttons (for example middle central button and touchpad) you will see that they are are mapped to different button numbers:This is a problem since the touchpad is the left DPad up for example
What is the expected result?
i would expect the same key number to be used in both local application and wasm
What happens instead?
different key numbers on same buttons when run in local application vs wasm
Anything else you feel useful to add?
If you would add the middle central button and touchpad as an ebiten.StandardGamepadButton, then i could use that instead of using the older(?) ebiten.GamepadButtonXX