[PR #806] Allow mapping axes to buttons #133

Closed
opened 2026-01-29 19:06:32 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/stenzek/duckstation/pull/806

State: closed
Merged: Yes


This PR adds an option to map gamepad buttons to axes on an emulated controller. As of now, this is useless for analog sticks because it is yet impossible to map buttons to halves of axes (so e.g. mapping the left stick to WSAD is still not possible). However, this is useful for pressure sensitive buttons, for example the ones found on a NeGcon controller. With this change, it's possible to map NeGcon's L/R buttons to LB/RB on the X1/PS4 gamepads, at the cost of losing pressure sensitivity for them.

This PR is still in early stages and is submitted only in case something has been done in an extremely wrong way. The to-do list looks as follows:

  • Implement changes to SDL backend
  • Implement changes to XInput backend
  • Allow mapping keyboard buttons
  • Allow mapping mouse buttons
  • Make changes to the Qt GUI
  • Make changes to the SDL GUI Not needed, SDL GUI doesn't allow for remapping
  • If needed, constrain rebindings to half axes (L/R/I/II)

Implements #795

**Original Pull Request:** https://github.com/stenzek/duckstation/pull/806 **State:** closed **Merged:** Yes --- This PR adds an option to map gamepad buttons to axes on an emulated controller. As of now, this is useless for analog sticks because it is yet impossible to map buttons to halves of axes (so e.g. mapping the left stick to WSAD is still not possible). However, this is useful for pressure sensitive buttons, for example the ones found on a NeGcon controller. With this change, it's possible to map NeGcon's L/R buttons to LB/RB on the X1/PS4 gamepads, at the cost of losing pressure sensitivity for them. This PR is still in early stages and is submitted only in case something has been done in an extremely wrong way. The to-do list looks as follows: - [X] Implement changes to SDL backend - [X] Implement changes to XInput backend - [x] Allow mapping keyboard buttons - [x] Allow mapping mouse buttons - [x] Make changes to the Qt GUI - [x] ~~Make changes to the SDL GUI~~ Not needed, SDL GUI doesn't allow for remapping - [x] If needed, constrain rebindings to half axes (L/R/I/II) Implements #795
claunia added the pull-request label 2026-01-29 19:06:32 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/duckstation#133