Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ Text workflow:
2. Press `Option+Space`.
3. Fuzzy-search for a prompt mode (for example, `ts` can match `To Chinese Summary`), use `Up` / `Down` to highlight it, then press `Tab` or `Enter` to commit the mode.
4. Type or paste rough text.
5. Press `Enter` to transform it.
6. Press `Enter` again to insert the result.
5. Press `Enter` to transform it. The result appears as it is generated; press `Escape` to stop.
6. Press `Enter` again to insert the result, or press `Shift+Command+C` (or click the copy button on the result) to copy it instead.

Dictation workflow:

Expand All @@ -74,7 +74,7 @@ The Dictation shortcut is source-local and hold-only. You can change its modifie
- To Simple and Correct English
- To Chinese Summary
- Voice Cleanup
- Inserts generated text back into the previously focused app.
- Streams the result into the popover as it is generated, then inserts it back into the previously focused app or copies it with the result's copy button.
- Uses one application-agnostic, Accessibility-first selection path. Automatic Selection Actions first ask macOS Accessibility for the selection, then use the configured temporary clipboard fallback only when Force Selection permits it. Each read stays bound to the captured source process and cancels if that process exits or loses focus.
- Keeps simulated `Command+C` off by default. Menu Copy remains the safe Force Selection fallback; you can explicitly enable simulated copy as an advanced fallback for apps without a usable Copy menu, but it may interfere with games, remote desktops, or virtual machines.
- Serializes temporary clipboard reads and restores the prior snapshot only while the same read still owns the observed copy result; newer clipboard contents win. The double-copy trigger is passive: it consumes the copy the user already made without issuing another synthetic copy or restoring older clipboard data. Right-click remains native and never starts a selection read.
Expand Down Expand Up @@ -141,8 +141,9 @@ Check all UI languages with `scripts/check-localization.sh`. Add `--snapshots` t
- `Tab`, `Return`, or keypad `Enter` in the mode launcher: commit the highlighted prompt mode and focus the source editor. Return remains available to confirm text or an IME candidate during active composition; Return with Command, Shift, Option, or Control does not commit a mode.
- `Enter` in the editor: transform the source text, insert a result generated by the current mode, or regenerate a stale result from a previous mode with the newly committed mode.
- `Command+Enter`: insert the original text without calling the model.
- `Shift+Command+C`: copy the visible result without closing the popover.
- `Command+Up` / `Command+Down`: cycle through visible prompt modes.
- `Escape`: move back one level per press, from the result to the source editor, then to the mode launcher, then close the popover. While transforming, it cancels generation and stays in the editor.
- `Escape`: move back one level per press, from the result to the source editor, then to the mode launcher, then close the popover. While transforming, it stops generation, discards the partial result, and stays in the editor.
- `Command+,`: open Settings while Inklet is active.

Search is case- and diacritic-insensitive and supports ordered-character matching. Exact and prefix matches receive the strongest boosts; consecutive, word-start, earlier, and tighter matches generally rank higher.
Expand Down
9 changes: 5 additions & 4 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ Inklet 仅通过 GitHub Releases 检查更新。正式版大约每 24 小时从
2. 按 `Option+Space`。
3. 用模糊搜索查找 Prompt 模式(例如 `ts` 可以匹配 `To Chinese Summary`),用 `↑` / `↓` 高亮,然后按 `Tab` 或 `Enter` 确认。
4. 输入或粘贴一段草稿。
5. 按 `Enter` 让 Inklet 处理文本。
6. 再按一次 `Enter` 插入结果。
5. 按 `Enter` 让 Inklet 处理文本。结果会边生成边显示;按 `Escape` 可停止。
6. 再按一次 `Enter` 插入结果,或按 `Shift+Command+C`(也可点击结果上的复制按钮)改为复制。

听写流程:

Expand All @@ -74,7 +74,7 @@ Inklet 仅通过 GitHub Releases 检查更新。正式版大约每 24 小时从
- To Simple and Correct English
- To Chinese Summary
- Voice Cleanup
- 把生成结果插回之前聚焦的应用。
- 结果边生成边显示在浮窗中,完成后可插回之前聚焦的应用,或用结果上的复制按钮复制。
- 使用与应用无关、Accessibility 优先的通用选区流程。自动选区动作先通过 macOS Accessibility 读取;只有强制取词设置允许时,才进入按设置启用的临时剪贴板备用读取。每次读取都绑定到捕获的来源进程;来源退出或失去前台焦点时会取消。
- 默认关闭模拟 `Command+C`。菜单复制仍是安全的强制取词备用方式;对于没有可用复制菜单的 App,可以显式开启模拟复制这一高级备用选项,但它可能干扰游戏、远程桌面或虚拟机。
- 临时剪贴板读取会串行执行。只有同一次读取仍持有已观察到的复制结果时,Inklet 才恢复之前的快照;较新的剪贴板内容优先。双击复制触发是被动流程:它只读取用户已经完成的复制,不会再发一次合成复制,也不会恢复更旧的剪贴板数据。右键点击保留原生行为,不会开始选区读取。
Expand Down Expand Up @@ -141,8 +141,9 @@ swift test
- 模式启动器中的 `Tab`、`Return` 或小键盘 `Enter`:确认高亮的 Prompt 模式并聚焦源文本编辑器。输入法正在组合文字时,Return 仍用于确认文字或候选项;配合 Command、Shift、Option 或 Control 的 Return 不会确认模式。
- 编辑器中的 `Enter`:处理源文本;插入由当前模式生成的结果;如果可见结果由之前的模式生成,则用刚确认的新模式重新生成。
- `Command+Enter`:不调用模型,直接插入原文。
- `Shift+Command+C`:复制当前结果,浮窗保持打开。
- `Command+Up` / `Command+Down`:切换可见 prompt modes。
- `Escape`:每按一次只返回一层,依次从结果回到源文本编辑器、模式启动器,再关闭 popover。处理文本期间按下会取消生成并停留在编辑器。
- `Escape`:每按一次只返回一层,依次从结果回到源文本编辑器、模式启动器,再关闭 popover。处理文本期间按下会停止生成、丢弃未完成的结果,并停留在编辑器。
- `Command+,`:Inklet 激活时打开 Settings。

搜索不区分大小写和变音符号,并支持按顺序匹配字符。完全匹配和前缀匹配获得最高加权;连续、词首、更靠前及间隔更紧密的匹配通常排名更高。
Expand Down
50 changes: 40 additions & 10 deletions Sources/InkletApp/InkletLocalization.swift
Original file line number Diff line number Diff line change
Expand Up @@ -419,13 +419,16 @@ enum L10n {
"popover.action.regenerate": "Regenerate",
"popover.action.insert": "Insert",
"popover.action.insertOriginal": "Insert Original",
"popover.action.copyResult": "Copy result",
"popover.action.copyResultHelp": "Copy result (⌘⇧C)",
"popover.hint.stop": "Stop",
"popover.hint.transformInsert": "Transform/Insert",
"popover.hint.original": "Original",
"popover.hint.newLine": "New Line",
"popover.hint.mode": "Mode",
"popover.hint.back": "Back",
"popover.hint.close": "Close",
"popover.hint.accessibility": "Shortcuts: Enter transforms or inserts, Command Enter inserts original text, Escape goes back or closes",
"popover.hint.accessibility": "Shortcuts: Enter transforms or inserts, Command Enter inserts original text, Command Shift C copies the result, Escape goes back or closes",
"popover.busy.inserting": "Inserting...",
"popover.busy.transforming": "Transforming...",
"popover.error.emptyOriginal": "Enter text to insert.",
Expand Down Expand Up @@ -734,13 +737,16 @@ enum L10n {
"popover.action.regenerate": "重新生成",
"popover.action.insert": "插入",
"popover.action.insertOriginal": "插入原文",
"popover.action.copyResult": "复制结果",
"popover.action.copyResultHelp": "复制结果 (⌘⇧C)",
"popover.hint.stop": "停止",
"popover.hint.transformInsert": "转换/插入",
"popover.hint.original": "原文",
"popover.hint.newLine": "换行",
"popover.hint.mode": "模式",
"popover.hint.back": "返回",
"popover.hint.close": "关闭",
"popover.hint.accessibility": "快捷键:Enter 转换或插入,Command Enter 插入原文,Escape 返回或关闭",
"popover.hint.accessibility": "快捷键:Enter 转换或插入,Command Enter 插入原文,Command Shift C 复制结果,Escape 返回或关闭",
"popover.busy.inserting": "正在插入...",
"popover.busy.transforming": "正在转换...",
"popover.error.emptyOriginal": "请输入要插入的文本。",
Expand Down Expand Up @@ -967,9 +973,12 @@ enum L10n {
"popover.action.regenerate": "重新產生",
"popover.action.insert": "插入",
"popover.action.insertOriginal": "插入原文",
"popover.action.copyResult": "複製結果",
"popover.action.copyResultHelp": "複製結果 (⌘⇧C)",
"popover.hint.stop": "停止",
"popover.hint.transformInsert": "轉換/插入",
"popover.hint.original": "原文",
"popover.hint.accessibility": "快捷鍵:Enter 轉換或插入,Command Enter 插入原文,Escape 返回或關閉",
"popover.hint.accessibility": "快捷鍵:Enter 轉換或插入,Command Enter 插入原文,Command Shift C 複製結果,Escape 返回或關閉",
"popover.busy.inserting": "正在插入...",
"popover.busy.transforming": "正在轉換...",
"popover.error.emptyOriginal": "請輸入要插入的文字。",
Expand Down Expand Up @@ -1282,9 +1291,12 @@ enum L10n {
"popover.action.regenerate": "再生成",
"popover.action.insert": "挿入",
"popover.action.insertOriginal": "原文を挿入",
"popover.action.copyResult": "結果をコピー",
"popover.action.copyResultHelp": "結果をコピー (⌘⇧C)",
"popover.hint.stop": "停止",
"popover.hint.transformInsert": "変換/挿入",
"popover.hint.original": "原文",
"popover.hint.accessibility": "ショートカット: Enter で変換または挿入、Command Enter で原文を挿入、Escape で戻るまたは閉じる",
"popover.hint.accessibility": "ショートカット: Enter で変換または挿入、Command Enter で原文を挿入、Command Shift C で結果をコピー、Escape で戻るまたは閉じる",
"popover.busy.inserting": "挿入中...",
"popover.busy.transforming": "変換中...",
"popover.error.emptyOriginal": "挿入するテキストを入力してください。",
Expand Down Expand Up @@ -1597,9 +1609,12 @@ enum L10n {
"popover.action.regenerate": "다시 생성",
"popover.action.insert": "삽입",
"popover.action.insertOriginal": "원문 삽입",
"popover.action.copyResult": "결과 복사",
"popover.action.copyResultHelp": "결과 복사 (⌘⇧C)",
"popover.hint.stop": "중지",
"popover.hint.transformInsert": "변환/삽입",
"popover.hint.original": "원문",
"popover.hint.accessibility": "단축키: Enter 변환 또는 삽입, Command Enter 원문 삽입, Escape 뒤로 또는 닫기",
"popover.hint.accessibility": "단축키: Enter 변환 또는 삽입, Command Enter 원문 삽입, Command Shift C 결과 복사, Escape 뒤로 또는 닫기",
"popover.busy.inserting": "삽입 중...",
"popover.busy.transforming": "변환 중...",
"popover.error.emptyOriginal": "삽입할 텍스트를 입력하세요.",
Expand Down Expand Up @@ -1912,9 +1927,12 @@ enum L10n {
"popover.action.regenerate": "Regenerar",
"popover.action.insert": "Insertar",
"popover.action.insertOriginal": "Insertar original",
"popover.action.copyResult": "Copiar resultado",
"popover.action.copyResultHelp": "Copiar resultado (⌘⇧C)",
"popover.hint.stop": "Detener",
"popover.hint.transformInsert": "Transformar/Insertar",
"popover.hint.original": "Original",
"popover.hint.accessibility": "Atajos: Enter transforma o inserta, Command Enter inserta el original, Escape vuelve o cierra",
"popover.hint.accessibility": "Atajos: Enter transforma o inserta, Command Enter inserta el original, Command Shift C copia el resultado, Escape vuelve o cierra",
"popover.busy.inserting": "Insertando...",
"popover.busy.transforming": "Transformando...",
"popover.error.emptyOriginal": "Escribe texto para insertar.",
Expand Down Expand Up @@ -2227,9 +2245,12 @@ enum L10n {
"popover.action.regenerate": "Régénérer",
"popover.action.insert": "Insérer",
"popover.action.insertOriginal": "Insérer l’original",
"popover.action.copyResult": "Copier le résultat",
"popover.action.copyResultHelp": "Copier le résultat (⌘⇧C)",
"popover.hint.stop": "Arrêter",
"popover.hint.transformInsert": "Transformer/Insérer",
"popover.hint.original": "Original",
"popover.hint.accessibility": "Raccourcis : Enter transforme ou insère, Command Enter insère l’original, Escape revient ou ferme",
"popover.hint.accessibility": "Raccourcis : Enter transforme ou insère, Command Enter insère l’original, Command Shift C copie le résultat, Escape revient ou ferme",
"popover.busy.inserting": "Insertion...",
"popover.busy.transforming": "Transformation...",
"popover.error.emptyOriginal": "Saisissez le texte à insérer.",
Expand Down Expand Up @@ -2542,9 +2563,12 @@ enum L10n {
"popover.action.regenerate": "Neu generieren",
"popover.action.insert": "Einfügen",
"popover.action.insertOriginal": "Original einfügen",
"popover.action.copyResult": "Ergebnis kopieren",
"popover.action.copyResultHelp": "Ergebnis kopieren (⌘⇧C)",
"popover.hint.stop": "Stoppen",
"popover.hint.transformInsert": "Umwandeln/Einfügen",
"popover.hint.original": "Original",
"popover.hint.accessibility": "Kürzel: Enter wandelt um oder fügt ein, Command Enter fügt Original ein, Escape zurück oder schließen",
"popover.hint.accessibility": "Kürzel: Enter wandelt um oder fügt ein, Command Enter fügt Original ein, Command Shift C kopiert das Ergebnis, Escape zurück oder schließen",
"popover.busy.inserting": "Einfügen...",
"popover.busy.transforming": "Umwandeln...",
"popover.error.emptyOriginal": "Text zum Einfügen eingeben.",
Expand Down Expand Up @@ -2857,9 +2881,12 @@ enum L10n {
"popover.action.regenerate": "Gerar novamente",
"popover.action.insert": "Inserir",
"popover.action.insertOriginal": "Inserir original",
"popover.action.copyResult": "Copiar resultado",
"popover.action.copyResultHelp": "Copiar resultado (⌘⇧C)",
"popover.hint.stop": "Parar",
"popover.hint.transformInsert": "Transformar/Inserir",
"popover.hint.original": "Original",
"popover.hint.accessibility": "Atalhos: Enter transforma ou insere, Command Enter insere o original, Escape volta ou fecha",
"popover.hint.accessibility": "Atalhos: Enter transforma ou insere, Command Enter insere o original, Command Shift C copia o resultado, Escape volta ou fecha",
"popover.busy.inserting": "Inserindo...",
"popover.busy.transforming": "Transformando...",
"popover.error.emptyOriginal": "Digite texto para inserir.",
Expand Down Expand Up @@ -3172,9 +3199,12 @@ enum L10n {
"popover.action.regenerate": "Rigenera",
"popover.action.insert": "Inserisci",
"popover.action.insertOriginal": "Inserisci originale",
"popover.action.copyResult": "Copia risultato",
"popover.action.copyResultHelp": "Copia risultato (⌘⇧C)",
"popover.hint.stop": "Interrompi",
"popover.hint.transformInsert": "Trasforma/Inserisci",
"popover.hint.original": "Originale",
"popover.hint.accessibility": "Scorciatoie: Enter trasforma o inserisce, Command Enter inserisce l’originale, Escape torna indietro o chiude",
"popover.hint.accessibility": "Scorciatoie: Enter trasforma o inserisce, Command Enter inserisce l’originale, Command Shift C copia il risultato, Escape torna indietro o chiude",
"popover.busy.inserting": "Inserimento...",
"popover.busy.transforming": "Trasformazione...",
"popover.error.emptyOriginal": "Inserisci testo da inserire.",
Expand Down
Loading
Loading