Repository navigation
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.