fix(hid): add CH9329 macOS drag compatibility - #304
Open
drgnchan wants to merge 2 commits into
Open
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_drag运行兼容选项;±1,大位移限制在 CH9329i8范围;ch9329_hybrid_mouseLinux 兼容模式行为不变;若两个兼容选项同时打开,macOS 按钮边沿策略优先。根因与实机证据
真实设备环境:
WCH UART TO KB-MS_V2.0,VID/PID1A86:E12A目标 macOS 上通过
IOHIDManager捕获原始 USB Report:失败拖拽期间连续 107 个 report ID 2 均保持buttons=0x01,约 6.36 秒后用户实际松手才出现buttons=0x00。因此 One-KVM 状态机、串口命令及 CH9329 USB 输出均未提前松键。macOS 对该 CH9329 设备表现为:绝对集合可点击但持续绝对移动会破坏拖拽;相对集合可移动但按钮无效。现有 Linux 混合模式因此无法解决。采用“绝对按钮边沿 + 按住期间相对移动”后,已在真实 macOS 目标机验证窗口、文件及文本拖拽正常。
测试
cargo test --target x86_64-unknown-linux-gnu 'hid::ch9329::tests' --libcargo check --target x86_64-unknown-linux-gnu --bin one-kvmcd web && npm run build新增端到端队列级单元测试,固定以下 CH9329 命令顺序: