-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PS4 controller doesn't have proper button mappings. #5
Comments
This is caused by an incorrect mapping for the PS4 controllers. This should be fixed upstream in Chrome, but I'll patch this repo to fix it for now. |
Broken button mapping may still occur on pre-Android 10 devices. This can be tested with https://html5gamepad.com/. Using an older version of the apk may help. |
Relevant upstream patch, should be in Chrome 81 once it lands: https://chromium-review.googlesource.com/c/chromium/src/+/1958910 Your patch uses the new mapping for Build.VERSION_CODES.P and newer, do you know of any devices with Android P that need the new mapping? |
An S9 with |
I tried with a Pixel 3 on PD1A.180720.031 (the oldest build I could flash) and it also needed the new mapping. Tested with: DS4 v2 USB & Bluetooth (CUH-ZCT2U) I also tried a DS4 v1 (CUH-ZCT1E) but it only worked over Bluetooth. Over USB there's an issue with hid-sony that breaks with this particular DS4 version. The label on the back has "4-472-348-02 G", I've only seen this issue with devices that have that particular revision code but maybe there are others. It seems Android 9 includes some of the hid-sony patches that fix the DS3 and DS4 mappings, while Android 10 pulls in all upstream patches to date. I'll change my patch to use |
PS4 controller doesn't have proper button mappings!!! |
The Dualshock controller isn't handled properly by Android + Chrome + Gamepad API. Going to https://html5gamepad.com/ on a Windows browser shows the expected mapping and
navigator.getGamepads()[0]
returns{id: "Wireless Controller (STANDARD GAMEPAD Vendor: 054c Product: 09cc)"...
. Going to that page on Android Chrome + a BT or USB Dualshock controller shows{id: "Wireless Controller",...
and the mapping is incorrect.The expected button mapping is
X, O, Square, Triangle, L1, R1, L2, R2, Share, Options, Left thumbstick, Right thumbstick, dUp, dDown, dLeft, dRight, PS, Touchpad
and this works on Windows.On Android, the detected mapping is
O, null, X, Square, Triangle, null, null, null, L2, R2, Share, Options,, dUp, dDown, dLeft, dRight, PS
. And the touchpad maps to a mouse.The text was updated successfully, but these errors were encountered: