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
[FEATURE]: Option to swap return & shift-return #35608
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Hopefully a simple idea: Allow swapping the behavior of 'return' and 'shift + return' (or even command+return on macos) in the text entry. I regret hitting 'return' on a partial prompt far more than I would hitting 'shift + return' to submit a prompt. I very frequently add newlines, so hitting shift+return is cumbersome and error prone when composing longer prompts.
You can do this in OpenCode v2 by remapping two keybinds in tui.json (~/.config/opencode/tui.json): input.submit (default return) and input.newline (default shift+return,ctrl+return,alt+return,ctrl+j).
To make Return insert a new line and Shift+Return send:
On macOS you can use super+return for submit instead. Some terminals don't send a distinct Shift+Return; see https://opencode.ai/docs/keybinds/ for terminal-specific setup.
Keybinds became remappable by command ID in #41882.
Activity
github-actions commentedon Jul 6, 2026
For keybind-related issues, please also check our pinned keybinds documentation: #4997
arialdomartini commentedon Aug 29, 2026
@jpedrick I solved with this:
~/.config/opencode/tui.jsonFor other options, https://opencode.ai/docs/keybinds/ might be of help.
neriousy commentedon Oct 1, 2026
You can do this in OpenCode v2 by remapping two keybinds in
tui.json(~/.config/opencode/tui.json):input.submit(defaultreturn) andinput.newline(defaultshift+return,ctrl+return,alt+return,ctrl+j).To make Return insert a new line and Shift+Return send:
{ "$schema": "https://opencode.ai/tui.json", "keybinds": { "input.submit": "shift+return", "input.newline": "return,ctrl+j" } }On macOS you can use
super+returnfor submit instead. Some terminals don't send a distinct Shift+Return; see https://opencode.ai/docs/keybinds/ for terminal-specific setup.Keybinds became remappable by command ID in #41882.
Closing as completed.