macOS global dictation does not paste with Russian keyboard layout
What version of Codex is running?
Codex desktop app: 26.422.30944 (CFBundleVersion 2080)
Bundled CLI inside the app: codex-cli 0.125.0-alpha.3
Homebrew CLI on the same machine: codex-cli 0.118.0
What subscription do you have?
ChatGPT Pro
Which model were you using?
Not model-specific. This happens in the macOS desktop app global dictation feature before any model request is sent.
What platform is your computer?
Darwin 25.4.0 arm64 arm
macOS 26.4.1 (25E253)
Selected input source when reproducing:
InputSourceKind = "Keyboard Layout"
KeyboardLayout Name = Russian
KeyboardLayout ID = 19456
What issue are you seeing?
Codex desktop app global dictation successfully records and transcribes speech, but the recognized text is not inserted into the focused text field when the current macOS keyboard layout is Russian.
The same workflow works when the system keyboard layout is switched to English.
The transcription itself is not failing. New entries are written to ~/.codex/transcription-history.jsonl, and during debugging the transcribed text briefly appears in the macOS clipboard. The failure is specifically the final paste step.
What steps can reproduce the bug?
- On macOS, enable the Russian keyboard layout and make it the current input source.
- Open Codex desktop app settings and configure global dictation hotkey.
- Open TextEdit or Notes.
- Click into an editable text field so the insertion point is active.
- Hold the Codex global dictation hotkey and say a short phrase.
- Release the hotkey.
Actual result: Codex shows the dictation UI and writes the transcript to ~/.codex/transcription-history.jsonl, but no text is pasted into TextEdit/Notes.
- Switch the macOS keyboard layout to English.
- Repeat the same dictation workflow.
Actual result with English layout: the transcribed text is pasted correctly.
Minimal AppleScript reproduction of the underlying paste issue while Russian layout is active:
-- Does not paste under Russian layout
set the clipboard to "ONLY_KEYSTROKE_V"
tell application "System Events" to keystroke "v" using command down
-- Does paste under Russian layout, because it uses the physical V key
set the clipboard to "ONLY_KEY_CODE_9"
tell application "System Events" to key code 9 using command down
What is the expected behavior?
Global dictation should paste the recognized text into the focused text field regardless of the current macOS keyboard layout.
Additional information
The packaged Codex app appears to use AppleScript equivalent to:
tell application "System Events" to keystroke "v" using command down
That is layout-dependent. With Russian input active, keystroke "v" using command down does not behave as physical Cmd+V, so paste is not delivered.
Changing the paste command to a physical key code fixes the issue locally:
tell application "System Events" to key code 9 using command down
key code 9 is the physical V key on macOS, so command down + key code 9 maps to paste independently of the active keyboard layout.
I verified the diagnosis by monitoring ~/.codex/transcription-history.jsonl and the clipboard during dictation:
- The transcript is written to history.
- The transcript briefly appears in the clipboard.
- Under Russian layout, the simulated
Cmd+Vdoes not paste. - Under English layout, the same Codex dictation flow pastes successfully.
- A local binary patch replacing
keystroke "v"withkey code 9makes the paste work under Russian layout, but it breaks the app code signature, so it is not a viable user workaround.
Suggested fix: use physical key code based paste on macOS for global dictation, or otherwise use a layout-independent paste mechanism.
7 Comments
I did one more pass to narrow this down to the packaged Desktop code.
In Codex Desktop
26.422.30944, the global dictation paste path is in the packaged Electron main bundle (app.asar,.vite/build/main-*.js). The relevant flow is:The macOS paste helper currently shells out to
osascriptand sends paste with a layout-dependent AppleScript command:key code 9is the physical V key on macOS. This makesCmd+Vwork regardless of the active keyboard layout, and I verified locally that it fixes Russian layout paste.I also cloned the public
openai/codexrepo at currentmainand could not find this Desktop source string there. The public repo appears to contain the CLI/Desktop launcher, while this paste implementation is only present in the packaged Electron app. So I cannot submit a direct PR against the public source for this specific line unless the Desktop source is published or mapped into this repo.Suggested internal source-level change: in the macOS branch of the global dictation paste helper, replace the
System Eventskeystroke "v" using command downcall withkey code 9 using command down.We are seeing the same issue on Codex Desktop
26.429.20946on macOS.Global dictation successfully records/transcribes, and the relevant macOS permissions are enabled (
Accessibility,Input Monitoring,Microphone,Screen Recording, andAutomation -> Codex -> System Events). However, with a Russian keyboard layout active, the transcript is not pasted into Discord, Notes, or TextEdit.After switching the input source to
ABC/English, the behavior is consistent with the diagnosis above: the failure appears to be the layout-dependentSystem Eventspaste step rather than transcription or permissions.So this reproduces on the latest Codex Desktop version as well.
the keystroke-based-on-character pattern is a layout trap on macOS. AppleScript's
keystroke "v"resolves to whatever key produces 'v' under the current input source, which on Russian or Dvorak isn't kVK_ANSI_V. key code 9 + cmd works because it's the physical V slot regardless of layout. cleaner fix is dropping System Events entirely: CGEventCreateKeyboardEvent with kVK_ANSI_V hits the same path without the AppleScript bridge. or skip simulated Cmd+V altogether and write to the focused element via AXUIElementSetAttributeValue on kAXSelectedTextAttribute, no clipboard race, no layout coupling.I can confirm this is still reproducible in a newer Codex Desktop build, and it also affects Zhuyin, not only Russian layouts.
Environment:
26.611.6232426.5.1com.apple.inputmethod.TCIM.Zhuyin/ZhuyinBopomofoBehavior:
I verified locally that this is still the same layout-dependent paste issue. Before patching, the packaged app still contained:
Under Zhuyin, this does not reliably send physical Cmd+V, so the paste step silently fails.
Local workaround that fixed it:
I patched
/Applications/Codex.app/Contents/Resources/app.asarand replaced the AppleScript paste command with:After fully quitting and restarting Codex, global dictation insertion into external apps started working under Zhuyin.
This confirms the issue is not microphone permissions, Accessibility permissions, or transcription. It is still the layout-dependent paste implementation.
Note: this workaround modifies the signed app bundle and will be overwritten by updates, so it is not a viable user-facing fix.
Suggested fix:
Use
key code 9 using command down, CGEvent withkVK_ANSI_V, or another layout-independent paste mechanism for macOS global dictation.I can confirm this issue as well.
In my case, Codex global dictation works correctly when the current macOS keyboard layout is English, but fails to paste the recognized text when the current layout is Russian.
What I observe:
This makes the feature unreliable for users who regularly switch between English and Russian layouts. Manually switching to English before every dictation is not a practical workaround.
The diagnosis in the original issue looks correct to me: the final paste action should be layout-independent on macOS. Using a physical key code for paste, or another layout-independent paste mechanism, would likely fix this without requiring users to change keyboard layout or install external automation tools.
Please prioritize this fix, since global dictation is otherwise very useful but currently unreliable for multilingual macOS users.
Codex version: 26.623.81905 • Released Jul 1, 2026
macOS version: 26.5.1 (25F80)
Still reproducible after another Codex Desktop update, and the local binary patch is still required.
Clarification: although the issue title mentions Russian, this is not specific to Russian text or the Russian keyboard layout. The underlying failure is the layout-dependent macOS paste simulation. Zhuyin/Bopomofo reproduces the same problem because
keystroke "v" using command downdepends on the active input source. A more accurate scope would be non-US/non-ABC keyboard layouts or input sources.Environment:
26.623.81905,CFBundleVersion4598com.apple.keylayout.ZhuyinBopomofo/Applications/Codex.appObserved:
I inspected the updated app bundle and confirmed the packaged app still contains:
After replacing it locally with the layout-independent equivalent:
the bundle contains
old_count=0andnew_count=1, and the replacement AppleScript compiles successfully withosacompile_exit=0.This is the same workaround as before, but Codex updates overwrite it and it also breaks the app code signature, so it is not a viable user workaround.
Expected fix:
Use a layout-independent paste mechanism for macOS global dictation, e.g. physical key code paste / CGEvent with
kVK_ANSI_V, or another non-layout-dependent insertion path.I’d like to clarify the scope here: this does not appear to be Russian-specific.
This is likely affecting many non-ABC / non-US macOS keyboard layouts and input sources. I can reproduce the same failure with Zhuyin/Bopomofo, and others have confirmed Russian as well. The common factor is not the spoken language or transcription result, but the final paste step being layout-dependent.
Current behavior appears to rely on:
On macOS, this is interpreted through the active keyboard layout/input source. Under non-English layouts, it may not produce the physical Cmd+V paste shortcut, so the transcription succeeds but insertion into the focused external app silently fails.
A layout-independent implementation fixes this locally:
or equivalently a CGEvent-based paste using the physical
kVK_ANSI_Vkey.I think this should probably be treated as an internationalization/accessibility bug rather than a Russian-layout edge case, because global dictation is effectively unreliable for multilingual macOS users unless they manually switch to English before every dictation.