[BUG] Numpad keys display as raw CSI u escape sequences in iTerm2

Resolved 💬 9 comments Opened Jan 8, 2026 by ugurtepecik Closed Apr 17, 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?

Numpad keys are displayed as raw CSI u (Kitty keyboard protocol) escape sequences instead of being interpreted.

Examples observed:

  • [57404u (KP_5)
  • [57410u (KP_DIVIDE)
  • [57412u (KP_SUBTRACT)

The escape sequence format [{codepoint}u is from the Kitty keyboard protocol. Claude Code is not parsing these sequences.

What Should Happen?

Numpad keys should be parsed correctly and input their corresponding characters:

  • Number keys (KP_0 through KP_9) should input digits 0-9
  • Operator keys (KP_DIVIDE, KP_MULTIPLY, KP_SUBTRACT, KP_ADD) should input /, *, -, +
  • KP_DECIMAL should input . or ,

Error Messages/Logs

Steps to Reproduce

  1. Open Claude Code in iTerm2 on macOS
  2. Click on the input field
  3. Press any numpad key (number or operator)
  4. Observe that raw escape sequence like [57404u appears instead of the expected character

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.1

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

  • Main keyboard number row works correctly
  • Related issues with similar escape sequence handling: #5757, #5196, #10375

View original on GitHub ↗

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