Caps Lock key leaks raw Kitty protocol escape sequence [57358u as text input

Resolved 💬 3 comments Opened Mar 25, 2026 by adrianoals Closed Mar 29, 2026

Bug Description

When pressing the Caps Lock key while inside Claude Code (running in VS Code integrated terminal on macOS), the raw Kitty keyboard protocol escape sequence [57358u is printed as visible text in the input area.

This does not happen in the regular terminal outside of Claude Code — only within the Claude Code session.

Steps to Reproduce

  1. Open Claude Code in VS Code integrated terminal (macOS)
  2. Press Caps Lock key
  3. Observe [57358u appearing as text input

Expected Behavior

Caps Lock key press should be silently ignored — no visible text should appear.

Actual Behavior

The string [57358u is inserted as text. 57358 is the Kitty keyboard protocol keycode for Caps Lock, meaning Claude Code activates the Kitty protocol but does not handle/consume the Caps Lock key event.

Environment

  • OS: macOS (Darwin 25.3.0, Apple Silicon)
  • Terminal: VS Code integrated terminal (v1.112.0)
  • Keyboard layout: Brazilian - Pro (ABNT2)
  • Shell: zsh
  • Key remapper apps: None (no Karabiner, Hammerspoon, etc.)
  • hidutil mappings: None

Additional Context

  • Verified no custom keybindings or terminal settings cause this
  • Tested outside Claude Code in the same terminal — Caps Lock works normally
  • The issue persists regardless of VS Code terminal settings like sendKeybindingsToShell or enableKittyKeyboard

View original on GitHub ↗

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