Add support for joypad touchpads#111714
Conversation
8ccbbc0 to
be7155d
Compare
Meorge
left a comment
There was a problem hiding this comment.
Tested with a wired PS4 DualShock and PS5 DualSense controller on macOS, and it works great!
Here's a very minimal Godot project for testing, adapted from the previous PR, to make it easier for others to test as well:
test-joypad-touchpad.zip
(I can put it up on a GitHub repo if necessary, but it's so minimal unlike the adaptive triggers one that it's probably fine this way 😅 )
be7155d to
ce02ca8
Compare
ce02ca8 to
5a5ab3d
Compare
1eaea49 to
f4b1be5
Compare
f4b1be5 to
4d4d2c7
Compare
|
Thank you for your review, AThousandShips! I included your suggested changes into the code! |
4d4d2c7 to
d23cba6
Compare
7bc715c to
a0a904c
Compare
a0a904c to
8616cfd
Compare
8616cfd to
6e5baa2
Compare
6e5baa2 to
a0d9716
Compare
|
Since this PR lacked a proposal I decided to write one: godotengine/godot-proposals#14481 |
a0d9716 to
6545bf2
Compare
bruvzg
left a comment
There was a problem hiding this comment.
Tested on macOS and iOS with DualSense controller, controller touchpad seems to be working as expected.
|
Thank you for your review, bruvzg! :) |
6545bf2 to
6fe1384
Compare
True for Sony controllers, however Valve controllers do report a range of pressure values. Tested on Steam Deck Desktop Mode (Gaming Mode forces Steam Input to present an emulated xinput controller) on SDL3 |
ffb53d0 to
886b4ae
Compare
This PR adds the ability to use touchpads on supported controllers, such as DualShock 4 and DualSense. Currently there's no InputEvent that gets fired when a finger appears/moves on a touchpad.
886b4ae to
58103e8
Compare
AThousandShips
left a comment
There was a problem hiding this comment.
Style and docs look good, haven't tested
|
Thank you for your review, AThousandShips! :) |



I decided to split my big SDL3 joypad features PR ( #107967 ) into several smaller PRs, this PR is one of them.
This PR adds the ability to use touchpads on supported controllers, such as DualShock 4, DualSense
and (most likely) Steam Deck built-in controls(EDIT: apparently not, since "thirdparty/sdl/joystick/hidapi/SDL_hidapi_steamdeck.c" file doesn't have any references to touchpads).Currently there's no InputEvent that gets fired when a finger appears/moves on a touchpad.
TODO:
p_touchpadhave the default value of0Input events, including a motion event with movement vector(Can be done in a separate PR if required)get_joy_touchpad_fingersmethod touchpad parameterTODO for a separate PR:
Input events:
InputEventJoypadTouchpad(press/release)InputEventJoypadTouchpadMotion(finger motion, with initial position and velocity to make things easier)