Keybind doesn't work in 1.0.7 #2432

Closed
opened 2026-02-16 17:35:35 -05:00 by yindo · 11 comments
Owner

Originally created by @JSCOP on GitHub (Nov 1, 2025).

Originally assigned to: @kommander on GitHub.

Description

In, opencode.json I've changed the submit button to ctrl + enter and new line to enter

"keybinds": {
"input_submit": "ctrl+enter",
"input_newline": "enter"
},

This doesn't work on 1.0.7

OpenCode version

1.0.7

Steps to reproduce

  1. install opencode 1.0.7
  2. change keybind in global opencode.json (C:\Users"username".config\opencode
  3. test it

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

Windows Terminal, Wezterm

Originally created by @JSCOP on GitHub (Nov 1, 2025). Originally assigned to: @kommander on GitHub. ### Description In, opencode.json I've changed the submit button to ctrl + enter and new line to enter "keybinds": { "input_submit": "ctrl+enter", "input_newline": "enter" }, This doesn't work on 1.0.7 ### OpenCode version 1.0.7 ### Steps to reproduce 1. install opencode 1.0.7 2. change keybind in global opencode.json (C:\Users\"username"\.config\opencode 3. test it ### Screenshot and/or share link _No response_ ### Operating System Windows 11 ### Terminal Windows Terminal, Wezterm
yindo added the opentuibug labels 2026-02-16 17:35:35 -05:00
yindo closed this issue 2026-02-16 17:35:35 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 1, 2025):

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

  • #3557: Similar issue with input_submit keybind not reading <leader> keybind properly - this appears to be the same core problem with keybind configuration not working
  • #3599: Issue with enter/shift+enter behavior that might be related to keybind configuration problems

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

@github-actions[bot] commented on GitHub (Nov 1, 2025): This issue might be a duplicate of existing issues. Please check: - #3557: Similar issue with `input_submit` keybind not reading `<leader>` keybind properly - this appears to be the same core problem with keybind configuration not working - #3599: Issue with enter/shift+enter behavior that might be related to keybind configuration problems Feel free to ignore if none of these address your specific case.
Author
Owner

@arsham commented on GitHub (Nov 1, 2025):

I've noticed a few more that are not working:

  • Yank with leader+y
  • Cycle recent models in reverse with shift+f2
  • session_child_cycle and session_child_cycle_reverse. This one is interesting, you can't even set them as per breaking changes notice, but they are in the docs still
@arsham commented on GitHub (Nov 1, 2025): I've noticed a few more that are not working: - Yank with leader+y - Cycle recent models in reverse with shift+f2 - session_child_cycle and session_child_cycle_reverse. This one is interesting, you can't even set them as per breaking changes notice, but they are in the docs still
Author
Owner

@SsparKluo commented on GitHub (Nov 2, 2025):

And cannot use ctrl+_ (which is ctrl+/) for leader key. It works for 0.15

@SsparKluo commented on GitHub (Nov 2, 2025): And cannot use `ctrl+_` (which is ctrl+/) for leader key. It works for 0.15
Author
Owner

@greggyb commented on GitHub (Nov 3, 2025):

I see similar in 1.0.15 (installed with bun, running on Pop!_OS 22.04 with node 22.17.0) with gnome terminal 3.44.0

I have the keybinds below (no other keybinds). In older versions of the application, I could type multiple lines with a raw enter, but now that always submits my input.

{
    "$schema": "https://opencode.ai/config.json",
    "keybinds": {
	"leader": "ctrl+x",
	"input_submit": "alt+enter",
	"input_newline": "enter"
    }
}
@greggyb commented on GitHub (Nov 3, 2025): I see similar in 1.0.15 (installed with bun, running on Pop!_OS 22.04 with node 22.17.0) with gnome terminal 3.44.0 I have the keybinds below (no other keybinds). In older versions of the application, I could type multiple lines with a raw `enter`, but now that always submits my input. ```json { "$schema": "https://opencode.ai/config.json", "keybinds": { "leader": "ctrl+x", "input_submit": "alt+enter", "input_newline": "enter" } } ```
Author
Owner

@zippeurfou commented on GitHub (Nov 3, 2025):

Adding to this.
I used to be able to do shift+enter to go to new lines as well as opt+backspace to delete words.

@zippeurfou commented on GitHub (Nov 3, 2025): Adding to this. I used to be able to do shift+enter to go to new lines as well as opt+backspace to delete words.
Author
Owner

@chen-coalition commented on GitHub (Nov 3, 2025):

same, shift+enter no longer works for newline

@chen-coalition commented on GitHub (Nov 3, 2025): same, shift+enter no longer works for newline
Author
Owner

@jdanbrown commented on GitHub (Nov 3, 2025):

And cannot use ctrl+_ (which is ctrl+/) for leader key. It works for 0.15

I opened a separate issue for this one so it doesn't get lost:

@jdanbrown commented on GitHub (Nov 3, 2025): > And cannot use `ctrl+_` (which is ctrl+/) for leader key. It works for 0.15 I opened a separate issue for this one so it doesn't get lost: - https://github.com/sst/opencode/issues/3848
Author
Owner

@jeeeem commented on GitHub (Nov 3, 2025):

same with this keybind alt+c. hoping this can be fixed.

https://github.com/sst/opencode/issues/3557

@jeeeem commented on GitHub (Nov 3, 2025): same with this keybind `alt+c`. hoping this can be fixed. https://github.com/sst/opencode/issues/3557
Author
Owner

@SsparKluo commented on GitHub (Nov 11, 2025):

@JSCOP @greggyb

OpenTUI, the new package used, likely catches parses keyboard event in a different way. If you want to make this config works in the new version:

"keybinds": {
  "input_submit": "ctrl+enter",
  "input_newline": "enter"
},

You need to change it to

"keybinds": {
  "input_submit": "linefeed",
  "input_newline": "return"
},

If you want to use alt, you may need to change it to meta or option.

You can actually check the new key event name by cloning opentui repo and run the opentui/packages/core/dev/keypress-debug.ts.

This solution may not work if the keyevent changed in the future.

@SsparKluo commented on GitHub (Nov 11, 2025): @JSCOP @greggyb OpenTUI, the new package used, likely catches parses keyboard event in a different way. If you want to make this config works in the new version: ```json "keybinds": { "input_submit": "ctrl+enter", "input_newline": "enter" }, ``` You need to change it to ```json "keybinds": { "input_submit": "linefeed", "input_newline": "return" }, ``` If you want to use `alt`, you may need to change it to `meta` or `option`. You can actually check the new key event name by cloning opentui repo and run the `opentui/packages/core/dev/keypress-debug.ts`. This solution may not work if the keyevent changed in the future.
Author
Owner

@bartman commented on GitHub (Nov 24, 2025):

Thank you @SsparKluo ... your suggestion to use "return" for newline works.
Unfortunately "linefeed" did not work for me, but "shift+return" does work.

attempt at new line of text in prompt
"input_newline": "return" ✔️ <enter> key works
"input_newline": "ctrl+j" ✔️ <C-j> key works
"input_newline": "return,ctrl+j" ✔️ both keys work
attempt at submitting a multi line prompt
"input_submit": "linefeed" does not submit
"input_submit": "shift+enter" does not submit
"input_submit": "shift+return" ✔️ <shift-enter> key submits
"input_submit": "ctrl+s" ✔️ <C-s> key submits

I used to use something like this before:

"keybinds": {
  "input_submit": "ctrl+s,shift+enter",
  "input_newline": "ctrl+j,enter"
},

which broke a few weeks ago, and I replaced it with...

"keybinds": {
  "input_submit": "shift+return,ctrl+s",
  "input_newline": "return,ctrl+j"
},
@bartman commented on GitHub (Nov 24, 2025): Thank you @SsparKluo ... your suggestion to use "return" for newline works. Unfortunately "linefeed" did not work for me, but "shift+return" does work. | attempt at new line of text in prompt | | |---|---| | `"input_newline": "return"` | ✔️ `<enter>` key works | | `"input_newline": "ctrl+j"` | ✔️ `<C-j>` key works | | `"input_newline": "return,ctrl+j"` | ✔️ both keys work | | attempt at submitting a multi line prompt | | |---|---| | `"input_submit": "linefeed"` | :x: does not submit | | `"input_submit": "shift+enter"` | :x: does not submit | | `"input_submit": "shift+return"` | ✔️ `<shift-enter>` key submits | | `"input_submit": "ctrl+s"` | ✔️ `<C-s>` key submits | I used to use something like this before: ```json "keybinds": { "input_submit": "ctrl+s,shift+enter", "input_newline": "ctrl+j,enter" }, ``` which broke a few weeks ago, and I replaced it with... ```json "keybinds": { "input_submit": "shift+return,ctrl+s", "input_newline": "return,ctrl+j" }, ```
Author
Owner

@kommander commented on GitHub (Dec 15, 2025):

This should work better on latest version for terminals that support it. Windows terminal does not support modifyOtherKeys or kitty keyboard protocol, so this will not work in windows terminal as long as it does not support either.

@kommander commented on GitHub (Dec 15, 2025): This should work better on latest version for terminals that support it. Windows terminal does not support modifyOtherKeys or kitty keyboard protocol, so this will not work in windows terminal as long as it does not support either.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2432