# Hotkeys

Hotkeys are controller or keyboard shortcuts, that are used to perform several operations while in-game, such as saving game progress (savestate), pausing the game or rewinding,  the more frequent usage will be to quit games/emulators by pressing **HOTKEY** + **START**

The Retrobat team has defaulted keyboard and controller hotkeys for multiple emulators, the default hotkey buttons for Gamepad are the following:

{% hint style="info" %}
To trigger a hotkey action, you need to press and hold the "Hotkey enable" button, then press the second button that corresponds to the action to perform.
{% endhint %}

<table><thead><tr><th width="212.5833740234375">Hotkeys (Gamepad)</th><th width="153">Keyboard key</th><th width="372.683349609375">Action</th></tr></thead><tbody><tr><td>Hotkey + <img src="https://990680527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FexdzL60ZuqPLldz2AYta%2Fuploads%2FQlIryQa7tR2pBTWHhMXR%2Fimage.png?alt=media&#x26;token=e1940a32-2494-4e92-a8b1-df9a722ed4f8" alt=""></td><td>CTRL+F12</td><td><a href="game-control-center">Game Control Center</a></td></tr><tr><td>Hotkey + <img src="https://990680527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FexdzL60ZuqPLldz2AYta%2Fuploads%2FW8q8wzu0yW9Htt5h4zEA%2Fimage.png?alt=media&#x26;token=a4ae3ad3-3a80-4c28-8b15-92a1b5a80da7" alt=""></td><td>F1</td><td>Emulator Menu (or Pause if emulator has no menu)</td></tr><tr><td>Hotkey + <img src="https://990680527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FexdzL60ZuqPLldz2AYta%2Fuploads%2FxHRhyw00NGOZ8cEPrQdp%2Fimage.png?alt=media&#x26;token=d6027ace-7176-4b82-b702-e3b2b65d7cd4" alt=""></td><td>F4</td><td>Load State</td></tr><tr><td>Hotkey + <img src="https://990680527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FexdzL60ZuqPLldz2AYta%2Fuploads%2F5yYVjQu41LdiMVCXpyNa%2Fimage.png?alt=media&#x26;token=e43f5c0f-2c53-49cc-9271-2385216d89df" alt=""></td><td>F2</td><td>Save State</td></tr><tr><td>Hotkey + START</td><td>Esc</td><td>Quit emulator/game</td></tr><tr><td>Hotkey + L1</td><td>F11</td><td>Eject Disc</td></tr><tr><td>Hotkey + R1</td><td></td><td>AI Translation Service</td></tr><tr><td>Hotkey + L2</td><td>F9</td><td>Select Disc Index -</td></tr><tr><td>Hotkey + R2</td><td>F10</td><td>Select Disc Index +</td></tr><tr><td>Hotkey + D-PAD UP</td><td>F7</td><td>Select Save Slot Index +</td></tr><tr><td>Hotkey + D-PAD DOWN</td><td>F6</td><td>Select Save Slot Index -</td></tr><tr><td>Hotkey + D-PAD LEFT</td><td>Backspace</td><td>Rewind</td></tr><tr><td>Hotkey + D-PAD RIGHT</td><td>Hold: F<br>Toggle: Space</td><td>Fast Forward (can be changed from Hold to Toggle)</td></tr><tr><td>Hotkey + R3 (right stick)</td><td>F8</td><td>Screenshot</td></tr><tr><td></td><td>F</td><td>Toggle fullscreen</td></tr><tr><td></td><td>K</td><td>Frame Advance</td></tr><tr><td>Hotkey + L3</td><td>P</td><td>Pause (if emulator has a menu and Hotkey +<img src="https://990680527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FexdzL60ZuqPLldz2AYta%2Fuploads%2FBVJkYTuavyPoV1JJfe9h%2Fimage.png?alt=media&#x26;token=e8a2f3ca-ca29-4e70-9c3d-871618ae2e72" alt=""> is used for it) </td></tr></tbody></table>

The following list of emulators are currently aligned on this shortcut model, with some variations based on emulator capabilities:

<details>

<summary>Emulators with aligned hotkeys</summary>

* RetroArch
* Ares (uses PadToKey)
* BigPEmu
* Bizhawk (uses padToKey)
* Cgenius (only save/load state) (uses Pad2Key)
* Citron
* Demul
* DesMume (uses Pad2Key)
* Dhewm3
* Dolphin
* Duckstation
* Eden
* Flycast
* Hatari
* Jgenesis (uses Pad2Key)
* MAME
* Mednafen
* MelonDS (uses Pad2Key)
* Mesen
* Mupen64(RMG)
* OpenMSX
* PCSX2
* PPSSPP
* Project64 (uses Pad2Key)
* Raine (uses Pad2Key)
* Snes9X (uses Pad2Key)
* Sudachi
* Suyu
* Yuzu

</details>

## Customizing hotkeys

RetroBat offers the ability to modify the default hotkeys assignment for several emulators, both for keyboard and gamepad.

Modifications need to be performed inside a file located in the `\system\resources\inputmapping` folder of your RetroBat installation:

* **kb\_hotkeys.yml** : to modify standard assignment for keyboard
* **controller\_hotkeys.yml** : to modify standard assignment for controller hotkeys

{% hint style="info" %}
It is also possible to modify hotkeys only for one emulator, this can be achieved by prefixing the file with the emulator name, for example "`pcsx2_controller_hotkeys.yml`".
{% endhint %}

The following list of emulators allow modification of hotkeys:

<details>

<summary>Emulators with assignable hotkeys</summary>

* RetroArch
* Ares
* BigPEmu
* Bizhawk
* DesMUME
* Dolphin
* Duckstation
* Flycast
* JGenesis
* Mednafen
* MelonDS
* Mesen
* PCSX2
* PPSSPP
* Project64
* Raine
* Snes9X

</details>

{% hint style="warning" %}
The file uses the RetroArch naming for hotkeys, even for other emulators.
{% endhint %}

### Remap controller hotkeys <a href="#remap-controller-hotkeys" id="remap-controller-hotkeys"></a>

Copy the file **controller\_hotkeys.yml** to the `\user\inputmapping\` folder of your RetroBat installation.

Open the file with your preferred text editor:

<div align="left"><figure><img src="https://990680527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FexdzL60ZuqPLldz2AYta%2Fuploads%2F2QFj7FeSCOe18RODAJWa%2Fimage.png?alt=media&#x26;token=7339ea2f-df54-449a-bd21-583bdeb81ef5" alt=""><figcaption></figcaption></figure></div>

The file is a yml-formatted file, **by default all values are commented**.

The first thing to do is to uncomment the actual section where the buttons are defined, as well as the container section, this is done by removing the # character on all lines after the `#default:` line, including the latter:

<div align="left"><figure><img src="https://990680527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FexdzL60ZuqPLldz2AYta%2Fuploads%2FldEieKKiaQ802fd5zIRM%2Fimage.png?alt=media&#x26;token=2e3082ff-7539-4955-b465-ffa26d218f9d" alt=""><figcaption></figcaption></figure></div>

In this example, we will replace the **fast-forward** and **rewind** hotkeys with R1 and L1 buttons, and move the **disk\_eject** and **ai\_service** to the d-pad:

to do this, just assign the **rewind** feature to pageup (L1) and the **hold\_fast\_forward** to pagedown (R1), and then assign the **disk\_eject\_toggle** and **ai\_service** to their respective d-pad buttons (left & right):

<div align="left"><figure><img src="https://990680527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FexdzL60ZuqPLldz2AYta%2Fuploads%2FxHxf6dngIQ1pkaFATj5s%2Fimage.png?alt=media&#x26;token=1a9e33d5-15c7-4526-bb11-46a54e5c886e" alt=""><figcaption></figcaption></figure></div>

Now save the file in the `\user\inputmapping` folder of your RetroBat installation:

<div align="left"><figure><img src="https://990680527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FexdzL60ZuqPLldz2AYta%2Fuploads%2FWHaPZp2x1AN0ZsuoknR6%2Fimage.png?alt=media&#x26;token=61f10593-5ab3-4bdf-969f-481e61e1d323" alt=""><figcaption></figcaption></figure></div>

In addition, it is also possible to perform a specific hotkey mapping for a specific core (in case emulators have multiple cores: Ares, Bizhawk, RetroArch...), in this example, the mapping is different between the flycast core, by using toggle instead of hold for fast forward:

<div align="left"><figure><img src="https://990680527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FexdzL60ZuqPLldz2AYta%2Fuploads%2F8WceNkgEALYiIlEBJdts%2Fimage.png?alt=media&#x26;token=fd1b5c14-7875-4215-8a03-d55c7ea02ff2" alt=""><figcaption></figcaption></figure></div>

### Remap keyboard hotkeys <a href="#remap-keyboard-hotkeys" id="remap-keyboard-hotkeys"></a>

Copy the file **kb\_hotkeys.yml** to the `\user\inputmapping\` folder of your RetroBat installation.

Open the file with your preferred text editor:

<div align="left"><figure><img src="https://990680527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FexdzL60ZuqPLldz2AYta%2Fuploads%2FrFlFuOVamI3YkYC8zxbQ%2Fimage.png?alt=media&#x26;token=9166d989-b373-4681-9ec7-6af9a4450d3f" alt=""><figcaption></figcaption></figure></div>

The file is a yml-formatted file, **by default all values are commented**.

The first thing to do is to uncomment the actual section where the buttons are defined, as well as the container section, this is done by removing the # character on all lines after the `#default:` line, including the latter:

<div align="left"><figure><img src="https://990680527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FexdzL60ZuqPLldz2AYta%2Fuploads%2FqT4KelI9DVkmdjEULjFr%2Fimage.png?alt=media&#x26;token=303a0f54-3057-4e4d-bf63-3a446457d441" alt=""><figcaption></figcaption></figure></div>

Now save the file:

<div align="left"><figure><img src="https://990680527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FexdzL60ZuqPLldz2AYta%2Fuploads%2F9ENz5S9npryYvONrLMsE%2Fimage.png?alt=media&#x26;token=57dd5d15-a7ad-4e45-9e2d-555f0b8e3bce" alt=""><figcaption></figcaption></figure></div>

In addition, it is also possible to perform a specific hotkey mapping for a specific core (in case emulators have multiple cores: Ares, Bizhawk, RetroArch...), in this example, the mapping is different between the flycast core, by using toggle instead of hold for fast forward:

<div align="left"><figure><img src="https://990680527-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FexdzL60ZuqPLldz2AYta%2Fuploads%2FF4C2a7EF7lsikuB2UpxP%2Fimage.png?alt=media&#x26;token=2720b657-9bb3-40d4-a2b3-929250d88949" alt=""><figcaption></figcaption></figure></div>
