AnyPS5 controls: controllers, keyboard and mouse mapping

Controllers work without configuration. Keyboard and mouse have built-in bindings that you can override with a small text file, and the generator below writes that file for you.

Checked against the upstream repository on Oct 11, 2026.

Game controllers

AnyPS5 accepts any controller that SDL has a mapping for. Xbox-style pads and PlayStation controllers recognised by SDL use the standard PlayStation button layout, with analog sticks and triggers passed through.

Xbox-layout controllerSeen by the title as
A / B / X / YCross / Circle / Square / Triangle
LB / RBL1 / R1
LT / RTL2 / R2 (analog)
StartOptions
D-pad, stick clicksD-pad, L3 / R3
  • Controllers can be connected or unplugged while the game is running.
  • The first recognised controller is the one that is used.
  • On a PlayStation controller the touchpad click is forwarded. Finger positions on the touchpad are not implemented.
  • Controller bindings are always on and are not affected by the keyboard and mouse file.

Keyboard and mouse

With no configuration file, AnyPS5 uses its built-in keyboard and mouse bindings. To change some of them, create a file named anyps5-input.ini beside the generated executable, or point ANYPS5_INPUT_CONFIG at a file somewhere else.

Each line has the form Action = Type:Value:

TypeValuesExample
KEYAny key name SDL acceptsCross = KEY:Return
MOUSELeft, Middle, Right, X1, X2Square = MOUSE:Left
WHEELUp, Down (pad buttons only)R1 = WHEEL:Up
  • Action names are not case-sensitive. Lines starting with # or ; are comments.
  • The first line for an action replaces its built-in bindings. Further lines for the same action add alternatives.
  • Actions you leave out keep their built-in bindings.
  • An invalid line stops input initialisation and reports the file and line number, so mistakes are easy to find.

Action names

These are all the actions the file understands.

GroupActions
Face buttonsCross Circle Triangle Square
Shoulders and sticksL1 R1 L2 R2 L3 R3 Options
D-padUp Right Down Left
Left stickLeftStickLeft LeftStickRight LeftStickUp LeftStickDown
Right stickRightStickLeft RightStickRight RightStickUp RightStickDown
Touchpad and windowTouchLeft TouchRight ToggleMouse ToggleFullscreen

INI generator

Pick an action, click the capture box, then press a key, click a mouse button or scroll. Repeat to add alternatives. Nothing leaves your browser.

Capture
    anyps5-input.ini

    Key names follow SDL's naming (for example Return, Space, Left Shift). The ; and # keys cannot be bound from a file because they start a comment.

    Example file

    This is the example from the upstream documentation. It binds Cross to F or Space, moves the left stick to I/J/K/L, puts Square and R2 on the mouse buttons, and leaves everything else on the defaults.

    anyps5-input.ini
    Cross = KEY:F
    Cross = KEY:Space
    LeftStickLeft = KEY:J
    LeftStickRight = KEY:L
    LeftStickUp = KEY:I
    LeftStickDown = KEY:K
    Square = MOUSE:Left
    R2 = MOUSE:Right
    ToggleMouse = MOUSE:Middle

    Reference: docs/user/INPUT_MAPPING.md.

    Scripted input for test runs

    For automated testing, AnyPS5 can read controller presses from a command file. Set APS5_PAD_INPUT_FILE to an absolute path before launching, then use the helper script from the repository in a second terminal:

    bash
    APS5_PAD_INPUT_FILE=/tmp/anyps5-pad ./app.elf
    python3 tools/pad_input.py /tmp/anyps5-pad cross
    python3 tools/pad_input.py /tmp/anyps5-pad down --hold-ms 500
    python3 tools/pad_input.py /tmp/anyps5-pad release

    A press lasts 300 ms by default and is added on top of any physical controller input. --hold-ms accepts 1 to 5000. The file holds only the latest command, so wait for a release to be observed before sending the next press.