fix(hid): add macOS drag compatibility for OTG and CH9329 - #304
Merged
Conversation
liaokaiaizxl
reviewed
Sep 5, 2026
liaokaiaizxl
left a comment
There was a problem hiding this comment.
在Mac OS系统下的确存在这个情况,我分别换了苹果13,15,26都存在这个温问题,要请及时完成审核以便修复此问题
|
确实存在这个问题,请及时给与修复 |
liaokaiaizxl
suggested changes
Sep 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #303
CH9329 连接部分 macOS 目标机时,绝对鼠标拖拽会在短暂移动后中断。本 PR 为 OTG 和 CH9329 增加默认关闭的实验性「macOS 拖拽兼容模式」,让绝对输入下的按钮边沿使用绝对报告,拖拽移动和滚轮使用相对报告。
实现
hid.mouse_macos_drag配置、状态机和设置页开关;兼容旧 PR 字段ch9329_macos_drag的读取。本地验证
cargo test --offline --locked --target x86_64-unknown-linux-gnu --lib:490 passed,0 failed。cd web && npm run build:通过(Vue 类型检查及 Vite 构建)。rustfmt --check:通过;git diff --check:通过。实机验证边界
原 PR 作者曾报告在 CH9329 V3.0 / macOS 26.5.2 上验证旧实现可拖拽,并记录持续按住期间原始 USB 报告没有提前清空按钮位。这些是旧实现的用户反馈。
本次 OTG 扩展及位移换算修改没有 macOS 环境,未进行 macOS 实机测试。OTG 临时文件模拟端点和 CH9329 命令队列测试仅验证本地报告生成,不能证明目标 macOS 已正确解释拖拽。设置页及文档均标明实验性。
相对移动受鼠标加速、显示缩放和多屏布局影响;松手仍携带最后的客户端绝对坐标,可能存在落点偏差或光标跳位。低波特率下大位移分包可能增加延迟,需后续实机验证。
使用方法及后续验证范围见
docs/macos-drag-compatibility.md。