Skip to content

Comments

feat(cli): add support for numpad SS3 sequences#19659

Merged
scidomino merged 1 commit intomainfrom
tomm_numpad
Feb 20, 2026
Merged

feat(cli): add support for numpad SS3 sequences#19659
scidomino merged 1 commit intomainfrom
tomm_numpad

Conversation

@scidomino
Copy link
Collaborator

@scidomino scidomino commented Feb 20, 2026

Summary

Adds support for numpad keys in Application Keypad Mode (SS3 sequences).

Details

Maps ESC O <char> sequences to their respective numeric and operator characters to ensure numpad input is correctly handled.

Related Issues

Fixes #12288

How to Validate

On ghostty add keybind = f1=text:\x1bOj to your settings, restart, and then hit f1

Pre-Merge Checklist

  • Added/updated tests (if needed)
  • MacOS
    • npm run

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @scidomino, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the command-line interface's input handling by introducing robust support for numpad keys when the terminal is in Application Keypad Mode. This ensures that users' numpad inputs are accurately translated into their intended characters, significantly improving the interactive experience and functionality for CLI applications that rely on numeric input.

Highlights

  • Numpad SS3 Sequence Support: Implemented support for numpad keys in Application Keypad Mode by mapping ESC O sequences to their corresponding numeric and operator characters.
  • Enhanced Keypress Handling: Modified the keypress context to correctly interpret and process numpad inputs, ensuring better usability for CLI applications.
  • New Test Coverage: Added comprehensive unit tests to validate the correct recognition and handling of various numpad SS3 sequences.
Changelog
  • packages/cli/src/ui/contexts/KeypressContext.test.tsx
    • Added a new test suite specifically for numpad support.
    • Included parameterized tests to verify correct recognition of various numpad SS3 sequences (e.g., \x1bOj for *, \x1bOp for 0).
  • packages/cli/src/ui/contexts/KeypressContext.tsx
    • Introduced a NUMPAD_MAP constant to store mappings from SS3 sequence suffixes to their corresponding numpad characters.
    • Modified the emitKeys generator function to check for and process numpad SS3 sequences, assigning the correct name, sequence, and insertable properties.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-cli gemini-cli bot added priority/p1 Important and should be addressed in the near term. area/core Issues related to User Interface, OS Support, Core Functionality labels Feb 20, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request introduces support for numpad keys in Application Keypad Mode (SS3 sequences). However, the current implementation has a high-severity logic issue that violates consistency with existing UI behavior: it unconditionally marks numpad keys as insertable and overwrites their raw escape sequences, even when modifier keys like Ctrl or Alt are pressed. This inconsistency will likely break keyboard shortcuts or lead to unexpected character insertion when using modified numpad keys.

@github-actions
Copy link

github-actions bot commented Feb 20, 2026

Size Change: +444 B (0%)

Total Size: 25.2 MB

ℹ️ View Unchanged
Filename Size Change
./bundle/gemini.js 25.1 MB +444 B (0%)
./bundle/sandbox-macos-permissive-open.sb 890 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB 0 B
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB 0 B
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB 0 B
./bundle/sandbox-macos-strict-open.sb 4.82 kB 0 B
./bundle/sandbox-macos-strict-proxied.sb 5.02 kB 0 B

compressed-size-action

@scidomino scidomino marked this pull request as ready for review February 20, 2026 17:52
@scidomino scidomino requested a review from a team as a code owner February 20, 2026 17:52
@scidomino scidomino marked this pull request as draft February 20, 2026 17:52
@scidomino scidomino marked this pull request as ready for review February 20, 2026 17:55
@scidomino scidomino mentioned this pull request Feb 20, 2026
18 tasks
@scidomino scidomino enabled auto-merge February 20, 2026 18:00
@scidomino scidomino added this pull request to the merge queue Feb 20, 2026
Merged via the queue into main with commit d547021 Feb 20, 2026
27 checks passed
@scidomino scidomino deleted the tomm_numpad branch February 20, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core Issues related to User Interface, OS Support, Core Functionality priority/p1 Important and should be addressed in the near term.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug Report: Gemini CLI Freezes on Numpad Input in Alacritty

2 participants