[BUG] Numpad keys and Option+Return broken - CSI u escape sequences sent instead of characters

Resolved 💬 3 comments Opened Jan 10, 2026 by lopperman Closed Jan 14, 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?

Inside Claude Code sessions, numpad keys output CSI u escape sequences (e.g., pressing numpad 1 outputs [57400u) instead of the actual numbers. Additionally, Option+Return no longer inserts a newline — it sends ^[ (Escape) instead.

What Should Happen?

Numpad keys should output their corresponding numbers (0-9, ., +, -, *, /). Option+Return should insert a newline character to allow multi-line input.

Error Messages/Logs

Running cat -v inside Claude Code and pressing numpad 1 outputs: [57400u
  Running cat -v in a normal iTerm2 session and pressing numpad 1 outputs: 1

Steps to Reproduce

  1. Open iTerm2
  2. Start a Claude Code session (claude)
  3. Press any numpad key — observe escape sequence instead of number
  4. Press Option+Return — observe no newline inserted

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.3

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗

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