Skip to content

Numpad Enter key does not send messages in TUI #17457

Closed as not planned
Closed as not planned

Description

@NaderIkladious

Description

Pressing the numpad Enter key in the OpenCode TUI does not submit messages or confirm dialogs. Only the main keyboard Enter key works.

Why this happens

Terminals using the Kitty keyboard protocol report numpad Enter as kpenter (codepoint 57414), which is a different key name from return (the main Enter key). The TUI currently only checks for evt.name === "return" in all keyboard handlers and textarea keybindings, so kpenter is never matched.

Expected behavior

Both the main Enter key and the numpad Enter key should submit messages, confirm dialogs, and select options identically.

Suggested fix

Add kpenter alongside return in all keyboard event checks and textarea keybindings throughout the TUI.

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Mar 14, 2026
  2. github-actions commented on Mar 14, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Please review these issues and consider closing this one if the problem is already being tracked.

  3. tl-sjmcdowall commented on Apr 19, 2026

    @tl-sjmcdowall

    So my use case is similar -- but -- neither the main return (on my Mac Laptop) or the "Enter" on my external keyboard work. I do not think either of them should be considered a kpenter .. but maybe? Otherwise I can't explain why neither return/enter work for me. It didn't help either that ctrl-J got mapped to a shift-enter now. Sigh.

    P.S. Just tried 1.14.18 and the issue has gone away. Enter and return now work correctly for me.

  4. konovalov-nk commented on Apr 20, 2026

    @konovalov-nk

    Workaround for sending messages.

    Add ~/.config/opencode/tui.json

    {
      "$schema": "https://opencode.ai/tui.json",
      "keybinds": {
        "input_submit": "return,enter,kpenter"
      }
    }

    It doesn't run commands (Ctrl + P) though.

  5. removed
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on May 3, 2026
  6. added a commit that references this issue on May 20, 2026
    69712f6
  7. github-actions commented on Jul 7, 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