Skip to content

Numpad keys not working when running inside VS Code 1.110 integrated terminal #16100

@ErcinDedeoglu

Description

@ErcinDedeoglu

Description

Numpad keys (0-9, Enter, decimal, operators) are completely ignored by OpenCode's TUI when running inside VS Code 1.110.0's integrated terminal. The numpad works correctly in the terminal shell before launching OpenCode, and works correctly when running OpenCode in an external terminal.

Environment

  • OpenCode version: 1.2.17 (also tested with 1.2.15, same issue)
  • VS Code Version: 1.110.0 (Electron 39.6.0, Chromium 142.0.7444.265)
  • OS: Windows (connecting via Remote SSH to Ubuntu ARM64)
  • Terminal: VS Code integrated terminal

Steps to Reproduce

  1. Open VS Code 1.110.0 integrated terminal
  2. Verify numpad works in the shell (it does)
  3. Launch opencode
  4. Try typing numbers using the numpad
  5. Observe: numpad keystrokes are completely ignored

Expected Behavior

Numpad keys should produce the same input as the main keyboard number row.

Actual Behavior

  • Numpad keys are silently dropped inside OpenCode's TUI
  • Main keyboard number row works correctly
  • Numpad works in the terminal before launching OpenCode
  • Numpad works when running OpenCode in an external terminal (outside VS Code)
  • Issue occurs on both OpenCode 1.2.15 and 1.2.17

Analysis

VS Code 1.110.0 updated to Electron 39 / Chromium 142, which has a known regression where numpad keys report key: "Unidentified" in key events (Chromium issues 405793116, 429730008).

The normal terminal shell compensates via keyCode fallback, but when OpenCode's opentui activates enhanced keyboard mode (Kitty keyboard protocol / CSI u), xterm.js passes the broken key identity through. OpenCode's TUI receives unidentifiable key events for numpad keys and drops them.

This was not an issue prior to VS Code 1.110.0.

Related Issues

Metadata

Metadata

Assignees

Labels

opentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions