Feature request: Xbox gamepad support on Windows
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 401
- Avg merge
- 21h 40m
- Merged PRs (30d)
- 805
Description
**提交人**: 用户6720
**客户端版本**: 0.1.60
---
## 使用场景
Windows 用户希望通过 Xbox 手柄操作 Cindy 界面(与 macOS 版相同的功能集:A=提交、B=返回、摇杆滚动等按键绑定、语音命令、摇杆模式 conversation-scroll/custom)。
## 当前痛点
Windows 上游戏手柄设置界面照常显示,但永远提示“未检测到设备”,即使真实连接了一个工作正常的 Xbox 无线手柄(蓝牙,VID_045E/PID_02FD,Steam 与 Windows 设备管理器都能识别,且存在 XInput 兼容 HID 设备)。设备本身健康,问题在于该平台从未被应用检测。
## 诉求
在 Windows 构建版上实现与 macOS 对等的 Xbox 手柄输入支持。
## 建议方案
- 排查手柄宿主层:当前实现只 spawn 一个 macOS 专属 Swift helper(cindy-macos-xbox-gamepad-helper),且仅在 process.platform === "darwin" 时启动宿主;其它平台直接调用 markUnavailable(),把 UI 永久置为不可用。
- Windows 上用 XInput(或 Raw Input)等原生 API 实现等价 helper,复用现有 IPC 协议(xbox-gamepad:probe、state-changed 事件、settings、layout preview),渲染层功能集可原样复用。
- 保持功能对齐:按键绑定、摇杆模式(conversation-scroll / custom)、电量与连接方式信息。
## 备选方案
曾考虑用 Chromium navigator.getGamepads() 的 Web Gamepad API——当前功能并未使用它,且原生 XInput 路径更贴合现有架构。
## 备注
不含任何敏感或个人可识别信息;环境信息(版本/OS/语言)由提交系统自动附加。
---
**版本区域**: CN
**OS**: win32 x64 (10.0.26200)
**界面语言**: zh-CN
Contributor guide
Research direction
Start at the process.platform === "darwin" host-selection path and inspect the cindy-macos-xbox-gamepad-helper integration. Trace the existing xbox-gamepad:probe and state-changed IPC events, settings, and layout preview before choosing the Windows host approach. Done means Windows detects an Xbox controller and provides the existing bindings, stick modes, voice commands, battery, and connection information.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100