Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Unified Controller): add unified controller driver #294

Merged
merged 1 commit into from
Feb 23, 2025

Conversation

ShadowApex
Copy link
Contributor

This change adds the Unified Controller as defined by the Unified Controller Input Spec. If used as a target device, it will create a virtual hidraw interface that will send input reports based on the source device capabilities.

@ShadowApex ShadowApex requested a review from pastaq February 19, 2025 23:45
@ShadowApex ShadowApex force-pushed the shadowapex/grand-unified-controller branch 2 times, most recently from 7efc1dd to b47464d Compare February 20, 2025 02:30
@ShadowApex ShadowApex force-pushed the shadowapex/grand-unified-controller branch 4 times, most recently from 91d905b to c25d78f Compare February 21, 2025 02:24
@ShadowApex ShadowApex marked this pull request as ready for review February 21, 2025 02:27
Ok(vec![])
}

fn handle_input_report(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this a lot. I think we can use a similar pattern in other drivers to simplify them.

MouseButtonSide = 0x113,
MouseButtonExtra = 0x114,

/// Base button, usually on the bottom right, Steam Quick Access Button (...)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should avoid calling this Base Button, those buttons are reserved for the physical base of a joystick. Only the openSD driver uses BTN_BASE for this, which is wrong.

GamepadButtonNorth = 0x133,
/// West action, Sony Triangle ∆, XBox Y, Nintendo X
GamepadButtonWest = 0x134,
/// Select, Sony Select, Xbox Back, Nintendo -, Steam Deck ⧉
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Steam are following the xone symbols for this, xb360 and previous used start select, all modern xbox use menu/view

/// Touch binary sensor for right stick
GamepadButtonRightStickTouch = 0x30e,

/// Dedicated button to open an on-screen keyboard
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the following 3 events are out of numerical order

@pastaq
Copy link
Contributor

pastaq commented Feb 21, 2025

Took a quick look, nothing major stands out. I'll run some tests and let you know how it goes. This is great.

@ShadowApex ShadowApex force-pushed the shadowapex/grand-unified-controller branch from c25d78f to af6ad93 Compare February 23, 2025 22:05
@ShadowApex ShadowApex merged commit b396408 into main Feb 23, 2025
2 checks passed
@ShadowApex ShadowApex deleted the shadowapex/grand-unified-controller branch February 23, 2025 22:11
Copy link

🎉 This PR is included in version 0.48.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants