This functionality can help you create a per-game mapping of your controller to keyboard keys, in order to play games from old computers like Apple II, Sinclair or DOS and Windows games that are finicky with their joypad support.

The first thing to do is to select a game and press select to get the game option menu, and select Create pad to keyboard configuration.

Then you will have the option to select keys for each button/axis on your gamepad, both for player 1 and player 2. For each button/direction you click, you will be presented with a virtual keyboard to select the key you want to map to.

Once your pad2key configuration is done, it stays saved as a padto.keys or game_name.keys file next to your rom/in your Windows game directory folder. It is a plain JSON file with, for example:

  {
  "actions_player1": [
      {
          "trigger": [
              "hotkey",
              "start"
          ],
          "type": "key",
          "target": [
              "KEY_LEFTALT",
              "KEY_F4"
          ]
      },
      {
          "trigger": "up",
          "type": "key",
          "target": "KEY_UP"
      },
      {
          "trigger": "down",
          "type": "key",
          "target": "KEY_DOWN"
      },
      {
          "trigger": "a",
          "type": "key",
          "target": "KEY_RIGHTSHIFT"
      }
    ]
 }

Pad2keys config files can be scraped off screenscraper.fr, if you have enabled the option for it.

You can find some examples from the Content Downloader for Windows games like Ri-Li or Super Mario War, both with embedded pad2key config files.

  • emulators/pad2key.txt
  • Last modified: 3 months ago
  • by lbrpdx