Skip to content

[BUG] Caps Lock key inserts raw escape sequence "[57358u" in chat input (VS Code 1.112.0 / macOS) #304679

Closed

Description

@thomasjoos-dev

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version:
  • OS Version:

Steps to Reproduce:

  1. Install VS Code 1.112.0 on macOS Sequoia (arm64)
  2. Open the Claude Code extension panel in VS Code
  3. Click into the chat input field
  4. Press the Caps Lock key
  5. Observe that [57358u is inserted as literal text into the input field

Expected:
Caps Lock toggles capitalization. Nothing is inserted into the chat input field.

Actual:
The raw Kitty keyboard protocol escape sequence [57358u (the escape code for
Caps Lock) is inserted as literal text into the chat input field.

settings:

  • OS: macOS Sequoia (arm64)
  • VS Code version: 1.112.0
  • Claude Code versie: 2.1.83

Activity

  1. AltayAkkus commented on Mar 25, 2026

    @AltayAkkus

    Same error on my end!

  2. wookkl commented on Mar 25, 2026

    @wookkl

    Same!

  3. xixihhhh commented on Mar 25, 2026

    @xixihhhh

    Same!

  4. wmzspace commented on Mar 25, 2026

    @wmzspace

    +1

  5. HLGRL commented on Mar 25, 2026

    @HLGRL

    +1

  6. jovid18 commented on Mar 25, 2026

    @jovid18

    +1

  7. Danielevko commented on Mar 25, 2026

    @Danielevko

    +1

  8. AltayAkkus commented on Mar 25, 2026

    @AltayAkkus

    Fix

    1. Open the VS Code User Settings JSON
      Command palette (CMD + Shift + P) -> Preferences: Open User Settings (JSON)
    2. Disable the Kitty Keyboard protocol
    "terminal.integrated.enableKittyKeyboardProtocol": false
    
    1. Restart VS Code
    CC

    thomasjoos-dev wookkl (@wookkl) Xihaha (@xixihhhh) Mianzi Wu (@wmzspace) HLGRL Jovid (@jovid18) Daniel Levkovitz (@Danielevko)

  9. HLGRL commented on Mar 25, 2026

    @HLGRL

    Fix

    1. Open the VS Code User Settings JSON
      Command palette (CMD + Shift + P) -> Preferences: Open User Settings (JSON)
    2. Disable the Kitty Keyboard protocol
    "terminal.integrated.enableKittyKeyboardProtocol": false
    
    1. Restart VS Code

    CC

    Thanks it works!

  10. SonettoGu14 commented on Mar 25, 2026

    @SonettoGu14

    Fix  修复

    1. Open the VS Code User Settings JSON打开 VS Code 用户设置 JSON
      Command palette (CMD + Shift + P) -> Preferences: Open User Settings (JSON)命令调色板(CMD + Shift + P) -> Preferences: Open User Settings (JSON)
    2. Disable the Kitty Keyboard protocol禁用 Kitty 键盘协议
    "terminal.integrated.enableKittyKeyboardProtocol": false
    
    1. Restart VS Code  重启 VS Code(重启 VS Code)

    CC

    Works for me! Thanks a lot!

  11. AgainPsychoX commented on Mar 26, 2026

    @AgainPsychoX
  12. added
    bug
    on Mar 27, 2026
  13. anthonykim1 commented on Mar 30, 2026

    @anthonykim1
    Contributor

    I'm able to repro.
    Will try to figure out a fix.

  14. added
    terminal-input
    important
    confirmed
    on Mar 30, 2026
  15. anthonykim1 commented on Mar 31, 2026

    @anthonykim1
    Contributor

    Actually, looking at mentioned issues in anthropics/claude-code#38624 and anthropics/claude-code#38766 (comment) got me wondering if the problem is coming from claude or vscode via xterm.js.

    Most issues from: https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20kitty%20keyboard&page=1 seem to mention vscode.

    • Seems like there were problems not just in VS Code but also in Ghostty, windows terminal powershell, etc?
    • Maybe both? I do see some gap in xterm.js we can address though: Include caps lock, scroll lock, num lock as modifier key xtermjs/xterm.js#5787
    • Not sure if Claude is using REPORT_ALL_KEYS or DISAMBIGUATE only btw. Maybe they just started swallowing unrecognized CSI sequences like \x1b[57358u sent via xterm.js

    Which version of claude code are ppl using? And does updating claude code version fix the issue?
    I was able to repro on 2.1.84 in vscode with kitty enabled, but not with 2.1.88 also with kitty keyboard enabled.
    Image

    Image
  16. added
    unreleased
    insiders-released
    and removed
    unreleased
    on Apr 2, 2026
  17. added
    verified
    on Apr 6, 2026
  18. locked and limited conversation to collaborators on May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugconfirmedimportantinsiders-releasedterminal-inputverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions