Caps Lock key produces [57358u escape sequence in VS Code terminal

Resolved 💬 3 comments Opened Mar 26, 2026 by summerlikeseason Closed Mar 30, 2026

Description

Pressing Caps Lock while using Claude Code in VS Code's integrated terminal outputs [57358u as visible text. This happens every time Caps Lock is pressed and clutters the input/output.

Environment

  • Claude Code version: 2.1.84
  • VS Code (macOS, Apple Silicon)
  • macOS Darwin 25.3.0
  • Terminal: VS Code integrated terminal (panel mode)
  • Caps Lock is used for Korean/English input switching (한/영), so it's pressed frequently

Steps to reproduce

  1. Open Claude Code in VS Code integrated terminal (panel)
  2. Press Caps Lock
  3. [57358u appears in the terminal

What I've tried

  • Setting "terminal.integrated.gpuAcceleration": "off" — no effect
  • Setting "terminal.integrated.keyboard.protocol": "xterm" — no effect
  • Updating Claude Code to latest (2.1.84) — no effect

Expected behavior

Caps Lock should not produce any visible output in the terminal.

Root cause (likely)

Claude Code enables the Kitty keyboard protocol, which reports modifier keys like Caps Lock as CSI u sequences. 57358 is the Kitty protocol keycode for Caps Lock. The terminal is not consuming this sequence and instead printing it as raw text.

Impact

High for users who use Caps Lock frequently (e.g. for language input switching on macOS). The [57358u text appears inline and makes the conversation hard to read.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗