feat(desktop): screen text capture (OCR) overlay with selectable text
A rebindable screen-ocr action (default Ctrl+Alt+O) freezes the monitor under the cursor and covers it with a focusable overlay. Text is selected by flow drag, rectangle drag, double/triple click, Shift+click or Ctrl+A, then copied, saved as PNG or searchable PDF, translated, summarized, read aloud, opened as a link or searched. - Selection, text assembly and the PDF document are pure functions in @d3ro/core/screen-ocr, shared by the main process and the overlay. - Recognition uses Windows.Media.Ocr through powershell.exe -EncodedCommand with 2x upscaling; the capture reaches disk only as a temp PNG that is removed right after recognition. - Capture uses GDI BitBlt for the target monitor (39 ms) because desktopCapturer captured all three monitors and took 2.9 s when DXGI duplication timed out. - The accelerator is reserved only where the feature is available, so macOS does not swallow the key for a feature it cannot run (fails closed with a message). Map: CAP-17 [~], GAP-OCR-01 (live hotkey journey not yet driven in the running app), GAP-OCR-02 (macOS engine, mixed-language accuracy).
This commit is contained in:
parent
6791e29f27
commit
03cd8bf890
41 changed files with 4561 additions and 17 deletions
|
|
@ -2500,5 +2500,46 @@
|
|||
"web.push.unconfigured": "服务器尚未配置通知功能。",
|
||||
"web.push.blocked": "通知已被阻止。请在浏览器的网站设置中允许通知。",
|
||||
"web.push.revoked": "此浏览器已从账户中移除。再次添加前,请清除此网站存储的数据。",
|
||||
"web.push.error": "无法更改通知设置。请检查浏览器权限后重试。"
|
||||
"web.push.error": "无法更改通知设置。请检查浏览器权限后重试。",
|
||||
"keybinding.action.screenOcr": "屏幕文字识别 (OCR)",
|
||||
"keybinding.action.screenOcr.desc": "截取屏幕,并拖动选择其中的文字。",
|
||||
"screenOcr.dialog.savePdf": "另存为 PDF",
|
||||
"screenOcr.dialog.saveImage": "另存为图片",
|
||||
"screenOcr.errorCapture": "无法截取屏幕。",
|
||||
"screenOcr.modeText": "选择文字",
|
||||
"screenOcr.modeRect": "选择区域",
|
||||
"screenOcr.copy": "复制",
|
||||
"screenOcr.copyLine": "复制为一行",
|
||||
"screenOcr.copyImage": "复制图片",
|
||||
"screenOcr.saveImage": "保存图片",
|
||||
"screenOcr.savePdf": "保存 PDF",
|
||||
"screenOcr.translate": "翻译",
|
||||
"screenOcr.summarize": "摘要",
|
||||
"screenOcr.speak": "朗读",
|
||||
"screenOcr.stopSpeak": "停止朗读",
|
||||
"screenOcr.openLink": "打开链接",
|
||||
"screenOcr.search": "网页搜索",
|
||||
"screenOcr.selectAll": "全选",
|
||||
"screenOcr.close": "关闭",
|
||||
"screenOcr.language": "识别语言",
|
||||
"screenOcr.languageAuto": "自动",
|
||||
"screenOcr.statusRecognizing": "正在识别文字…",
|
||||
"screenOcr.statusReady": "{{count}} 个词 · 拖动选择",
|
||||
"screenOcr.statusEmpty": "未找到文字",
|
||||
"screenOcr.statusSelected": "已选择 {{count}} 个字符",
|
||||
"screenOcr.hint": "拖动选择 · 双击选词 · Ctrl+A 全选 · Ctrl+C 复制 · Esc 关闭",
|
||||
"screenOcr.toastCopied": "已复制",
|
||||
"screenOcr.toastImageCopied": "已复制图片",
|
||||
"screenOcr.toastSaved": "已保存",
|
||||
"screenOcr.working": "处理中…",
|
||||
"screenOcr.resultTranslate": "翻译结果",
|
||||
"screenOcr.resultSummary": "摘要结果",
|
||||
"screenOcr.errorRecognition": "无法识别文字",
|
||||
"screenOcr.errorUnavailable": "此电脑无法使用屏幕文字识别。请在 Windows 设置中安装带光学字符识别的语言包。",
|
||||
"screenOcr.errorExport": "无法保存或复制",
|
||||
"screenOcr.errorLlm": "未收到 AI 响应。请检查模型设置。",
|
||||
"screenOcr.errorTts": "无法朗读",
|
||||
"screenOcr.errorLink": "无法打开链接",
|
||||
"screenOcr.errorInvalid": "此截图已关闭。请重新截取。",
|
||||
"screenOcr.errorEmpty": "未选择文字"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue