Skip to content

Expand the range of gamepad button keycodes to be consistent with SDL#95698

Closed
Rindbee wants to merge 1 commit intogodotengine:masterfrom
Rindbee:expand-gamepad-keycode-range-on-linux
Closed

Expand the range of gamepad button keycodes to be consistent with SDL#95698
Rindbee wants to merge 1 commit intogodotengine:masterfrom
Rindbee:expand-gamepad-keycode-range-on-linux

Conversation

@Rindbee
Copy link
Contributor

@Rindbee Rindbee commented Aug 17, 2024

Recently I was testing another PR (#95486).

Although some devices use the mapping scheme in core/input/gamecontrollerdb.txt, the mapping of some keys still fails.

By using evemu-record to test the buttons, it is found that the key codes of some buttons are not in the range of Godot test. Comparing the SDL code, it is found that the test ranges of the two are inconsistent. This may be the reason why some devices cannot work properly in Godot.

The guid of the mapping scheme used by the device is 050000005e040000fd02000003090000. The back button corresponds to KEY_BACK and the guide button corresponds to KEY_HOMEPAGE. I'm not sure if this is due to the device being unofficial.

Faulty device: 050000005e040000fd02000003090000,Xbox One Controller (third-party manufacturer, not original)

050000005e040000fd02000003090000,Xbox One Controller,a:b0,b:b1,back:b15,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b16,leftshoulder:b6,leftstick:b13,lefttrigger:a5,leftx:a0,lefty:a1,rightshoulder:b7,rightstick:b14,righttrigger:a4,rightx:a2,righty:a3,start:b11,x:b3,y:b4,platform:Linux,

devinfo.txt

There are buttons that send KEY_HOMEPAGE, KEY_BACK events.

@Rindbee Rindbee requested a review from a team as a code owner August 17, 2024 14:21
@Rindbee Rindbee changed the title Expanded the range of gamepad keycodes to be consistent with SDL Expanded the range of gamepad button keycodes to be consistent with SDL Aug 17, 2024
@Chaosus Chaosus added this to the 4.4 milestone Aug 17, 2024
@Rindbee Rindbee force-pushed the expand-gamepad-keycode-range-on-linux branch from da6b64f to 8ef2c3d Compare August 22, 2024 08:12
@Rindbee Rindbee force-pushed the expand-gamepad-keycode-range-on-linux branch from 8ef2c3d to 7e21d86 Compare December 2, 2024 23:27
@Rindbee Rindbee force-pushed the expand-gamepad-keycode-range-on-linux branch from 7e21d86 to f89706e Compare December 15, 2024 01:27
@Rindbee Rindbee force-pushed the expand-gamepad-keycode-range-on-linux branch from f89706e to 8190fc4 Compare January 8, 2025 10:46
@AThousandShips AThousandShips changed the title Expanded the range of gamepad button keycodes to be consistent with SDL Expand the range of gamepad button keycodes to be consistent with SDL Jan 10, 2025
Recently I was testing another PR (godotengine#95486).

Although some devices use the mapping scheme in `core/input/gamecontrollerdb.txt`,
the mapping of some keys still fails.

By using `evemu-record` to test the buttons, it is found that the key codes of
some buttons are not in the range of Godot test. Comparing the SDL code, it is
found that the test ranges of the two are inconsistent. This may be the reason
why some devices cannot work properly in Godot.
@Rindbee Rindbee force-pushed the expand-gamepad-keycode-range-on-linux branch from 8190fc4 to 331b7a0 Compare January 20, 2025 15:13
@Repiteo Repiteo modified the milestones: 4.4, 4.x Feb 24, 2025
@Rindbee
Copy link
Contributor Author

Rindbee commented Aug 20, 2025

This PR is no longer needed since #106218 has been merged.

@Rindbee Rindbee closed this Aug 20, 2025
@Rindbee Rindbee deleted the expand-gamepad-keycode-range-on-linux branch August 20, 2025 06:50
@AThousandShips AThousandShips removed this from the 4.x milestone Aug 20, 2025
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.

4 participants