Creating hotkey alternates for multiple controllers

Does the hotkeys button say “Auto”? This will make it use the autoconfig setting. Any button that shows up as “auto” in retroarch means it is set to null in the retroarch.cfg and will need to be assigned in the autoconfig cfg file for the controller.

Retroarch > Settings > Hotkey Binds > Hotkeys : Auto:Button

In the guide i posted above I described setting the hotkeys to null in the retroarch.cfg.

input_enable_hotkey = "nul"
input_enable_hotkey_axis = "nul"
input_enable_hotkey_btn = "nul"
input_enable_hotkey_mbtn = "nul"

It sure does. And all four enable lines are set to nul in retroarch.cfg.

I’m trying to think through the problem again this morning and still feel I don’t have enough information to deal with it properly quite yet. My assumption is that retroarch.cfg is the base configuration. However, device autoconfig files aren’t a pure override. They can’t be, right? Because otherwise you wouldn’t be telling me to leave the hotkey enable button blank on retroarch.cfg. So I assume that autoconfig files only assign bindings where bindings are previously blank. I have that correct, no?

And I’m also assuming that there’s no other intermediary file loaded between retroarch.cfg and autoconfigdevice.cfg.

The hotkey enable button is being assigned; I see the proper number (select = 10 for the SNES BT controller in android mode) with the ‘auto’ prefix in Retroarch. It just doesn’t work right.

So from my point of view:

  • There’s a normal behavior or prioritization that I don’t yet understand.
  • There’s a bug.
  • I could try switching the controller to windows mode, in which case I assume the xinput config file would load as it does for you and see if hotkey enable works correctly.

The autoconfig files can be downloaded from the retroarch > Online Updater for known controllers that either the libretro team provided or users submitted in order to create a working out of box experience as listed here https://github.com/libretro/retroarch-joypad-autoconfig. No need to configure the controllers or at least that is the intention. In some scenarios such as myself or others, the controller id within the provided autoconfig files don’t match with our controllers so it becomes necessary to create custom autoprofiles as we are attempting here. Is your 8Bitdo_SN30_BT.cfg provided by retroarch or did you create it using the guide above?

When you don’t have autoconfig files, you setup the controller through Settings > Input > User1Binds but if you don’t select “User1SaveAutoConfig”, it will only save to the retroarch.cfg. So yes even if you do have the autoconfig files, retroarch will first load the input assignments within retroarch.cfg and then the autoprofile. Leaving the input as null within retroarch.cfg makes certain that retroarch uses the autoprofile instead. Another scenario is if you are using core overrides (remap files for input) in which case will bypass the autoconfig and retroarch.cfg but you did not mention if you were using that option.

For your 8Bitdo controller are you using a 8bitdo retro / usb receiver or are you using bluetooth? My current setup is using the former since I don’t have a bluetooth adapter (unless there is a way to run bluetooth mode through the retro adapter I haven’t been able to).

I think you might be misunderstanding. The only things I changed on the autoconfig file were the hotkey assignments. Everything else I left as-is. Actually, I created the N30 and SN30 files incl. ID for submission, but someone beat me to it while I was traveling.

Let me link a pastebin of the file so you can see what I did. Again, to configure the device using that cfg file, the controller needs to be in android mode (one blink per second while pairing).

https://pastebin.com/jgEGtZm6

And for good measure, here’s the contents of the autoconfig.cfg:

https://pastebin.com/W653VV5q

The autoconfig file appears correct. My original question probably wasn’t clear, i was inquiring about the method you are using to connect your 8bitdo to your device (built in bluetooth, bluetooth dongle, 8bitdo adapter).

Using the retroarch.cfg file you provided, my controller would not be detected. Your input joypad assignments are wrong.

input_player1_joypad_index = "4"
input_player2_joypad_index = "5"
input_player3_joypad_index = "6"
input_player4_joypad_index = "6"
input_player5_joypad_index = "6"
input_player6_joypad_index = "5" 

etc etc

Change to:

input_player1_joypad_index = "0"
input_player2_joypad_index = "1"
input_player3_joypad_index = "2"
input_player4_joypad_index = "3"
input_player5_joypad_index = "4"
input_player6_joypad_index = "5"

After making these changes to your retroarch.cfg, the buttons show up as “auto” and works (hotkey works along with assignments).Hopefully this works for you.

Update: Maybe i was premature but I won’t know until you follow-up. This worked for me but I am wondering if “4” is the correct joypad on yours. Something else to keep in mind which is important:

If both my XB1 controller and SN30 controller are connected at once, retroarch will always assign whichever device is first in the priority from windows it seems. For example let’s say i want to use the XB1 controller. I turn off the SN30 controller (8bitdo dongle still connected to PC) and run retroarch. Retroarch will still detect the SN30 controller and assign it as joypad index 0 (player 1) in my case and the Xb1 won’t be assigned player 1 but instead player 2. To get around this issue what I end up doing is simply disconnecting the SN30 dongle to give the XB1 controller priority in retroarch. I know there is a program that changes the priority order of usb devices but I have not looked too much into it.

Update 2: Side note, looking over your autoconfig.cfg for the SN30 you might want to try these if the ones you have don’t work for the d-pad.

input_up_axis = 
input_down_axis = 
input_left_axis = 
input_right_axis = 

to

input_l_x_plus_axis = 
input_l_x_minus_axis = 
input_l_y_plus_axis = 
input_l_y_minus_axis =

Thanks. I’ll get back to you when I can try these things.

Update: Heeeey the hotkey works properly now. The device loads before the four dolphin devices fail to load. Some setting in them must have preempted this from working properly. I’ll check back in after I figure out and configure the XB1 and NES controllers.

Ok, I’m almost there. I’ve got both the controllers working properly, however they do not exchange control between one another correctly (ie-starting Retroarch with a different controller turned on). I have to go into user 1 binds to switch the controller. This ought to happen automatically.

I tried using a copy of retroarch.cfg from a fresh download of the program. No change.

The current relevant files.

retroarch.cfg: https://pastebin.com/uQFMJZ4B

XBox_One_Controller_Wireless_Adapter.cfg: https://pastebin.com/ss9JSYj8

8Bitdo_SN30__BT.cfg: https://pastebin.com/3L7f61NS

I asked this before for exactly this scenario but have not received a response, what method(receiver) are you using to connect your 8bitdo SN30 to Windows? (8bitdo usb adapter, bluetooth USB dapater, built-in bluetooth).

In order to relinquish control from the 8bitdo, you would have to disconnect the adapter and not just turning off the controller. The xbox one controller is the exception, you can simply turn off the controller without disconnecting the receiver and it will relinquish control (unless you are also connecting the XB1 controller via bluetooth to windows). This is not practical but attempt to do this first so we can make sure the autoprofile switch is working properly

Testing Xbox controller

  1. Disconnect 8bido adapter, turn off SN30 controller
  2. Turn on Xbox controller
  3. Run retroarch and test Xbox controller

and then

Testing SN30 Controller

  1. Turn off Xbox One Controller
  2. Connect 8bitdo adapter, Turn on SN30 Controller
  3. Run retroarch and test SN30 Controller

Assuming this works, you will be at the same point I am at. I am still trying to figure out how to switch controllers without disconnecting the receivers or turning off controllers.

Ah, had forgotten. Bluetooth is integrated into the motherboard. I suppose I could test the theory by disabling the radio itself and see if control transfers back and forth correctly.

Turning the Bluetooth antenna on or off as appropriate to swap out the XB1 with the SN30BT doesn’t do anything. I still have to go into

input->user 1 binds->user 1 device index

and change to the device I want to connect. Then all the auto settings are populated.

To be absolutely clear about my setup, I have a z370n wifi motherboard with a wireless antenna hooked up via SMA connectors. The XB1 wireless dongle is connected to a USB 3.0 hub along with a Logitech unifying antenna and a steam antenna. All work fine.

Is retroarch closed when you turn off the bluetooth antenna (leaving it off) and then run retroarch with the XB1 controller?

Since it is the built in bluetooth for you it makes it a bit different from my setup, I simply remove the 8bitdo retro receiver.

Correct. I connect with the SNES controller, check functionality, close Retroarch, turn off the bluetooth antenna, connect the XB1, run Retroarch. And then same in the opposite direction. Have to explicitly set the device in the user input options.

Hm so even after turning off the bluetooth, when you run retroarch it detects the 8bitdo controller?

Does retroarch show both controllers popping up within retroarch?

Try changing:

auto_remaps_enable = "true"
input_player2_joypad_index = "5"

to

auto_remaps_enable = "false"
input_player2_joypad_index = "1"

No. What happens is that the XB1 loads at port 0 before the four Dolphin devices for five total. The SN30 loads after the four Dolphin devices at port 4 for five total.

I’ll try changing those lines as soon I can. I’m in the middle of migrating my storage drive data to a larger one. It’ll be quite a few hours (1.3TB to go).

edit: Sorry, it’s been a few days. I haven’t had an opportunity to get back to this yet as I’ve had to do hard disk upgrades to two different systems and only got done with that today.

Update: no dice. Making those two changes to retroarch.cfg did not change the behavior of the controllers.

Out of curiosity, I tried one other thing. I switched the 8bitdo mode to Windows (two flashes per second by pressing X while turning the controller on). I re-paired it in the Windows Bluetooth dialog and ran Retroarch. The device appears to work correctly, but it is detected as an XBox 1 controller. I can swap between the actual XB1 and the SNES Bluetooth controller as I did before, by using the keyboard to navigate to: input, User 1 Binds, User 1 Device Index, and then switching between port 1 and port 4 manually. Retroarch simply cannot auto-detect which controller is active and then assigning the correct port.

One final message. I switched the Dolphinbar’s mode and that actually seems to have solved everything. The SN30 and XB1 controllers alternate port 0 and everything detects correctly. Even without any Mayflash autoconfigs in the system, they were still being detected by Retroarch and playing havoc with the main controllers.

This works out well because I thought I’d have to physically disconnect the Dolphinbar which is a bit of a problem for my media setup.

Thanks very much for all the help and being patient while I worked the problem. I’m really grateful.

Awesome, so glad it works for you now. No problem, just glad I could help.

1 Like

The effort wasn’t without useful results. I’ve identified some device ID problems with the N30 autoconfig that I’ll submit to GitHub when I get a chance and have a better idea now of the autoconfig hierarchy, which makes custom hotkey bindings go a lot more reliably.