[BUG] Caps Lock key outputs raw escape sequence [57358u in Claude CLI (VS Code WSL terminal)

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

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Bug Report: Caps Lock key outputs raw escape sequence [57358u in Claude CLI

Summary

Pressing Caps Lock while inside the Claude CLI prints the raw Kitty keyboard protocol escape sequence [57358u to the terminal instead of being silently handled or ignored.

Environment

  • OS: Windows 11 with WSL2 (Ubuntu)
  • Terminal: VS Code integrated terminal in WSL Remote mode
  • Claude CLI version: v2.1.83
  • Shell: Bash
  • VS Code version: 1.112.0 (system setup)
  • VS Code commit: 07ff9d6178ede9a1bd12ad3399074d726ebe6e43
  • VS Code date: 2026-03-17
  • Electron: 39.8.0
  • OS: Windows 10 x64 (build 26200)

Steps to Reproduce

  1. Open VS Code with the WSL Remote extension
  2. Open the integrated terminal (WSL session)
  3. Launch Claude: claude
  4. While inside the Claude CLI session, press the Caps Lock key

Expected Behavior

Caps Lock should toggle silently with no visible output, as it does in all other terminal applications.

Actual Behavior

The raw Kitty keyboard protocol escape sequence is printed to the terminal:

[57358u

Additional Context

  • The issue only occurs inside the Claude CLI — Caps Lock works normally in all other terminal apps in the same environment
  • After exiting Claude, the Kitty keyboard protocol is not properly reset by the CLI, causing Caps Lock to continue outputting [57358u in the shell prompt until a manual reset command is run
  • Workaround: adding alias claude='claude; reset' to ~/.bashrc fixes the post-exit issue, but does not fix the behavior during an active Claude session
  • Claude CLI appears to enable the Kitty keyboard protocol for richer input handling, but does not suppress or handle the Caps Lock key sequence (U+57358), causing it to leak as visible text
  • The VS Code WSL terminal layer may exacerbate this compared to a native Linux terminal

Related

What Should Happen?

Expected Behavior

Caps Lock should toggle silently with no visible output, as it does in all other terminal applications.

Error Messages/Logs

Steps to Reproduce

Steps to Reproduce

  1. Open VS Code with the WSL Remote extension
  2. Open the integrated terminal (WSL session)
  3. Launch Claude: claude
  4. While inside the Claude CLI session, press the Caps Lock key

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

v2.1.83

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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