feat(linux): evdev input for side combos and mouse dictation (split from #724)#728
feat(linux): evdev input for side combos and mouse dictation (split from #724)#728HKLHaoBin wants to merge 17 commits into
Conversation
Split from Open-Less#724: Win/macOS side-aware bindings (cmd-left+D, Left Command, etc.) with ShortcutRecorder.sideSpecificModifiers, overlap detection, and QA rejection. Linux side combos deferred to follow-up PR3 (evdev). Fixes Open-Less#718 (partial: desktop side modifiers). Co-authored-by: Cursor <cursoragent@cursor.com>
Split from Open-Less#724: Win/macOS global mouse hooks, prefs toggles, HoldSourceTracker for multi-source hold release. Linux evdev path deferred to PR3. Fixes Open-Less#718 (partial: mouse triggers). Co-authored-by: Cursor <cursoragent@cursor.com>
PR Reviewer Guide 🔍(Review updated until commit 578f6d1)Here are some key observations to aid the review process:
|
Co-authored-by: Cursor <cursoragent@cursor.com>
|
稍等,我处理一下ci问题。 |
|
Linux evdev 这层本身写得不错(见下),但这个 PR 现在还不能合,需要先 rebase 瘦身 🙏 现状问题:diff 累计回到了整个 #724本 PR 的分支叠在 正确路径
对 Linux evdev 增量的审查(rebase 后即可落地)
先留开着,按上面顺序 rebase 后再推进。 |
- Fix hold-mode tests to pass TriggerSource::KeyboardDictation - Hide mouse toggles on Linux until PR3 evdev - Remove PR1 side-modifier type/i18n/mock remnants - Complete mouse pref wire/deserialize/default in types.rs Co-authored-by: Cursor <cursoragent@cursor.com>
|
Persistent review updated to latest commit 0bac973 |
…ents Co-authored-by: Cursor <cursoragent@cursor.com>
…d source On update_config disable or Drop, swap held flags and send Released events so HoldSourceTracker does not retain stale mouse sources after prefs refresh. Co-authored-by: Cursor <cursoragent@cursor.com>
…base Co-authored-by: Cursor <cursoragent@cursor.com>
0bac973 to
23a4f69
Compare
…inux Co-authored-by: Cursor <cursoragent@cursor.com>
|
@Felix201209 已按 review 处理 rebase 瘦身 🙏 分支结构
相对 合并顺序(与 review 一致):#726 → #727 → 本 PR。待前两 PR 进 beta 后,对 beta 的 diff 会自然瘦到 evdev-only。 本次未做(review 标注不阻断):epoll/EventStream 空闲 CPU、udev 提示常量统一。 请 re-review。 |
|
Persistent review updated to latest commit 23a4f69 |
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Persistent review updated to latest commit 6ea63bb |
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Persistent review updated to latest commit ebc9fe7 |
|
Persistent review updated to latest commit 5cf792d |
|
Persistent review updated to latest commit a997cd1 |
|
Persistent review updated to latest commit a5871ee |
|
Persistent review updated to latest commit d22ded2 |
|
Persistent review updated to latest commit 578f6d1 |
User description
摘要
Completes #718(Linux 路径)。
由已关闭的 #724 拆分而来(第 3/3 部分):
linux_evdev_input+evdev依赖;Linux 侧向组合与鼠标输入;prefs 变更时refresh_linux_evdev_monitor;monitor 停止时清除status_message。堆叠 PR:含 #726 + #727 全部变更,用于 Linux 端到端验收。建议 #726/#727 合并后 rebase,或作为完整验收 PR 审查。
关联:#718、#724。
修复 / 新增 / 改进
兼容
测试计划
Linux 实机验证(请维护者复测,回应 @jiangmuran):
cmd-left+D/shift-left+D→ evdev monitor 启动、听写触发/dev/input/event*读权限时出现 input 组提示;monitor 停止后清除本地已验证:
npm run build、npm run check:hotkey-side-modifiersPR Type
Enhancement, Tests
Description
Add side-aware combo detection for left/right modifiers on Win/macOS/Linux
Add independent mouse middle/side button dictation triggers with HoldSourceTracker
Implement Linux evdev input layer for side combos and mouse events
Integrate all into coordinator with hot-reload of evdev monitor on prefs change
Diagram Walkthrough
flowchart LR Input("Keyboard / Mouse Input") Platform("Low-level hook (Win/macOS) or evdev (Linux)") SideCombo("side_aware_combo (state machine)") MouseDict("mouse_dictation (global hook/evdev)") Hold("hold_source_tracker (refcount)") Dict("Coordinator -> Start/Stop dictation") Input --> Platform Platform --> SideCombo Platform --> MouseDict SideCombo --> Hold MouseDict --> Hold Hold --> DictFile Walkthrough
13 files
Side-specific modifier combos state machineLinux evdev input for side combos and mouseGlobal mouse middle/side button dictation monitorRefcount multiple dictation hold sourcesIntegrate side-aware, mouse, evdev into loopsAdd new monitors and hold tracker to coordinatorSide modifier validation, normalization, overlapmacOS/Windows hooks for side-aware and mouseReject side-specific for non-dictation shortcutsPersist mouse dictation pref changesAdd new HotkeyTrigger variants and mouse prefsMulti-source pressed/released edge handlingRegister new modules and start mouse listener4 files
Mobile stub for side-aware comboMobile stub for mouse dictationMobile stub for Linux evdev inputMobile stub for new functions2 files
Frontend tests for side modifier recordingInclude side_aware_combo test module18 files