Controllers

AnyPS5 reads controllers through SDL, so any pad SDL recognises works without configuration: DualShock 4, DualSense, Xbox-style pads and the many clones SDL knows about. Analog sticks and analog triggers are passed through. The first recognised controller is the one the game sees.

On an Xbox-layout pad The game receives
A / B / X / Y Cross / Circle / Square / Triangle
LB / RB L1 / R1
LT / RT L2 / R2 (analog)
Left stick / right stick click L3 / R3

On PlayStation controllers the touchpad click is forwarded, but finger coordinates are not implemented, so a game that needs touch gestures will not get them.

v0.1.2 widened what a DualSense can do: motion sensors, rumble, adaptive triggers and the light bar are all driven over SDL. The same release builds SDL with HIDAPI, which is what fixed controller output on Windows.

Where the file goes

Create anyps5-input.ini next to the converted program — the file the relinker produced, in the same folder as libs and app0. Not next to the relinker, which has nothing to do with input. If the file does not exist, the built-in bindings apply and nothing is wrong.

Where it belongs
game/
├── app.elf  (or app.exe)
├── anyps5-input.ini   <- here
├── libs/
└── app0/

INPUT_MAPPING.md also describes ANYPS5_INPUT_CONFIG, which points AnyPS5 at a configuration file on another path. It is documented in the v0.1.2 copy of that file, and with neither anyps5-input.ini nor ANYPS5_INPUT_CONFIG present the built-in mapping is used.

The format

One binding per line, written as Action = Type:Value. The action is the PlayStation control the game expects; the value is the key, button or wheel direction you want to press instead.

Type Value Example line
KEY: Any key name accepted by SDL Cross = KEY:Space
MOUSE: Left, Middle, Right, X1 or X2 Square = MOUSE:Left
WHEEL: Up or Down Options = WHEEL:Up
  • Actions you do not list keep their built-in bindings, so the file only needs the lines you want changed.
  • Action names are not case-sensitive.
  • Lines starting with # or ; are comments.
  • The first line for an action replaces its default; further lines for the same action add alternatives.
  • Save the file as UTF-8. A byte-order mark is accepted.

Examples to copy

A WASD layout with the mouse on the face buttons, and a fullscreen toggle:

anyps5-input.ini
# anyps5-input.ini — keyboard and mouse
Cross = KEY:Space
Circle = KEY:LCtrl
Square = MOUSE:Left
Triangle = KEY:E
R2 = MOUSE:Right
L1 = KEY:Q
R1 = KEY:R
Options = KEY:Escape
LeftStickUp = KEY:W
LeftStickDown = KEY:S
LeftStickLeft = KEY:A
LeftStickRight = KEY:D
ToggleFullscreen = KEY:F11

Two keys for one action, and a comment style that is easy to forget:

anyps5-input.ini
# Two keys for the same action
Cross = KEY:Space
Cross = KEY:Return

; Semicolons start a comment too
ToggleMouse = MOUSE:Middle

Which actions exist

The names follow the PlayStation controller, plus a few AnyPS5 additions:

Face and shoulder
Cross, Circle, Square, Triangle, L1, R1, L2, R2, L3, R3, Options
D-pad
Up, Right, Down and Left — the direction on its own, with no Dpad prefix.
Sticks
Four directions per stick, for example LeftStickUp and RightStickRight, so a keyboard can drive an analog stick.
Touchpad and AnyPS5 extras
TouchLeft, TouchRight, ToggleMouse and ToggleFullscreen.

The authoritative and complete list lives in INPUT_MAPPING.md, which is also the file to check when an action name here does not work.

Tuning: settings

The same file accepts tuning settings alongside the bindings, each at most once, written as Setting = Value. They are what you reach for when the sticks feel wrong rather than when a button is on the wrong key.

Setting What it does Default
LeftStickDeadzone, RightStickDeadzone Whole percentage from 0 to 90 of the controller stick's travel that reads as centred. Outside it the travel is rescaled, so the stick still reaches its full range. Keyboard and mouse stick bindings are not affected. 0
MouseSensitivity Number greater than 0 and at most 10. At 1, moving the mouse 3000 counts per second tilts the stick fully, about 5 cm per second at 1600 DPI; a larger number needs less movement. 1
MouseVerticalScale Number from 0.1 to 10 that multiplies vertical mouse speed, for games that pitch slower or faster than they turn. 1
MouseCurve Number from 0.2 to 5, the response exponent. Above 1 gives finer control at low speed; below 1 reaches large tilts sooner. 1
MouseDeadzoneOffset Number from 0 to 0.9, the smallest tilt any movement produces as a fraction of full tilt. Set it just above the game's own deadzone: raise it if slow movement does not move the camera, lower it if small movements jump. 0.2
MouseMaxSpeed Number from 0.1 to 10, the highest tracked speed as a multiple of the full-tilt speed. Above 1, a fast flick keeps the stick at full tilt a little longer after the mouse stops. 1
MouseSmoothingMs Number from 0 to 500, the smoothing time constant in milliseconds. 0 follows every mouse report directly. 10
MouseDecayMs Number from 1 to 1000, the milliseconds without movement after which the stick is centred. 30
anyps5-input.ini
LeftStickDeadzone = 12
RightStickDeadzone = 8
MouseSensitivity = 2.5

Mouse as the right stick

ToggleMouse, bound to the middle mouse button by default, captures the mouse and drives the right stick from how fast the mouse moves. Press it again to release. Capture uses raw relative input, so the pointer speed and acceleration set in your operating system do not apply, and capture also ends — with every held key let go — when the window loses focus.

The stick tilts in the direction the mouse moves, and further the faster it moves. Speed is measured in counts per second over the time between updates, so the same hand speed gives the same tilt at any frame rate. Any movement tilts the stick at least MouseDeadzoneOffset, so slow movement is not lost inside the game's own deadzone. When the mouse stops, the stick eases back and is centred MouseDecayMs after the last movement.

The documented example for a game with a small deadzone that needs fast turns:

anyps5-input.ini
MouseSensitivity = 1.6
MouseDeadzoneOffset = 0.12
MouseCurve = 1.3

Earlier versions sampled the mouse every 33 ms and tilted the stick at least halfway for any movement. MouseDeadzoneOffset = 0.5, MouseSmoothingMs = 0 and MouseDecayMs = 33 come close to that behaviour.

When the file has a mistake

Nothing responds at all? Check that the file really is next to the converted program and not next to the relinker, and that the game is not simply stuck before input matters. Our troubleshooting page covers the start-up failures that look like an input problem but are not.

Sources: INPUT_MAPPING.md, which also ships as a file inside the v0.1.2 release assets, and USAGE.md.