Repository navigation
Description
Summary
The desktop app hardcodes the composer key bindings: Enter always submits and Shift+Enter always inserts a newline. There is no setting, and the desktop app does not read the keybinds block from cli.json, so desktop users cannot switch to the Enter = newline / Cmd+Enter = submit layout that the TUI already supports.
Environment
- opencode version: 2.0.28 (desktop app build,
[email protected]) - OS: Darwin 27.0.0 (darwin arm64), macOS
- Install/channel: release (downloaded app bundle,
/Applications/OpenCode.app) - Active plugins: none configured
Current Behavior
The composer input handles keydown with a fixed rule:
Enter(no modifier) → submitShift+Enter→ newlineCmd/Ctrl+Enter→ "alternate" submit, which steers or queues the prompt depending onSettings → General → Follow-up behaviorCmd/Ctrl+ArrowUp→ edit the first queued prompt
There is no UI to remap any of these. I checked every row registered by the desktop settings screen (settings.general.row.*, settings.appearance.row.*, settings.general.notifications.*, settings.general.sounds.*, settings.timeline.*); there is no keyboard or "Enter key behavior" section.
The TUI already solves this through ~/.config/opencode/cli.json:
{
"keybinds": {
"input.submit": "super+return",
"input.newline": "return"
}
}That file is terminal-only and is not read by the desktop app, so the configuration has no effect there.
Reproduction
- Open OpenCode desktop and start a session.
- Focus the composer input.
- Press
Enter. - The prompt is submitted immediately; a newline cannot be inserted with
Enter. - Open Settings and look for any keyboard / Enter-key option — none exists.
- Add the
keybindsblock above to~/.config/opencode/cli.jsonand restart the desktop app — behavior is unchanged.
Expected Behavior
Desktop users should be able to choose how Enter and Cmd/Ctrl+Enter behave in the composer, for example:
- Submit mode (current default):
Entersubmits,Shift+Enterinserts a newline. - Newline mode:
Enterinserts a newline,Cmd/Ctrl+Entersubmits.
Ideally this lives in Settings → General, or the desktop app reads the same keybinds entries that the TUI already uses (input.submit, input.newline) so a single config works across both clients.
Additional Context
- This is a feature request rather than a bug; the current behavior is self-consistent, just not configurable.
- It is consistently reproducible on every launch, not intermittent.
- Workaround: run the TUI via
opencodein a terminal, where the existingcli.jsonkeybindsconfiguration works as expected. Not a good workaround for users who prefer the desktop UI. Cmd+Enteris already spoken for by the alternate-submit (steer/queue) action, so a "newline mode" would need to decide how that action is reachable. One option is to keepCmd+Enteras alternate-submit only while a session is actively running, and as plain submit when idle.- Verified by inspecting the shipped bundle (
/Applications/OpenCode.app/Contents/Resources/app.asar), build[email protected]. No private paths, tokens, or project data are included here.
Activity
opencode-agent commentedon Oct 14, 2026
Thanks for the detailed write-up! I think this is a duplicate of #43088, which asks for the same thing for the current desktop/web app: configurable submit, newline and alternate-submit (steer/queue) shortcuts, so that
Entercan insert a newline andCmd/Ctrl+Entercan submit.Possible duplicates and related issues, most likely first:
prompt.submit/prompt.newline/prompt.submit.alternatein the app, including where the steer/queue action goes. Its implementation PR feat(app): make prompt action keybinds configurable #43128 was closed by automated cleanup, not rejected.If you'd like this, please add a 👍 or a comment on #43088. The bot will close this issue as a duplicate in 1 day unless you reply explaining how your request is different.
labtopSir commentedon Oct 14, 2026
Confirmed duplicate of #43088 — added my 👍 there.
One extra data point that may be useful for the main issue: the TUI already supports this layout today via
~/.config/opencode/cli.json:{ "keybinds": { "input.submit": "super+return", "input.newline": "return" } }But
cli.jsonis terminal-only and is not read by the desktop app, so desktop users currently have no path to this layout at all.Worth flagging that the #43128 description states "App and TUI settings remain separate", so even once that implementation lands the TUI keybind config still will not apply to the app. #43897 covers that specific part.
No objection to closing this one as a duplicate.
opencode-agent commentedon Oct 14, 2026
Thanks for confirming and for adding your 👍 to #43088. You're right that these are two separate requests. #43088 / #43128 would make the shortcuts configurable inside the desktop app. #43897 covers the desktop app reading the same
input.submit/input.newlinekeybinds as the TUI (cli.json). If that shared config matters to you, it's worth adding your note there too. The bot will close this issue as a duplicate as planned.opencode-agent commentedon Oct 15, 2026
Closing this as a duplicate of #43088, as discussed. Thanks again for the detailed report and for adding your 👍 there. Please follow #43088 for configurable composer shortcuts in the desktop app, and #43897 for the desktop app reading the same
input.submit/input.newlinekeybinds as the TUI.