1
0
mirror of https://github.com/luanti-org/luanti.git synced 2026-01-11 11:45:25 +01:00
Files
luanti/builtin
Thierry FOURNIER a3cc982ecf Add PlayStation 5 DualSense controller support (#16808)
Implements a complete button and axis layout for the PS5 DualSense
controller on macOS, matching Minecraft-style controls:

- Analog sticks: Movement (left) and camera control (right)
- Face buttons: Jump (X), Sneak (Circle), Camera mode (Square),
  Drop item (Triangle)
- Triggers: L2/R2 mapped as analog axes for dig/place actions
- Bumpers: L1/R1 for hotbar navigation
- Stick clicks: L3 for sprint, R3 for zoom
- D-pad: Fly mode, autoforward, minimap, fast movement
- Touchpad click opens inventory
- Options button for pause menu

The layout is automatically detected when a controller named
"DualSense" is connected, or can be manually selected with
`joystick_type = ps5`.

Note: L2/R2 triggers use negative direction (-1) due to their
analog axis range going from -32768 (released) to +32767 (pressed).
2026-01-05 22:35:01 +01:00
..
2025-04-13 16:07:01 +01:00