Skip to content

fix: support wired Xbox 360 Controller (045e:028e) - #72

Open
natea wants to merge 3 commits into
stephenleo:mainfrom
natea:feat/xbox-360-wired
Open

natea wants to merge 3 commits into
stephenleo:mainfrom
natea:feat/xbox-360-wired

Conversation

@natea

@natea natea commented Oct 10, 2026 •

Copy link
Copy Markdown

Summary

The wired Xbox 360 Controller (045e:028e, reports as "Controller") fell back to the generic driver and failed openmicro doctor. This adds a parser for its 20-byte XInput report and routes the PID to it.

Layout (decoded from a live capture on macOS):

Byte Contents
0–1 00 14 (message type, length)
2 dpad up/down/left/right 01/02/04/08, Start 10, Back 20, L3 40, R3 80
3 LB 01, RB 02, Guide 04, A/B/X/Y 10/20/40/80
4–5 LT / RT, uint8 0–255
6–13 sticks, int16 LE

Changes

  • src/controller/xbox-driver.ts: parseXbox360Report + XBOX_360_PIDS. Guide → touchpad; l2/r2 presses synthesized at >25%.
  • src/controller/hid-manager.ts, src/doctor.ts: route 045e:028e before the generic fallback.
  • test/drivers.test.ts: unit tests built from real captured frames.
  • test/fixtures.test.ts: select the 360 parser by PID for fixture replay.
  • test/fixtures/controllers/045e-028e-usb.json: 17/17 doctor report; CONTROLLERS.md table regenerated.
  • demo/, assets/demo/xbox360/: Xbox 360 demo scenes and GIFs, shown in the README.
  • README.md, src/harness/claude.ts: push-to-talk (△ / Y) setup. The button only works when Claude Code's voice.mode is tap. The default, hold, types a space instead of listening. Adds a setup section and a troubleshooting entry.

Test plan

  • npm run typecheck && npm run lint && npm run format:check && npm test (328 tests pass)
  • node dist/cli.js doctor on a real pad: 17/17, Driver: xbox

🤖 Generated with Claude Code

natea and others added 3 commits October 10, 2026 10:06
The wired 360 pad fell back to the generic driver and failed doctor.
Add parseXbox360Report for its 20-byte XInput report (byte 2: dpad,
start/back, stick clicks; byte 3: bumpers, guide, face buttons; bytes
4-5: uint8 triggers; bytes 6-13: int16 LE sticks), route the PID in
createDriver() and doctor's findDevice(), and commit the 17/17 doctor
report as a replay fixture.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The north button (△ / Y) sends a single Space per press, which Claude Code's
default hold voice mode reads as a typed space. Document setting
voice.mode to "tap", add a troubleshooting entry, and show the Xbox 360 demos.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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