You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Numpad keys not working in TUI prompt and dialogs #20461
Numpad keys (0-9, Enter, operators, navigation) are not recognized in the TUI. This affects:
Numpad Enter (kpenter) does not submit the prompt, confirm dialogs, or select options — only the main keyboard return key works.
Numpad digits (0-9) are not inserted into the prompt input when using terminals that use the kitty keyboard protocol.
Numpad navigation (Home, End, arrow keys via numpad) does not move the cursor in the input field.
Root Cause
The TUI keybinding system only recognizes return as the Enter key and does not account for numpad-specific key names from the kitty keyboard protocol (kpenter, kpequal, kp0-kp9, etc.) or legacy SS3 escape sequences.
Changes
keybind.ts: Add isEnterKey() helper that accepts return, kpenter, and kpequal. Add detectNumpadKeyName() in Keybind.fromParsedKey() to detect numpad keys from kitty protocol names, legacy SS3 sequences, and modifyOtherKeys CSI-u codes.
config.ts: Add numpad key equivalents to all input keybinding defaults (kpenter/kpequal for submit, kp0-kp9 for digits, kp4/kp6/kp8/kp2 for arrows, kp7/kp9/kphome/kpend for Home/End, etc.).
prompt/index.tsx: Add handlers for kp0-kp9 and numpad operators (/, *, -, +, ., =) to insert the corresponding characters.
Dialogs: Replace all evt.name === "return" checks with isEnterKey(evt) across dialog-alert, dialog-confirm, dialog-export-options, dialog-help, dialog-prompt, dialog-select, permission.tsx, question.tsx, and autocomplete.tsx.
Affected Components
TUI prompt input
All dialogs (alert, confirm, prompt, select, help, export-options)
Permission prompts
Question prompts
Autocomplete
Environment
Windows terminals using kitty keyboard protocol and terminals that send legacy SS3 sequences for numpad keys.
Reacted by Ilyes Khobizi, Norbert Sass, cd2d and Diego Navia
No issue template was used. Please use one of the three required templates: Bug Report, Feature Request, or Question.
The issue reads like a PR/implementation proposal (describing specific code changes, helper functions, and file edits) rather than a bug report. Please focus on describing the problem, steps to reproduce, and your environment — not the proposed fix.
The level of detail and structure suggests AI-generated content, which is not acceptable per our guidelines.
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
Activity
github-actions commentedon Apr 1, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
For keybind-related issues, please also check our pinned keybinds documentation: #4997
If you believe this was flagged incorrectly, please let a maintainer know.
github-actions commentedon Apr 1, 2026
This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.
Feel free to open a new issue that follows our issue templates.