Skip to content

[FEATURE]: Option to swap return & shift-return #35608

Closed

Description

@jpedrick

Feature hasn't been suggested before.

  • 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.

Activity

  1. github-actions commented on Jul 6, 2026

    @github-actions
    Contributor

    For keybind-related issues, please also check our pinned keybinds documentation: #4997

  2. arialdomartini commented on Aug 29, 2026

    @arialdomartini

    @jpedrick I solved with this:

    ~/.config/opencode/tui.json

    {
      "$schema": "https://opencode.ai/tui.json",
      "keybinds": {
        "input_submit": "ctrl+return",
        "input_newline": "return,ctrl+j"
      }
    }
    

    For other options, https://opencode.ai/docs/keybinds/ might be of help.

  3. neriousy commented on Oct 1, 2026

    @neriousy
    Member

    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:

    {
      "$schema": "https://opencode.ai/tui.json",
      "keybinds": {
        "input.submit": "shift+return",
        "input.newline": "return,ctrl+j"
      }
    }

    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.

    Closing as completed.

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