Skip to content

feat(config): add dpad_to_buttons option for the Xpad DPad - #828

Open
Jyers wants to merge 1 commit into
ShadowBlip:mainfrom
Jyers:feat/dpad-to-buttons
Open

Jyers wants to merge 1 commit into
ShadowBlip:mainfrom
Jyers:feat/dpad-to-buttons

Conversation

@Jyers

@Jyers Jyers commented Nov 28, 2026

Copy link
Copy Markdown

Dance pad style controllers have one particular need which is different than most others: The D-pad inputs need to map to buttons rather than axes, as it is extremely important to be able to register simultaneous inputs for up+down or left+right. This behavior is specifically accounted for in the xpad driver (see xbox-dance-pads and unknown-controllers sections of driver docs).

This PR brings the same functionality to inputplumber by adding a dpad_to_buttons (same name as used in xpad) to the device configuration options. Allowing a virtual inputplumber device to output D-pad events as button inputs rather than axis positions.

Add an opt-in dpad_to_buttons option to composite device configs. When
enabled, the emulated Xbox gamepad exposes its DPad as BTN_DPAD_* keys
instead of ABS_HAT0X/ABS_HAT0Y hat axes, mirroring the kernel xpad
driver's dpad_to_buttons module parameter. Hat axes can only express a
single direction at a time, so the button encoding allows opposite DPad
directions to be reported simultaneously (e.g. for dance pads).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant