Skip to content

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

Closed as not planned

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

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Mar 5, 2026
  2. Magneticdud commented on Mar 5, 2026

    @Magneticdud

    This problem of the numpad not working also happens with Alactritty on (Fedora) Linux. With GNOME terminal or with kitty, the numpad works

  3. GeneratedRandomly commented on Mar 9, 2026

    @GeneratedRandomly

    same under opencode 1.2.23, vscode 1.111.0, WSL2-ubuntu 22.04

  4. mkdgs commented on Mar 10, 2026

    @mkdgs

    Same here on debian trixie, opencode 1.2.24 and vscode 1.111.0 . That appear after apt update, so seems to be a vscode related change.

  5. ACCSCI commented on Mar 12, 2026

    @ACCSCI

    Same here on Ubuntu 24.04.4 LTS, vscode 1.111.0,opencode extension 0.0.13,opencode 1.2.24

  6. aborruso commented on Mar 14, 2026

    @aborruso

    same under opencode 1.2.26, vscode 1.111.0, WSL2 (Pengwin 12/bookworm). numpad is disabled for me too.

  7. mcpbay commented on Mar 20, 2026

    @mcpbay

    Same under OpenCode 1.2.27, VSCode 1.112.0, WSL.

  8. dgsosa commented on Mar 23, 2026

    @dgsosa

    Same under OpenCode 1.3.0, VSCode 1.112.0 on Windows 11.
    under integrated terminal, and under extension (v 0.0.13 )

  9. CODLOP commented on Mar 25, 2026

    @CODLOP

    Same under OpenCode 1.3.2, VSCode 1.112.0 on Windows 11.
    under integrated terminal, and under extension (v 0.0.13 )

  10. RiAnBee commented on Mar 30, 2026

    @RiAnBee

    I can confirm this issue still exists on OpenCode 1.3.6.

    Environment:

    • Host OS: Windows 11 desktop
    • VS Code Remote - WSL: Ubuntu 24.04.4 LTS
    • VS Code Remote - SSH: Ubuntu 22.04 server
    • OpenCode: 1.3.6

    I can reproduce the same problem in both setups:

    • a local WSL Ubuntu session in VS Code
    • an SSH remote session in VS Code

    In both cases, the numeric keypad on the right side of the keyboard is still unusable inside OpenCode. Upgrading to 1.3.6 did not resolve it.

    So this does not seem limited to a single Ubuntu installation or only to WSL. It also reproduces when connected to a remote Ubuntu 22.04 server over SSH from VS Code.

    If needed, I can also provide the exact VS Code version and test additional workarounds.

  11. lekoala commented on Apr 1, 2026

    @lekoala

    same issue, running in vscode integrated terminal

  12. xinychan commented on Apr 3, 2026

    @xinychan

    Same under OpenCode 1.3.13, OpenCode extension 0.0.13,VSCode 1.114.0 on Windows 10.

  13. paul-vd commented on Apr 5, 2026

    @paul-vd

    Same issue here using OpenCode 1.3.15.

    Numpad works fine in normal terminal as well as ghostly

  14. jmskov commented on Apr 6, 2026

    @jmskov

    Same issue on MacOS, OpenCode 1.3.17 with iTerm 2 3.6.9 (standalone and integrated terminal). However, using built-in Terminal.app the NumPad works in OpenCode.

  15. 14 remaining items

  16. Noitidart commented on May 22, 2026

    @Noitidart

    @kommander can I please get a review - I rebased and tested it again to catch it up to current - #27665 (comment)

  17. kommander commented on May 22, 2026

    @kommander
    Contributor

    @Noitidart this would not work when using it remote/via ssh, so I would make the useKittyKeyboard option reactive optionally to use renderer.capabilities. But as the way you did it alleviates some pain I'll merge it like that shortly.

  18. kommander commented on May 22, 2026

    @kommander
    Contributor

    I just saw this: microsoft/vscode#286897 - it enables kitty keyboard support in the vscode integrated terminal. Turning it off for all vscode versions generally would prevent proper behaviour for versions that support kitty keyboard.

  19. Noitidart commented on May 23, 2026

    @Noitidart

    Oh got it, thank you @kommander for the review! So if kitty is coming to vscode then this isn't needed for sure.

  20. Noitidart commented on May 23, 2026

    @Noitidart

    @kommander I noticed microsoft/vscode#286897 is from Jan 10 2026 - but its now May 23 2026 - maybe they didn't land kitty as we are thinking?

  21. kommander commented on May 26, 2026

    @kommander
    Contributor

    Maybe it still needs to be activated explicitly with terminal.integrated.enableKittyKeyboardProtocol=true

  22. Noitidart commented on May 27, 2026

    @Noitidart

    @kommander so i just checked and this is true for me screenshot. so this means vscode supports kitty and then we shouldnt do this PR? instead the fix is elsewhere?

  23. tristan957 commented on Jul 15, 2026

    @tristan957

    For what its worth. numpad Enter doesn't work for me on Ghostty.

  24. github-actions commented on Sep 14, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions