语音输入快捷键支持按住任意已配置按键说话(如 F2)
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 395
- Avg merge
- 21h 48m
- Merged PRs (30d)
- 776
Description
**提交人**: sign
**客户端版本**: 0.1.45
---
## 使用场景
我习惯把语音输入设为一个不常用的单键,例如 F2:按住 F2 时说话,松开后结束录音并提交识别。这个操作适合在 Cindy 未聚焦、正在其他应用中输入时使用。
## 当前痛点
语音输入设置目前允许配置组合键和 F1–F24 单键,也允许“按住”部分修饰键(Command、Option、Control、Fn)。但把快捷键设为 F2 后,Windows 和 macOS 都不能用“按住说话、松开结束”的方式触发。
当前只能改用点击式/切换式触发,或改用页面列出的少数可按住修饰键;这与常见的 Push-to-Talk 操作习惯不一致,也让“F1–F24 单键”这一配置的使用体验不完整。
## 诉求
- 已配置的普通快捷键,至少 F1–F24 单键,支持按住说话。
- 按下快捷键后开始语音输入,松开同一快捷键后结束并提交。
- Windows 与 macOS 行为一致。
- Cindy 不在前台时仍可使用,并继续拦截已注册的快捷键,避免 F2 等按键同时作用于当前应用。
## 建议方案
建议沿用现有修饰键的交互:
- 短按可保留当前的开始/停止切换行为,避免改变已有用户习惯;
- 长按进入 Push-to-Talk,松开立即结束并提交;
- 如果监听期间发生焦点切换、系统休眠或丢失松键事件,应有兜底结束机制,避免录音状态卡住。
建议先覆盖设置页已经明确允许的 F1–F24 单键;如果底层方案适合,再扩展到所有可注册的键盘快捷键。
---
**版本区域**: CN
**OS**: win32 x64 (10.0.26200)
**界面语言**: zh-CN
Contributor guide
Research direction
The issue names no files, tests, or entry points. Start by tracing desktop shortcut registration and voice-recording start/stop handling for Windows and macOS, then inspect the existing modifier-key hold behavior. Done means configured F1–F24 keys support press-and-hold push-to-talk, preserve short-press toggling, work unfocused, and safely end on focus or key-release failures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, typescript
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100