opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Modifying `keybinds.input_newline` has no effect

Open JosXa opened this issue 3 weeks ago • 1 comments

Description

Putting anything into

  "keybinds": {
    "input_newline": "..."
  },

doesn't appear to do anything. The only working keybinds for me remain Ctrl+J and Ctrl+Enter no matter what I try.

What I would like is Ctrl+Shift instead, if possible. Is it?

OpenCode version

1.0.150

Steps to reproduce

  1. Be on Windows Terminal
  2. Set
  "keybinds": {
    "input_newline": "Shift+Enter"
  },
  1. Observe: Only Ctrl+J and Ctrl+Enter work.

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

Windows Terminal

JosXa avatar Dec 12 '25 21:12 JosXa

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

  • #4997: Keybinds (pinned issue tracking keybind problems including input_newline, multiline input, and custom keybind remapping not working)
  • #4046: Shift-return does not input newline since 1.0
  • #4189: Line breaks do not work any more in the latest version
  • #1505: shift+enter keybinding not working
  • #3675: Keybind doesn't work in 1.0.7
  • #4860: Cannot Load or Override Config File on macOS (also mentions input_newline set to 'none' being ignored)

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

Feel free to ignore if none of these address your specific case.

github-actions[bot] avatar Dec 12 '25 21:12 github-actions[bot]

Duplicate, I suppose

JosXa avatar Dec 15 '25 14:12 JosXa

Yes, we'll provide some scripts to tweak terminal settings across platforms and use some windows console scripting to improve, but out of the box there is currently not much I can do here I am afraid.

kommander avatar Dec 15 '25 14:12 kommander

Slightly highjacking this issue report to notify (KDE Plasma) Konsole users suffering from the same symptom: Shift+Enter not working in OpenCode.

I found that this is because of the way Konsole is configured by default. Users of Claude Code have raised this very issue on the Claude Code issue tracker: https://github.com/anthropics/claude-code/issues/2115

TL;DR: Default key bindings for Konsole is based on Xfree 4 which binds Return+Shift to \EOM instead of to \n. When you manually modify this value in the key binding profile, then Shift+Enter does work both for Claude Code and OpenCode. Yay!

doodhout avatar Dec 18 '25 19:12 doodhout