Controllable (Forge)

Controllable (Forge)

4M Downloads

Switch Controller, no key rebinding and only a few keys working

ratboyblue opened this issue · 7 comments

commented

I’m using a Switch Pro Controller connected via bluetooth on the latest version of Controllable. The controller is detected and selected, but in game I can only look around with the right stick and break blocks with the right trigger. No other buttons are working. Binds are all set to default. Controllable also will not accept any input to rebind the keys. Any help appreciated, I’m very excited to use this mod as a controller user on most games. TY!
edit: I should also mention I am on Windows 10!

commented

Sorry for the delayed reply. I've just updated the gamepad mapping database (8977fe0) and your controller should then hopefully work correctly in the next update. If you are using an older version of Controllable that is not for Minecraft 1.18.2, you can actually manually patch the mappings yourself. JAR files are actually just ZIP files. Open the JAR with 7zip and replace gamecontrollerdb.txt with the latest from here https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt

commented

I did this, and now my controller is recognized by the mod. But now only my D-Pad does not work. I tested it on Dolphin, and it registered fine. Do you know how i could fix my D-Pad and get it to work?

commented

I've recently learned that DS4Windows (previously only for playstation controllers) now supports Switch Pro controller. It's a program that makes Windows think it's an Xbox controller, which is the best supported controller for Windows. There is a guide here: https://ds4-windows.com/get-started/

Your other option that could potentially fix it is creating your own mappings. I assume you have Steam, which actually creates mappings for most controllers as it detects them. Find the file <steam_installation_directory>/config/config.vdf, open it with a text editor and search for the term SDL_GamepadBind. Just after it you will see the mappings for your controllers. This is the same mapping format that is seen in gamecontrollerdb.txt. Find the mapping that is for the Switch controller and copy the whole line. The line should end with platform:Windows just to clarify if you have copied it correctly.

Next open the gamecontrollerdb.txt you downloaded and before you paste, it's probably necessary to adding duplicate mapping entries. Since your Switch controller partially works now since you updated, pasting in the copied mapping at the end of the file will mean there is a duplicate mapping. To avoid this, all you need to do is override the original mapping. You can do this by searching for the GUID, the hex number at the start of the copied mapping (should look similar to this 030000004c050000c405000000000000 but yours will be different). In the gamecontrollerdb.txt, search for that text and then replaced the entire line with the mapping from the config.vdf mentioned before.

Now all you need to do is patch the mod with the updated mapping file again. It's possible the mapping from Steam can be wrong to, this can be fixed by going into Steam Big Picture and config the controller correctly but my guess is that Steam supports major controllers correctly without this step.

commented

Also I didn't mention, have you tried connecting via USB?

commented

Also I am slowly putting together a troubleshooting guide for general use, so let me know if these potential solutions fixed it for your controller.

commented

i used to use a switch pro with controllable and had no issues. also, you don't necessarily need steam's systems, there's the SDL2 mapping tool that MidnightControls links ingame since it has a way to add controller bindings straight from the menu.
https://generalarcade.com/gamepadtool/

commented

You can now use Switch Pro Controller using either DS4Windows or GlosSI. You can read the guides here:
https://mrcrayfish.gitbook.io/controllable-documentation/guides/how-to-connect-a-gamepad