fix(vader5): map M1..M4 to BTN_TRIGGER_HAPPY1..4 (Steam Elite paddle slots)#353
Conversation
…slots) Xbox Elite Series 2 evdev spec reserves BTN_TRIGGER_HAPPY1..4 for back paddles P1..P4. PR #235 enabled C/Z/LM/RM in [output.buttons] and placed them at HAPPY1..4, displacing the physical back paddles (M1..M4) to HAPPY5..8 where Steam does not recognize them. Pressing extra face buttons appeared as paddle presses; pressing real paddles produced no input. Move M1..M4 to HAPPY1..4 (preserving the M2/M3 swap so Vader M2 lands at P3 per Steam Elite labeling). Push C/Z/LM/RM/O to HAPPY9..13 — they keep stable evdev codes but no longer collide with paddle reserved slots. Add regression test asserting (a) M1..M4 occupy HAPPY1..4, (b) none of C/Z/LM/RM/O fall in HAPPY1..4. Refs #235
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR updates the Flydigi Vader 5 controller button mappings in the device configuration, reassigning M1–M4 paddle slots and face buttons to different trigger-happy codes. Unit and E2E test expectations are updated and expanded to validate the new button-to-HID-usage relationships. ChangesVader 5 Button Mapping Update
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
BTN_TRIGGER_HAPPY1..4for back paddles P1..P4. padctl masquerades Vader 5 Pro as Xbox Elite Series 2 (vid=0x045e pid=0x0b00), so the same slot reservation applies.C/Z/LM/RMin[output.buttons]and placed them atHAPPY1..4, displacing the real back paddlesM1..M4toHAPPY5..8which Steam/games do not recognize as paddles.M1..M4toHAPPY1..4(preserving the M2/M3 swap so Vader M2 lands at the Steam Elite P3 slot per PR fix: restore Vader 5 M2 Steam paddle label #323's intent). PushC/Z/LM/RM/OtoHAPPY9..13— they keep stable evdev codes but no longer collide with the paddle reserved range.src/io/uhid_descriptor.zigcompanion test that asserted the old hard-coded HAPPY values and propagated USAGE-number offsets (HAPPY1=usage 17, HAPPY9=usage 25, etc.).src/test/validate_e2e_test.zig:BTN_TRIGGER_HAPPY1..4(positive lock, including M2/M3 swap)BTN_TRIGGER_HAPPY1..4(structural invariant — catches the PR uhid: emit per-button Usage items instead of Usage Min/Max range #235 class of regression)Test plan
zig build testgreen in canonical Docker image (1558 tests, 7 skipped) — pre-push hookM1 = BTN_TRIGGER_HAPPY5in TOML fires the new positive-lock test and the existing uhid_descriptor test (2 failures, both reverted)evtest /dev/input/event26— physical M1..M4 → HAPPY1..4 confirmed; physical C/Z/LM/RM → HAPPY9..12 confirmedRefs #235
Summary by CodeRabbit
Bug Fixes
Tests