Autohotkey (ahk) controller recognize input?

Ry
- in PlayStation
3

I would like to write a program with Autohotkey which executes a certain action when a certain key is pressed on a PS4 controller.

I know that it is not possible to send inputs as a controller, but I heard that it works that inputs from a controller are recognized.

Mi

The controller is probably just recognized as a joystick. So Joy1… Joy32 for the buttons, if necessary with the joystick number in front of it. You can read out the analog sticks with GetKeyState. Take a look at the example under https://www.autohotkey.com/docs/scripts/index.htm#JoystickTest.

Ry

And how do I know which button has which name?

Mi

The linked test script from above should display it.