Skip to content

Numeric Keypad (NumLock) unresponsive in VS Code Integrated Terminal (Linux Fedora KDE Plasma) #22671

@mcatanzariti

Description

@mcatanzariti

What happened?

Environment

  • OS: Fedora Linux 43
  • Desktop: KDE Plasma 6.6.2
  • Terminal: VS Code 1.110.1 Integrated Terminal (xterm.js)
  • Gemini CLI Version: 0.33.1
  • Node.js Version: v22.22.0

Description

The numeric keypad (NumPad) does not work within the Gemini CLI prompt when used inside the VS Code integrated terminal. Pressing numbers on the keypad with NumLock enabled results in no input being displayed.

Observed Behavior

  • The keypad works perfectly in the standard Bash shell and in the Node.js REPL (node) within VS Code.
  • The keypad works perfectly in standalone terminals like KDE Konsole even when running Gemini CLI.
  • Only the VS Code integrated terminal + Gemini CLI combination fails.

Technical Root Cause Analysis

It appears Gemini CLI (or its underlying TUI library) triggers the "Application Keypad Mode" (DECKPAM). In this mode, the VS Code terminal sends escape sequences (e.g., \eOq for 1) instead of raw digits. Gemini CLI seems to lack the mapping to translate these sequences back into numeric characters.

Workaround

Forcing the terminal to send raw sequences via VS Code's keybindings.json fixes the issue:

{
    "key": "numpad1",
    "command": "workbench.action.terminal.sendSequence",
    "args": { "text": "1" },
    "when": "terminalFocus"
}

Suggested Fix

Update the input handling logic to support Application Keypad Mode escape sequences or ensure the terminal remains in Numeric Keypad Mode if those sequences aren't handled.

What did you expect to happen?

keypad should work under gemini prompt

Client information

About Gemini CLI

CLI Version: 0.33.1
Git Commit: f59f9e9
Model : Auto (Gemini 3)
Sandbox: no sandbox
OS: linux
Auth Method: Logged in with Google (***@gmail.com)
Tier: Gemini Code Assist for individuals
IDE Client : VS Code

Login information

Google Account

Anything else we need to know?

No response

Metadata

Metadata

Assignees

Labels

area/coreIssues related to User Interface, OS Support, Core Functionalityhelp wantedWe will accept PRs from all issues marked as "help wanted". Thanks for your support!status/possible-duplicate

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions