Open DAMO238 opened 2 years ago
Controller mappings are handled by the third-party https://github.com/gabomdq/SDL_GameControllerDB, so issues related to incorrect mappings should be reported there instead.
I have a similar issue with a G27 steering wheel, the D-Pad and some gears on the shifter share bindings. This apparently won't be resolved upstream in the SDL_GameControllerDB repo. A previous PR with support for a different HOTAS was closed because flightsticks and other non-controller devices are out of the scope of the db.
https://github.com/gabomdq/SDL_GameControllerDB/pull/508 https://github.com/godotengine/godot/issues/53334#issuecomment-962524812
I'm not sure how this can be resolved, other than starting our own database of mappings for steering wheels and HOTASes (then combining it with the main controller DB). Such a database would take a lot of time to populate, as Godot users with those input devices are uncommon.
I'm not even sure an extended controller DB would be a good solution for these use cases. On the G27 alone I count 4 axes, 23 buttons, and a hat switch (which problematically got mapped into the buttons). From what I can see in input/input.cpp there are only 21 button mappings available using a controller map. The workaround I've been considering for my project is using a module to expose SDL_Joystick so it doesn't get remapped in the first place.
Edit: I see now that Godot isn't directly using SDL, rather the controller DB format. I think allowing for an extended format of the SDL controller db would be sufficient for me (such as allowing godot_button1, ..., godot_buttonN, godot_axis1, ...,godot_axisN). I'm still digging into the input system though, so I might be misunderstanding things.
Godot version
3.3.stable and 3.4.4.stable
System information
Arch Linux, Saitek X52 Pro Flight Control System
Issue description
The silver hat on the right hand stick conflict with the buttons in the table and correspond to the following indices:
Steps to reproduce
This can be seen easily (if you have said HOTAS) by using the following snippet of code:
Then just launch the scene and press the buttons in the table and observe the conflicting buttons.
Minimal reproduction project
No response