Numpad keys output raw Kitty codepoints in Windows Terminal (WSL2) since v2.1.83
Bug Description
Since Claude Code v2.1.83, numpad keys (Enter, 0-9, /, *) and Caps Lock output raw escape sequences instead of functioning normally. Numpad Enter prints [57414u instead of submitting input. This is a regression — v2.1.81 worked correctly in the same environment.
The root cause appears to be a change in Kitty keyboard protocol detection: v2.1.83 now probes terminal capability (CSI ? u query) rather than relying solely on the TERM_PROGRAM allow-list. Windows Terminal (1.25+) responds affirmatively to this probe, causing Claude Code to activate Kitty enhanced mode — but the input decoder does not handle numpad-specific Unicode functional codepoints (U+E000 range: 57358–57441).
Environment
| Component | Value |
|-----------|-------|
| Claude Code | 2.1.83 |
| Platform | WSL2 (Linux 6.6.87.2-microsoft-standard-WSL2) |
| Terminal | Windows Terminal (stable, installed 2026-02-18) |
| Shell | bash |
| TERM | xterm-256color |
| TERM_PROGRAM | (not set) |
| KITTY_WINDOW_ID | (not set) |
Steps to Reproduce
- Install Claude Code v2.1.83 on WSL2
- Launch via Windows Terminal (any recent stable version)
- Open
claudein the terminal - Press Numpad Enter — observe
[57414uprinted instead of submission - Press Numpad 0–9, Numpad /, Numpad \* — observe raw sequences
- Press Caps Lock — observe
[57358uprinted
Expected vs Actual
| Action | Expected | Actual |
|--------|----------|--------|
| Numpad Enter | Submit input (same as main Enter) | Prints [57414u |
| Numpad / | Types / | Prints raw escape sequence |
| Numpad 0–9 | Types digit | Prints [57417u, [57419u–[57424u, etc. |
| Caps Lock | Toggle caps (no visible output) | Prints [57358u |
Main keyboard Enter and other non-numpad keys work correctly.
Regression Bisect
| Version | Date | Status |
|---------|------|--------|
| 2.1.80 | Mar 20 | ✅ Working |
| 2.1.81 | Mar 21 | ✅ Working |
| 2.1.83 | Mar 25 | ❌ Broken |
The regression window is v2.1.81 → v2.1.83.
Root Cause Hypothesis
v2.1.83 changed how Kitty keyboard protocol support is detected:
- Before (≤2.1.81): Checked
TERM_PROGRAMagainst an allow-list (iTerm.app,kitty,WezTerm,ghostty). Windows Terminal was not on this list, so the protocol was never activated. - After (2.1.83): Appears to use a direct capability probe (CSI ? u query). Windows Terminal 1.25+ responds to this probe, so Claude Code now activates Kitty enhanced keyboard mode.
The problem: Claude Code's input decoder does not map the numpad-specific functional codepoints defined in the Kitty protocol spec. These are Unicode codepoints in the 57344–57441 range (private use area) that represent numpad keys, modifier keys, and media keys. When received, they pass through unhandled and are printed as raw text.
Affected codepoint range (from Kitty spec):
| Key | Codepoint |
|-----|-----------|
| Caps Lock | 57358 |
| Numpad / | 57410 |
| Numpad Enter | 57414 |
| Numpad 0 | 57417 |
| Numpad 1–9 | 57418–57426 |
Reference: https://sw.kovidgoyal.net/kitty/keyboard-protocol/#functional-key-definitions
Attempted Workarounds (all failed)
- Set
TERM_PROGRAMto"windows-terminal"in~/.claude/settings.jsonenv block — no effect, confirming detection no longer uses env var check - CSI reset (
printf '\e[<u') in~/.bashrc— no effect - Full terminal restart after both changes — no effect
Suggested Fix
Either:
- Map numpad codepoints: Add handling for Kitty functional codepoints 57408–57441 (numpad block) and 57358 (Caps Lock) in the input decoder, mapping them to their standard equivalents
- Exclude Windows Terminal: Add Windows Terminal to a deny-list for Kitty protocol activation
- Provide an opt-out: Add a setting (e.g.,
CLAUDE_NO_KITTY_PROTOCOL=1) to disable the capability probe
Option 1 is the most correct long-term fix.
Related Issues
- #17386 — Numpad Enter
[57414uoutput - #16801 — Numpad / raw sequence output
- #17400 — Numpad Enter + Shift+Space decoding
- #38624 — Caps Lock
[57358uleak - #11192 — Shift+Enter CSI u sequence insertion
6 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Correction & Differentiation from Duplicates
Not a v2.1.83 Regression
After further testing, this issue reproduces on v2.1.81 as well. It is NOT a regression introduced in v2.1.83 — it is an existing bug in numpad codepoint handling that was previously unnoticed.
Different from Listed Duplicates
The 3 issues flagged as duplicates (#38672, #38624, #38581) are all VSCode integrated terminal issues where Kitty protocol state leaks across terminal instances. This issue is fundamentally different:
Verified Root Cause
cat -voutside Claude Code: numpad outputs normal digits (979413) ✅cat -vinside Claude Code (via!): numpad outputs[57423u[57421u...❌Conclusion
This is a missing codepoint mapping bug in Claude Code's Kitty keyboard protocol input decoder, not a terminal state leak issue. Please do not auto-close as duplicate.
I'm experiencing the same problem.
Issue still persists on v2.1.84
This was closed as COMPLETED, but the numpad issue is not fixed on v2.1.84.
Environment
compatibility.disableKittyKeyboardProtocol: trueset in Windows Terminal settings.jsonWhat I tried (all failed)
"compatibility.disableKittyKeyboardProtocol": truein the Ubuntu profile — Claude Code ignores this and activates Kitty protocol itselfTERM_PROGRAM=windows-terminalenv var (also set in~/.claude/settings.jsonunderenv) — no effectprintf '\e[<u'in.bashrc— Claude Code re-enables the protocol on startupReproduction
claude[57417u~[57426u[57414uNote
printf '\e[?u') returns nothing outside Claude Code, confirming the terminal-level disable works — but Claude Code overrides itPlease reopen this issue.
Update: Downgrading to v2.1.81 does NOT fix the issue — the same raw CSI u sequences appear for numpad keys.
This means the root cause is not the v2.1.83 protocol detection change, but rather Claude Code's input decoder has never handled numpad-specific Kitty codepoints (57344–57441 range). This aligns with #16843 which has been open since January.
The regression in v2.1.83 likely just expanded the number of affected terminals (by switching to capability probing), but the decoder gap existed before that.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.