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
What happened?
Environment
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
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