PS4 controller Dpad

Hey guys,

I’m just going through controller support and I’ve noticed that I can’t seem to get a “key” event for the dpad on a ps4 controller. Any ideas?

May I ask to try axis event? As far as I remember DualShock controllers treat d-pad buttons as special kind of axis, with type “hatSwitch”. You would have to use rawValue of event to make sense of that event. Sorry about that, Sony is weird…

I don’t have a controller handy right now to check that, but this is what I remember from my tests.

Ah, thanks for that! I actually tried axis and it was constantly firing off events (with no buttons being pressed) so I decided to leave it for a bit! :smiley:

Welcome! Glad to help. Actually, page I linked says something about PS4 controllers. Also, I noticed that some Logitech d-pads work in similar way.

They actually had a switch between modes, or some other weirdness.

May I ask to try axis event? As far as I remember DualShock controllers treat d-pad buttons as special kind of axis, with type “hatSwitch”. You would have to use rawValue of event to make sense of that event. Sorry about that, Sony is weird…

I don’t have a controller handy right now to check that, but this is what I remember from my tests.

Ah, thanks for that! I actually tried axis and it was constantly firing off events (with no buttons being pressed) so I decided to leave it for a bit! :smiley:

Welcome! Glad to help. Actually, page I linked says something about PS4 controllers. Also, I noticed that some Logitech d-pads work in similar way.

They actually had a switch between modes, or some other weirdness.