fix: macOS text injection breaks on newlines in transcription #4741
ccantynzcommented Jun 13, 2026
Originally written by @vercel[bot] on GitHub.
The latest updates on your projects. Learn more about Vercel for GitHub.
| Project | Deployment | Actions | Updated (UTC) |
|---|---|---|---|
| voxlen | Preview, Comment | Jun 13, 2026 8:00am |
Cross-repo impact
See what breaks downstream if this PR merges.
⮌ Merged
This pull request was merged into main.
c comment · e edit title · m merge · a approve · r request changes · ? shortcuts
Originally written by @ccantynz-alt on GitHub.
Imported from https://github.com/ccantynz-alt/voxlen/pull/60
Summary
src-tauri/src/text_injection/mod.rs):simulate_keyboardembedded text in an AppleScriptkeystroke "..."string without handling newlines. A newline in transcription text (e.g. from a voice command "new line") would produce invalid AppleScript and silently fail to inject. Fixed by splitting on\nand sendingkey code 36(Return) between segments.Test plan
\n\n) — two Returns sent, no crashGenerated by Claude Code