chiaki icon indicating copy to clipboard operation
chiaki copied to clipboard

Feature request: Controller Mapper

Open juicypop opened this issue 5 years ago • 9 comments

I just gave chiaki a try on my mibox 3 side loading it and it actually works. The only bad thing is neither my dualshock4 nor my Xbox one controller are fully mapped. Especially L2 and R2 aren't mapped, no action or wrong mapping when I trigger them.

A mapping tool within chiaki would be a charm.

Another thing/question is if it's normal that the options to toggle touch etc. are displayed all the time. Sorry didn't want to open another issue for this one.

juicypop avatar Feb 19 '20 20:02 juicypop

I too would love a controller mapping tool. You could merge my post "Triggers not working on Stadia contoller #161" into this request

Questinghero avatar Feb 25 '20 18:02 Questinghero

Good idea.

thestr4ng3r avatar Feb 25 '20 19:02 thestr4ng3r

Ah, mibox is an Android TV, so no, #174 does not affect it.

flplv avatar Feb 26 '20 22:02 flplv

Playing on Linux with an Xbox One controller. I have the following issue: In Destiny 2 the "share" button of an Xbox Controller (on PC or Xbox) has the same function than pressing the touchpad on a PS4 controller (on a PS4). Is there anyway at the moment to change this i.e. remap the share button of the xbox controller to act as the touchpad press of the PS4?

Edit: I was able to do the mapping in code as it seems there is no other solutions. I guess I will have to wait for this feature request to do something cleaner.

That said, it is not just for Android and it would be nice to be able to save multiple mappings and be able to load them quickly when changing games and/or controller.

bterrier avatar Apr 30 '20 10:04 bterrier

@bterrier can you paste the gist of your change here so it help the person that decides to code the mapping in the future?

flplv avatar May 25 '20 15:05 flplv

@flplv Sadly I just did a dirty hack, hardcoding the "back/select" button to the PS touchpad (CHIAKI_CONTROLLER_BUTTON_TOUCHPAD)

For Qt Gamepad

state.buttons |= gamepad->buttonSelect() ? CHIAKI_CONTROLLER_BUTTON_TOUCHPAD : 0;

For SDL

state.buttons |= SDL_GameControllerGetButton(controller, SDL_CONTROLLER_BUTTON_BACK) ? CHIAKI_CONTROLLER_BUTTON_TOUCHPAD : 0;

bterrier avatar Jun 16 '20 01:06 bterrier

To keep this issue focused: it is only about Android controller mapping. For the Desktop version, check out something like https://github.com/gabomdq/SDL_GameControllerDB. There are more than enough tools to map controllers for SDL, so the mapping GUI itself is pretty much out of scope for chiaki on desktop.

thestr4ng3r avatar Jun 24 '20 19:06 thestr4ng3r

To keep this issue focused: it is only about Android controller mapping. For the Desktop version, check out something like https://github.com/gabomdq/SDL_GameControllerDB. There are more than enough tools to map controllers for SDL, so the mapping GUI itself is pretty much out of scope for chiaki on desktop.

@thestr4ng3r I have a few remarks and questions:

  1. SDL remapping does not solve my issue as chiaki does not bind any gamepad button to CHIAKI_CONTROLLER_BUTTON_TOUCHPAD
  2. If SDL_GameControllerAddMapping or SDL_GameControllerAddMappingsFromFile is to be the recommended way to remap the controller, we need to a way to select the mapping file(s) in chiaki.
  3. What about QtGamepad? It does not have a way to set mapping file.
  4. What is the status of SDL vs QtGamepad, why support both while Qt Gamepad can use SDL as a backend?

bterrier avatar Jun 25 '20 08:06 bterrier

Please Need Your Kind Assist Regarding PS4 Controller Button Mapping

TQahtani avatar Sep 18 '20 14:09 TQahtani