Gamepad Mapping

This section should aboard these different problems:

Ports and Players

This section should aboard these different how inputs are assigned to an emulated consol port or a player.

The problem: emulators have ports which can accept one or no gamepad, and controllers can be plugged into one or no port, we want the user to be able to reassign the controllers to the ports. Ports roughly map to players as typically there is one controller per player, though in rare cases a controller could be shared by multiple players and multiple controllers could can be used by one player.

Following is a proposal to fix this problem.

When starting a game, each gamepad should be assigned to a port (gamepad one to port one… etc.).

A button showing a gamepad icon should be on the right part of the header bar, clicking it would display a popover containing the following:

Clicking the reassign button would trigger a dialog showing the list of all controllers as "Unassigned", the dialog would ask "Press a button on controller for port (player?) x, then x+1, etc… until all controllers are assigned or the process is validated early, making the remaining controllers unassigned. A button could allow to skip a port, another could allow to assign the mouse.

The following tweaks could be possible in the popover:

This section should aboard how the GUI could be controlled with other inputs than a keyboard and a mouse, such as gamepads. This would avoid the player to switch between different input types when using Games.

Accessing Gamepads

There are two APIs provided by the linux kernel:

Other references:


Relevant Art




ingametitlebar-1.png customizefirstpage-1.png customizesecondpage-1.png customizesecondpagekeyboard-1.png customizebyclicking-1.png incompatibleprompt-1.png

Design/Playground/Games/Inputs (last edited 2017-05-08 12:22:51 by AdrienPlazas)