dolphin icon indicating copy to clipboard operation
dolphin copied to clipboard

Feature Request #13201: Per game hotkey profiles through the GameINI

Open toadkarter opened this issue 1 year ago • 0 comments

What has been added?

This pull request implements the feature requested in #13201. It allows users to add a hotkey profile to a game-specific .ini file, so that every game can have their own specific hotkey bindings.

The game .ini can be edited by including the following additional section to the game-specific .ini file, where Name should be replaced with the relevant hotkey profile name:

[Hotkeys]
HotkeyProfile = Name

If the user attempts to add several different hotkey profiles to a game-specific .ini file, only the first in the list will be chosen, as only one hotkey profile should be active at any given time.

How can I verify that this feature works?

  1. Create and save a new hotkey profile by going into Options -> HotkeySettings and change one keybinding that is very easy to verify (i.e., "Exit Emulation").
  2. Load a different hotkey profile that doesn't have the same binding for your selected action in step 1, or clear all currently active hotkeys.
  3. Add the Hotkeys section to an .ini file of any game that you have in your library together with the hotkey profile that you just saved, in the format listed above.
  4. Start the game - the game-specific hotkey profile should have loaded and the relevant key binding should now work.

I'm happy to make any tweaks as per anyone's suggestion - thanks in advance for having a look at my code!

toadkarter avatar Mar 14 '23 22:03 toadkarter