Files
openless/docs
baiqing effa12e5f1 fix(hotkey): Wayland 下用 CLI 触发录音,修复 #420
Wayland 协议禁止应用监听非聚焦窗口键盘事件,原 rdev 路径必然失效。
保留 X11 rdev 不动;Wayland 下走 stub HotkeyAdapter(不监听键盘),
通过 tauri-plugin-single-instance 把 `openless --toggle-dictation`
等 CLI 命令的 argv 转给主实例 coordinator,由桌面环境快捷键设置
绑定该命令实现全局触发。Settings → 录音 mount 时 invoke
is_wayland_cli_mode 拉状态,显示绑命令引导 callout
(GNOME / KDE / Hyprland / sway 四段步骤)。

新增:
- src-tauri/src/cli.rs — CLI intent 解析 + 10 个单测
- docs/issue-420-wayland-hotkey-research.md — 方案调研文档

改动:
- hotkey.rs Linux 分支:Wayland 检测命中走 WaylandCliAdapter stub
  (不再硬拒绝 wayland_unsupported)
- lib.rs:single-instance 回调路由 argv → dispatch_cli_intent
- commands.rs:新增 is_wayland_cli_mode IPC command
- coordinator.rs:dictation_phase_for_cli + cli_toggle_qa_panel
  暴露 CLI 入口,复用现有状态机
- Settings.tsx:WaylandHotkeyCallout 组件 + invoke pull 模型
- i18n × 5 locale:settings.recording.wayland.* 共 14 个键

macOS CGEventTap 和 Windows RegisterHotKey 路径零触碰。
2026-05-13 12:34:52 +08:00
..