Application Compatibility
The capture and replacement paths used by chat apps, terminals, and code editors.
macOS applications expose different amounts of text through IMKTextInput.
UnimeType therefore uses a small set of explicit compatibility exceptions.
| Application | Capture rule | Replacement rule |
|---|---|---|
WeChat (com.tencent.xinWeChat) | Paragraph when readable; otherwise typing buffer | Exact selection or verified caret-delete replacement |
VS Code (com.microsoft.VSCode) | Prefer typing buffer | Exact selection or verified caret-delete replacement |
VS Code Insiders (com.microsoft.VSCodeInsiders) | Prefer typing buffer | Exact selection or verified caret-delete replacement |
Terminal (com.apple.Terminal) | Prefer typing buffer | Normal range path when exposed; otherwise caret-delete replacement |
Ghostty (com.mitchellh.ghostty) | Prefer typing buffer | Normal range path when exposed; otherwise caret-delete replacement |
| Xcode | Normal paragraph or sentence capture | Normal committed range replacement |
| Other editors | Normal paragraph or sentence capture | Normal committed range replacement |
Why caret-delete replacement exists
Some hosts report a caret but do not honor document-relative replacement ranges. When the caret is still exactly at the end of the captured text, UnimeType posts a bounded batch of Backspace events and then inserts committed replacement text. It never creates marked composition to perform this operation.
The pending replacement is tied to the same client and typing-buffer generation and has a two-second timeout. If the caret, client, or source text no longer matches, replacement is cancelled.
Verification boundary
When a host exposes the resulting range, UnimeType reads it back and compares it with the requested replacement. A mismatch reports Replacement failed. If the host accepts insertion but does not expose the resulting text, UnimeType can report that replacement was sent but cannot claim read-back verification.
See Status and Troubleshooting for recovery steps when a host cannot provide a usable range.