OpenAI Codex's dictation shortcut (Ctrl-Shift-V) transcribes your voice and writes the result to ~/.codex/transcription-history.jsonl — but doesn't copy it to the clipboard. This setup does.
This means you can use Codex to transcribe text to anywhere in your laptop, not just as prompts to Codex!
- Karabiner-Elements intercepts
Ctrl-Shift-V, passes it through to Codex as normal, then on key-up fires a background script viato_after_key_up. - The script snapshots the current line count of the transcription file, then polls every 0.5s for a new entry (up to 30s timeout).
- When a new line appears, it extracts the
textfield, pipes it topbcopy, and sends a macOS notification with the copied text.
mkdir -p ~/.local/bin
# download codex-transcription-copy from this gist to ~/.local/bin/codex-transcription-copy
chmod +x ~/.local/bin/codex-transcription-copymkdir -p ~/.config/karabiner/assets/complex_modifications
# download codex_transcription_copy.json from this gist to that directoryThen in Karabiner-Elements → Complex Modifications → Add rule, enable "Codex: copy transcription on Ctrl-Shift-V release".
- macOS with Karabiner-Elements installed
- Python 3 (ships with macOS)
- OpenAI Codex desktop app with the following hold-to-dictate hotkey configured:

Karabiner logs script output to /tmp/karabiner-codex-copy.log.