IDs for PlayStation 4 controllers


NOTES

WINDOWS: seems to work fine without any special drivers on Windows 10 (and I seem to recall the same on Windows 7). DS4Windows is the popular 3rd-party utility here, but it will make the PS4 controller look like a 360 controller, which means that it will be indistinguishable from an XInput device to flixel (DS4Windows: http://ds4windows.com).

LINUX: the PS4 controller will be detected as an XInput device when using xpad (see notes in XInputID.hx)

MAC: the PS4 controller seemed to work perfectly without anything special installed, and was not detected in the 360Controller control panel, so it might just work right out of the box!

Static variables

@:value(new FlxTypedGamepadAnalogStick<PS4ID>(LEFT_X, LEFT_Y, { up : LEFT_STICK_UP, down : LEFT_STICK_DOWN, left : LEFT_STICK_LEFT, right : LEFT_STICK_RIGHT }))staticfinalread onlyLEFT_ANALOG_STICK:FlxTypedGamepadAnalogStick<PS4ID> = new FlxTypedGamepadAnalogStick<PS4ID>(LEFT_X, LEFT_Y, { up : LEFT_STICK_UP, down : LEFT_STICK_DOWN, left : LEFT_STICK_LEFT, right : LEFT_STICK_RIGHT })

@:value(new FlxTypedGamepadAnalogStick<PS4ID>(RIGHT_X, RIGHT_Y, { up : RIGHT_STICK_UP, down : RIGHT_STICK_DOWN, left : RIGHT_STICK_LEFT, right : RIGHT_STICK_RIGHT }))staticfinalread onlyRIGHT_ANALOG_STICK:FlxTypedGamepadAnalogStick<PS4ID> = new FlxTypedGamepadAnalogStick<PS4ID>(RIGHT_X, RIGHT_Y, { up : RIGHT_STICK_UP, down : RIGHT_STICK_DOWN, left : RIGHT_STICK_LEFT, right : RIGHT_STICK_RIGHT })

Variables

@:value(cast 12)@:impl@:enuminlineread onlyCIRCLE:PS4ID = 12

@:value(cast 7)@:impl@:enuminlineread onlyDPAD_DOWN:PS4ID = 7

@:value(cast 8)@:impl@:enuminlineread onlyDPAD_LEFT:PS4ID = 8

@:value(cast 9)@:impl@:enuminlineread onlyDPAD_RIGHT:PS4ID = 9

@:value(cast 6)@:impl@:enuminlineread onlyDPAD_UP:PS4ID = 6

@:value(cast 14)@:impl@:enuminlineread onlyL1:PS4ID = 14

@:value(cast 16)@:impl@:enuminlineread onlyL2:PS4ID = 16

@:value(cast 20)@:impl@:enuminlineread onlyLEFT_STICK_CLICK:PS4ID = 20

@:value(cast 25)@:impl@:enuminlineread onlyLEFT_STICK_DOWN:PS4ID = 25

@:value(cast 26)@:impl@:enuminlineread onlyLEFT_STICK_LEFT:PS4ID = 26

@:value(cast 27)@:impl@:enuminlineread onlyLEFT_STICK_RIGHT:PS4ID = 27

@:value(cast 24)@:impl@:enuminlineread onlyLEFT_STICK_UP:PS4ID = 24

@:value(cast 19)@:impl@:enuminlineread onlyOPTIONS:PS4ID = 19

@:value(cast 22)@:impl@:enuminlineread onlyPS:PS4ID = 22

@:value(cast 15)@:impl@:enuminlineread onlyR1:PS4ID = 15

@:value(cast 17)@:impl@:enuminlineread onlyR2:PS4ID = 17

@:value(cast 21)@:impl@:enuminlineread onlyRIGHT_STICK_CLICK:PS4ID = 21

@:value(cast 29)@:impl@:enuminlineread onlyRIGHT_STICK_DOWN:PS4ID = 29

@:value(cast 30)@:impl@:enuminlineread onlyRIGHT_STICK_LEFT:PS4ID = 30

@:value(cast 31)@:impl@:enuminlineread onlyRIGHT_STICK_RIGHT:PS4ID = 31

@:value(cast 28)@:impl@:enuminlineread onlyRIGHT_STICK_UP:PS4ID = 28

@:value(cast 18)@:impl@:enuminlineread onlySHARE:PS4ID = 18

@:value(cast 10)@:impl@:enuminlineread onlySQUARE:PS4ID = 10

@:value(cast 23)@:impl@:enuminlineread onlyTOUCHPAD_CLICK:PS4ID = 23

@:value(cast 13)@:impl@:enuminlineread onlyTRIANGLE:PS4ID = 13

@:value(cast 11)@:impl@:enuminlineread onlyX:PS4ID = 11