ricardoquesada / bluepad32

Bluetooth gamepad, mouse and keyboard support for ESP32 and PicoW
https://bluepad32.readthedocs.io/
Other
566 stars 59 forks source link

SDK parameter to control button remapping by position or lettering #97

Open mitchellcairns opened 5 months ago

mitchellcairns commented 5 months ago

Is your feature request related to a problem? Please describe. It's frustrating that the button remap is based on button position, and not necessarily button lettering.

Describe the solution you'd like An option to do remaps by position or by lettering. A simple SDKconfig toggle would be fine.

Describe alternatives you've considered Maybe simply clearing up the output to use position rather than button lettering would help and provide more clarity with the code.

Remapping A->B right now is dependent on what you're used to. On Xbox controllers this means B gets mapped to A with Switch controllers etc. It becomes confusing very quickly for what button does what without trial and error.

ricardoquesada commented 5 months ago

this presents other issues as well.

For example, clones like 8BitDo have gamepads that support both nintendo and xbox protocols. The the buttons already have the letters already painted.... but depending on their mode, button "A" behaves like "A" or "B".

What I'm saying is that your proposed solution has its own issues, and could be even more confusing than the current one.

As of today, there is an global function that can allow you to use "nintendo" mappings.

    uni_gamepad_set_mappings_type(UNI_GAMEPAD_MAPPINGS_TYPE_SWITCH);

But I think the best solution is to have a per-controller mapping.... and then let the user decide which mapping it should use.