Android: Improve D-pad support for Default Android Gamepad.#112762
Merged
akien-mga merged 1 commit intogodotengine:masterfrom Dec 2, 2025
Merged
Android: Improve D-pad support for Default Android Gamepad.#112762akien-mga merged 1 commit intogodotengine:masterfrom
akien-mga merged 1 commit intogodotengine:masterfrom
Conversation
Previously the default gamepad wasn't actually setup to handle regular D-pad keycode events. Instead it had only been hooked up to hat inputs. Many bluetooth controllers paired with recent Android versions fire keycode events for their D-pad.
akien-mga
reviewed
Dec 1, 2025
|
|
||
| # Android | ||
| Default Android Gamepad,Default Controller,leftx:a0,lefty:a1,dpdown:h0.4,rightstick:b8,rightshoulder:b10,rightx:a2,start:b6,righty:a3,dpleft:h0.8,lefttrigger:a4,x:b2,dpup:h0.1,back:b4,leftstick:b7,leftshoulder:b9,y:b3,a:b0,dpright:h0.2,righttrigger:a5,b:b1,platform:Android, | ||
| Default Android Gamepad,Default Controller,leftx:a0,lefty:a1,dpdown:h0.4,rightstick:b8,rightshoulder:b10,rightx:a2,start:b6,righty:a3,dpleft:h0.8,lefttrigger:a4,x:b2,dpup:h0.1,back:b4,leftstick:b7,leftshoulder:b9,y:b3,a:b0,dpright:h0.2,righttrigger:a5,b:b1,dpup:b11,dpdown:b12,dpleft:b13,dpright:b14,platform:Android, |
Member
There was a problem hiding this comment.
How does it work when you have multiple bindings for dpup, etc.? Does it pick the first/last or does it actually support multiple ones?
Member
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously the default gamepad wasn't actually setup to handle regular D-pad keycode events. Instead it had only been hooked up to hat inputs. Many Bluetooth controllers paired with recent Android versions fire keycode events for their D-pad.
I've tested 3 different models of Bluetooth controller (they're all cheap third-party Nintendo Switch gamepads), they all only fire D-pad key codes on Android OS 13.
Probably worth noting, I have not removed the hat bindings — I've just fixed support for D-pad bindings. Any controllers that are firing hat events ought to be unaffected.