PS4 Dual Shock Button Numbers
-
The button mapping done through the GUI process is stored at:
/opt/retropie/configs/all/retroarch/autoconfig
Right?
Where can I find the button numbers to be mapped? Is this correct?
or is it:
Then I see things like "h0right" in autoconfig. What are those?
-
I figured how how to get the numbers: use jstest
If you pair the controller via bluetooth, you get a /dev/hidraw0 device. Jstest does not work with the hidraw device. But if you physically plug in the controller via USB, you get the /dev/input/js0 device. This does work with jstest.
Interesting, the finger triggers are both an axis and a button. As you pull the trigger, axis 2 and 5 register the movement. As you start the pull, buttons 6 and 7 go to on.
The numbers in the second post above are correct for Debian Stretch. With the exception of the Dpad numbers. They are axis 6 and 7 and do not have button values.
-
Correction. Bluetooth pairing creates both devices. Jstest just works only with the /dev/input one.
-
Thanks for sharing your solution.
-
But there's more. I guess the /dev/hidraw0 device is something to with motion sensors. This appears to confuse emulationstation.
https://retropie.org.uk/forum/topic/17650/dualshock-controllers-on-4-4-with-3b
This has a udev rule to add that removes that second device. Fixed at least one game for me.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.