Skip to content

Add support for querying joypad type, model and layout scheme#117526

Draft
Nintorch wants to merge 1 commit intogodotengine:masterfrom
Nintorch:joypad-types
Draft

Add support for querying joypad type, model and layout scheme#117526
Nintorch wants to merge 1 commit intogodotengine:masterfrom
Nintorch:joypad-types

Conversation

@Nintorch
Copy link
Copy Markdown
Member

@Nintorch Nintorch commented Mar 17, 2026

This PR adds support for querying/getting the joypad type (gamepad, racing wheel, arcade stick, etc.) and model (Xbox 360, Xbox One, PS3, DualShock 4, DualSense, etc.). Getting the joypad type and model is useful, for example, to make the game use correct button names and icons for specific controllers.
It's not currently possible to check if a joypad is a GameCube controller because our version of SDL doesn't support it yet.

TODO:

Comment thread doc/classes/@GlobalScope.xml Outdated
@Nintorch Nintorch changed the title Add support for querying joypad type and model Add support for querying joypad type, model and layout scheme Mar 18, 2026
@Nintorch Nintorch marked this pull request as ready for review March 22, 2026 18:22
@Nintorch Nintorch requested review from a team as code owners March 22, 2026 18:23
@Nintorch Nintorch force-pushed the joypad-types branch 2 times, most recently from 7f9098f to 6b8f713 Compare March 22, 2026 19:19
@Nintorch
Copy link
Copy Markdown
Member Author

Nintorch commented Mar 23, 2026

Should Steam controllers other than Steam Deck also return JOY_MODEL_STEAM_DECK since they (most likely, I have to check) have the same button layout?
In that case we can also rename this constant to something else that's more fitting.

Comment thread doc/classes/Input.xml Outdated
Comment thread doc/classes/@GlobalScope.xml Outdated
Comment thread doc/classes/@GlobalScope.xml Outdated
Comment thread doc/classes/@GlobalScope.xml Outdated
Comment thread doc/classes/Input.xml Outdated
Comment thread doc/classes/Input.xml Outdated
This PR adds support for querying/getting the joypad type (gamepad, racing wheel, arcade stick, etc.) and model (Xbox 360, Xbox One, PS3, DualShock 4, DualSense, etc.).
Getting the joypad type and model is useful, for example, to make the game use correct button names and icons for specific controllers.
youfch added a commit to youfch/godot that referenced this pull request Mar 26, 2026
@Nintorch Nintorch marked this pull request as draft April 24, 2026 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Input.get_joy_type() to get controller type

2 participants