[BUG] Numpad slash key outputs raw CSI u escape sequence instead of / character

Status Closed — not planned
Reported on v2.0.76
Maintainer reply None cached
Activity 13 comments · opened Jan 8, 2026 · closed Feb 27, 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?

When pressing the forward slash (/) key on the numeric keypad, Claude Code displays the raw escape sequence [57410u in the input prompt instead of the expected / character.

Analysis:
The sequence [57410u is a CSI u (kitty keyboard protocol) escape sequence where 57410 is the keycode for KP_Divide (numeric keypad division/slash). It appears Claude Code's terminal input handler is not properly translating extended keyboard protocol sequences for numpad keys.

What Should Happen?

A forward slash / character should be inserted at the cursor position.

Error Messages/Logs

Steps to Reproduce

  1. Open Claude Code CLI
  2. Start typing in the prompt
  3. Press the / key on the numeric keypad (not the main keyboard)

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.0.76

Claude Code Version

2.1.1 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗

13 Comments

github-actions[bot] · 7 months ago

Found 2 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/11192
  2. https://github.com/anthropics/claude-code/issues/16730

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

jifbrodeur · 7 months ago

This is not a duplicate issue occuring on my macOS latest version latest patch with iTerm2 using zsh.

dmurat · 7 months ago

To be a bit worse, it's not only the slash character; all characters on the numpad are affected.

ddelzell · 7 months ago

I'm also having the same issue.

ulan-yisaev · 7 months ago

Same here

EduardoWAOF · 7 months ago

Same here>

Examples of codes displayed:

  • Number keys: [57403u, [57404u, [57405u
  • NumLock: [57416u
  • Numpad Enter: [57414u
oscahie · 7 months ago

Happening to me as well, but looks like only with iTerm2? Tried with the native Terminal app and the numpad keys work correctly in claude code.

jifbrodeur · 7 months ago

@dmurat In iTerm2, you can go Setting - Profile - [select your profile or default] - Keys - Key Bindings : Presets and select Simulate Num Lock. Works for me. I have a Logitech keyboard that does not have a Num Lock key, it might be the issue.

jifbrodeur · 7 months ago

@dmurat My previous configuration solved and issue and created another, editing Claude Code command in nano led to ctrl+x key to send escape sequence instead of Ctrl+x. New solution: in iTerm2: Settings - Profile - Keys, In general make sure that Report keys using CSI is checked. Both now working.

abd3lraouf · 7 months ago
@dmurat In iTerm2, you can go Setting - Profile - [select your profile or default] - Keys - Key Bindings : Presets and select Simulate Num Lock. Works for me. I have a Logitech keyboard that does not have a Num Lock key, it might be the issue.

this actually worked thakn you

github-actions[bot] · 6 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] · 6 months ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

github-actions[bot] · 5 months ago

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.