VS Code terminal: CapsLock/Shift and key repeat broken in Codex prompt textbox
Open 💬 13 comments Opened Mar 29, 2026 by xsyetopz
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
Version
- Codex CLI (official): codex-cli 0.117.0 (
codex --version) - From-source verification build: codex-cli 0.0.0 (commit 7bcfa0ac3)
Platform
- macOS:
uname -mprs=> Darwin 25.4.0 arm64 arm - VS Code: 1.113.0 (commit cfbea10c5ffb233ea9177d34726e6056e89913dc)
- Terminal: VS Code integrated terminal (xterm.js)
- Also reported: Windows + WSL2 + VS Code terminal (Codex CLI ~0.114.0)
Issue
Inside Codex’s prompt textbox:
- Key repeat does not work when holding keys (letters/backspace/delete)
- Shift and CapsLock do not produce uppercase letters (letters stay lowercase)
Outside Codex, keyboard behavior is normal.
Steps to reproduce
- Open VS Code integrated terminal
- Run
codex - In the prompt textbox, try holding
a/ Backspace, and try Shift/CapsLock
Expected
Normal text entry behavior: Shift/CapsLock uppercase, and key repeat works when holding keys.
Fix
Ready on branch xsyetopz:fix-vscode-terminal-capslock (commit 7bcfa0ac3):
- Skip enabling crossterm keyboard enhancement flags when
TERM_PROGRAM=vscode - In the prompt textbox, recover ASCII letter case from Shift/CapsLock state when terminals report base letters with modifier/state flags.
13 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I'm not able to repro the problem as reported.
Can you think of any other relevant details? Are you using a a specific keyboard layout?
Do you suspect that this is a regression? Did it work in previous versions? Does the problem go away if you downgrade to 0.116.0? Since you're building from source, are you able to bisect to find the commit where the behavior changed?
So, this is my 1st time using Codex CLI, and on my VSCode version, this seems to be a persistent problem, which I discovered live on my first use.
I have not used any previous versions, nor have I downgraded my VSCode to see if the VSCode has anything to do with it. I could try, and see if that makes a difference, by downloading an older archived binary for VSCode, to see if the issue at isolation has anything to do with it.
So, I'll report back real quick with this isolation.
Wait, I'm on 0.113.0, not 0.116.0?
EDIT: it's Codex version being confusing with VSCode's, apparently?
Hey, I had the same issue - caps lock, shift, and key repeat all broken in VS Code terminal with Codex.
The fix is simple: use tmux as your default terminal in VS Code instead of the regular bash.
Install tmux if you don't have it (on mac: brew install tmux, on linux: sudo apt install tmux)
Add this to your VS Code settings.json:
On Mac: "terminal.integrated.defaultProfile.osx": "tmux"
On Linux/WSL: "terminal.integrated.defaultProfile.linux": "tmux"
Optional but recommended - create a file called ~/.tmux.conf and add:
set -g mouse on
This gives you mouse scrolling since tmux doesn't have a scrollbar.
Close your terminal and open a new one.
The problem is that VS Code added some new keyboard protocol (kitty protocol) in recent versions, and Codex doesn't handle it properly.
Works for Claude Code CLI too btw.
This is more of a workaround, and not quite a long-term solution for users that just want to use the default shell that comes with their system.
While it is a temporary solution, or permanent for those who use tmux, having to tell users to make workarounds just to make ends meet, might not be very ideal in this case. Good information for anyone that wants to go down this specific path, though!
I forgot to reply, but:
1) I manually replaced the homebrew caskette with 0.116.0 binary, and there was no difference. My first install was a homebrew 0.117.0 caskette. Locally replacing the homebrew binary with my 0.0.0 fork
--releasebinary resolved this issue.I am simply on a default zsh shell with
oh-my-zshinstalled.@xsyetopz, to confirm, you're able to repro this with the latest CLI (0.117.0)? You mentioned earlier that you were still on 0.113.0.
No, I was confused by what you meant by 0.116.0, so I thought you meant VSCode, and then I checked and that Codex CLI uses same versioning as VSCode, and had to double-check which one was which!
Sorry for the misunderstanding! That was clumsy of me. I was on 0.117.0 Codex CLI and the latest 0.113.0 VSCode.
EDIT: And yes, I was reproducing this with the latest Homebrew caskette.
I'm still seeing this issue in 0.120.0, 0.121.0, and 0.122.0. Running codex CLI on VSCode terminal. Any way to resolve this annoying issue?
Note: this is in codex only, raw terminal and other processes running from same terminal as codex do not share same issue.
@lgacnik, can you provide more details? Which version of VS Code are you running? Which platform? Which problem are you seeing in particular?
I'm using the latest VS Code (0.116.0) on macOS with the latest Codex CLI (0.122.0). I'm not able to repro a problem with key repeat or shift — those seem to work fine. Perhaps VS Code fixed that problem since 0.113.0, when this bug was originally reported.
I do see a problem with CapsLock when running codex in VS Code's terminal. The problem does not occur with the latest version of Cursor, which is a fork of VS Code. The problem also doesn't happen in iTerm2, Kitty, or Terminal.app. It appears to be a bug in VS Code. I suspect it's a relatively recent regression.
@etraut-openai
VS Code:
I also tested with Linux terminal and the Caps Lock doesn't cause any issues meaning this is VS Code-only issue. Still, tried with other tools like Codex, namely with Claude Code (CLI) and doesn't happen to share this issue. So, apparently something between Codex and VS Code.
I started using Codex recently so I wouldn't be able to tell the state of this before/after 0.113.0 of VS Code.
I have the same issue – Caps Lock doesn't work for me in VS Code's integrated terminal using
codex-cli 0.133.0:It works fine in Ghostty
1.3.1.