[feature request] Save Hotkeys to Autoconfig Profile
Description
Because hotkeys are a very personal preference, we specifically disallow any hotkeys from being assigned in autoconfig profiles except for the menu toggle on various pads' "home" buttons. However, many people who swap among multiple controllers want to have hotkeys available on their pads without constantly revisiting the hotkey menu to reassign them, since they're stored as static keycodes that may not be consistent across gamepads.
This comes up fairly often on the subreddit and I typically tell users to add the hotkey assignments to their autoconfig profile via a text editor, which works well, AFAIK. However,
I propose adding an option to "save hotkeys to autoconfig profile" (and probably would need a corresponding "reset hotkeys to default", as well) to settings > input > hotkeys so users can achieve this without needing to do it manually via text editor.
Expected behavior
Custom hotkeys that follow controllers around as you swap among them
Actual behavior
hotkeys are tied to the controller on which you set them
Steps to reproduce the bug
- plug in a pad
- set some hotkeys
- plug in another pad
- try to use those hotkeys
Bisect Results
always. it's normal behavior
Version/Commit
You can find this information under Information/System Information
- RetroArch: 1.16.0
Environment information
- OS: all
- Compiler: any
@sonninnos , pinging you on this as the resident menu guru. Do you know of any technical dealbreakers on something like this?
Seems like a worthy pursuit, and shouldn't be too complicated.
- https://github.com/libretro/RetroArch/issues/16115
This comes up fairly often on the subreddit and I typically tell users to add the hotkey assignments to their autoconfig profile via a text editor, which works well, AFAIK.
@hizzlekizzle
This is not working for me. For example:
In a autoconfig/udev/SNES Controller.cfg file:
input_enable_hotkey_btn = "6"
input_exit_emulator_btn = "7"
input_load_state_btn = "5"
input_menu_toggle_btn = "2"
input_save_state_btn = "4"
input_shader_toggle_btn = "0"
The settings above will not be applied for my SNES controller. The hotkey settings configured on the global retroarch.cfg will be considered instead. What should I do?
@abbluiz the above works for me on 1.20.0 / Win x64 with xinput as controller driver. please verify the active:
- controller driver via Settings / Driver (remember, input and controller driver are independent)
- autoconfig via Main Menu / Information / System Information
@odditude42 I managed to fix it by doing the following:
Changing all related hotkey variables to "nul" in the global retroarch.cfg. Example:
input_enable_hotkey_btn = "nul"
input_exit_emulator_btn = "nul"
input_load_state_btn = "nul"
input_menu_toggle_btn = "nul"
input_save_state_btn = "nul"
input_shader_toggle_btn = "nul"
And then change these values to whatever I need in the specific autoconfig file for each controller.
I'm on Linux (Fedora 42) using version 1.21.0 if anyone is having a similar issue.
just echoing support for this.
Super big thanks for pointing out how to do this, @abbluiz!
Is there a text-editor power-user hack-the-matrix way of changing hotkeys based on core, as well? For instance, on older systems, I like having L2 = Rewind and R2 = fast forward. But obviously, this can't work for PSX/DC, so it'd be nice to be able to juggle things. Is it as simple as adding the same lines to the .opt files in \config\corename\?
No. opt files are for core options and thus can't take any frontend settings, cfg files are for frontend setting overrides.
No.
optfiles are for core options and thus can't take any frontend settings,cfgfiles are for frontend setting overrides.
Ah, gotcha. So there's no way for frontend overrides to be set per-core? (or per-directory, or per-content for that matter...)
Pretty sure there is: https://github.com/libretro/RetroArch/pull/14895
This really saved my bacon, now that I have a Stadia controller to supplement my PS4/PS5 ones. The Stadia controller even has sufficient buttons so that I can avoid the hotkey enabler and just go for direct actions (menu/save-state/load-state).