[BUG] Numeric keypad disabled (application keypad mode) when Claude Code starts

Resolved 💬 2 comments Opened Jan 9, 2026 by smitopher-keeper Closed Jan 9, 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?

## Description
When Claude Code starts, the numeric keypad stops sending numbers and appears to be disabled. This affects physical keyboards with a dedicated 10-key numpad.

## Environment

  • macOS
  • External keyboard with numeric keypad (Unicomp buckling spring)
  • Terminal: ITerm2

## Expected behavior
Numeric keypad should continue to function normally, sending number characters.

## Actual behavior
After launching Claude Code, numpad keys no longer produce numbers. The keypad appears to be switched into application keypad mode (sending escape sequences instead of digits).

## Possible cause
Claude Code may be enabling terminal application keypad mode (tput smkx / \e[?1h) for input handling and not restoring it properly on exit or during operation.

What Should Happen?

  1. Claude Code should preserve the terminal's existing keypad mode on startup
  2. If application keypad mode is required for functionality, it should be scoped to specific input contexts and restored afterward
  3. The numeric keypad should remain functional for entering numbers throughout the session
  4. On exit (normal or abnormal), terminal state should be fully restored including keypad mode

Error Messages/Logs

❯ [57403u[57404u[57405u[57414u

Steps to Reproduce

## Steps to Reproduce

  1. Connect external keyboard with numeric keypad
  2. Open terminal (iTerm2 / Terminal.app)
  3. Verify numpad works - type numbers using 10-key
  4. Launch Claude Code: claude
  5. Attempt to type numbers using numpad
  6. Observe: numpad no longer produces numbers
  7. Exit Claude Code with /exit
  8. Numpad may or may not be restored depending on exit type

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.2 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

<img width="355" height="112" alt="Image" src="https://github.com/user-attachments/assets/2ce5f217-df25-4b2d-aa5a-efafa36bf2b3" />

View original on GitHub ↗

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