Skip to content

feat: an Xbox pad gets the letter pressed - #35

Open
broslife wants to merge 1 commit into
mainfrom
feat/xbox-face-labels
Open

broslife wants to merge 1 commit into
mainfrom
feat/xbox-face-labels

Conversation

@broslife

Copy link
Copy Markdown
Collaborator

Closes #34.

With the controller type on Xbox One, the host gets the Switch's face buttons by label:

Switch button Before (position) Now (label)
A (east) Xbox B Xbox A
B (south) Xbox A Xbox B
X (north) Xbox Y Xbox X
Y (west) Xbox X Xbox Y

Every other type is unchanged: Automatic, Switch Pro and Joy-Con pair already agree by label, and the PlayStation types have shapes, so position is the only rule there.

Only what reaches the host turns. The shortcuts (Minus + A, the exit hold), the dial and the console's menus keep reading the pad by position. Changing the type from the dial mid-stream lets go of held buttons by the old layout and presses by the new.

"nx.face_layout": "position" in the settings block of settings.json keeps the Xbox type positional. No screen sets it, since the settings screen comes from the main repository; docs/tester.md says how to add it by hand. The stream logs face layout: Auto or face layout: Position.

Checked

  • cargo test --workspace, cargo clippy --workspace --all-targets -D warnings and cargo fmt --check pass in the dev box.
  • New tests: the label swap on an Xbox pad, position turning it off, Automatic staying positional, the dial still opening on Minus + A, and a mid-stream replug.
  • Not yet tried on a console or with a PC game.

With the controller type on Xbox One, the host now gets the Switch's
face buttons by label: A is the Xbox A, B is B, X is X and Y is Y, so
the button a game names is the one with that letter in hand. Before,
the wire went by position, and a game asking for A wanted the button
labelled B.

Only what reaches the host turns. The shortcuts, the dial and the
console's menus keep reading the pad by position, so Minus + A and
A to confirm stay where they were. Nintendo types already agree by
label, and PlayStation types have shapes, so they stay positional.

`nx.face_layout: "position"` in the settings document keeps the Xbox
type positional. No screen sets it; the tester manual says how to add
it by hand.

Closes #34

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@broslife
broslife marked this pull request as ready for review November 25, 2026 12:49
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.

Option to send face buttons by label (swap A/B and X/Y), like Moonlight's "flip face buttons"

1 participant