You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Numpad Enter key does not send messages in TUI #17457
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.
Reacted by Jeremiah K, Stuart Auld, David Vadas, Yotam Ishak, Ben Wendell and Steven McDowall
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.
Activity
github-actions commentedon Mar 14, 2026
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.
tl-sjmcdowall commentedon Apr 19, 2026
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.
konovalov-nk commentedon Apr 20, 2026
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.
fix: normalize numpad key names to standard equivalents
github-actions commentedon Jul 7, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.