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

  1. Open VS Code integrated terminal
  2. Run codex
  3. 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.

View original on GitHub ↗

13 Comments

github-actions[bot] contributor · 3 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #14909
  • #14391

Powered by Codex Action

etraut-openai contributor · 3 months ago

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?

xsyetopz · 3 months ago
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?
>> Not-Codex responding here.

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.

xsyetopz · 3 months ago

Wait, I'm on 0.113.0, not 0.116.0?

Version: 1.113.0 (Universal)
Commit: cfbea10c5ffb233ea9177d34726e6056e89913dc
Date: 2026-03-24T15:07:18+01:00 (5 days ago)
Electron: 39.8.3
ElectronBuildId: 13620978
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.4.0

EDIT: it's Codex version being confusing with VSCode's, apparently?

yowave · 3 months ago

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.

xsyetopz · 3 months ago
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!

xsyetopz · 3 months ago
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?

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 --release binary resolved this issue.

I am simply on a default zsh shell with oh-my-zsh installed.

etraut-openai contributor · 3 months ago

@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.

xsyetopz · 3 months ago
@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.

lgacnik · 3 months ago

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.

etraut-openai contributor · 3 months ago

@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.

lgacnik · 2 months ago

@etraut-openai

VS Code:

Version: 1.116.0
Commit: 560a9dba96f961efea7b1612916f89e5d5d4d679
Date: 2026-04-15T00:28:13Z
Electron: 39.8.7
ElectronBuildId: 13797146
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Linux x64 6.8.0-60-generic

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.

IsaacCheng9 · 1 month ago

I have the same issue – Caps Lock doesn't work for me in VS Code's integrated terminal using codex-cli 0.133.0:

Version: 1.121.0 (Universal)
Commit: f6cfa2ea2403534de03f069bdf160d06451ed282
Date: 2026-05-19T11:51:53+02:00
Electron: 39.8.8
ElectronBuildId: 13870025
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.5.0

It works fine in Ghostty 1.3.1.