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 interceptsCtrl-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
text
field, pipes it topbcopy
, and sends a macOS notification with the copied text.
mkdir -p ~/.local/bin
chmod +x ~/.local/bin/codex-transcription-copy
mkdir -p ~/.config/karabiner/assets/complex_modifications
Then in Karabiner-Elements → Complex Modifications → Add rule, enable "Codex: copy transcription on Ctrl-Shift-V release".
- macOS with Karabiner-Elementsinstalled - Python 3 (ships with macOS) OpenAI Codexdesktop app with the following hold-to-dictate hotkey configured:
Karabiner logs script output to /tmp/karabiner-codex-copy.log
.