Skip to content

Keybind doesn't work in 1.0.7 #3675

Closed
Closed

Description

@JSCOP

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

Activity

  1. added
    bugSomething isn't working
    on Nov 1, 2025
  2. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 1, 2025
  3. github-actions commented on Nov 1, 2025

    @github-actions
    Contributor

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

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

  4. arsham commented on Nov 1, 2025

    @arsham

    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
  5. assigned and unassigned on Nov 1, 2025
  6. SsparKluo commented on Nov 3, 2025

    @SsparKluo

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

  7. greggyb commented on Nov 3, 2025

    @greggyb

    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"
        }
    }
  8. zippeurfou commented on Nov 3, 2025

    @zippeurfou

    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.

  9. chen-coalition commented on Nov 3, 2025

    @chen-coalition

    same, shift+enter no longer works for newline

  10. jdanbrown commented on Nov 3, 2025

    @jdanbrown
    Contributor

    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:

  11. jeeeem commented on Nov 4, 2025

    @jeeeem

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

    #3557

  12. SsparKluo commented on Nov 12, 2025

    @SsparKluo

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

  13. bartman commented on Nov 24, 2025

    @bartman

    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"
    },
  14. kommander commented on Dec 15, 2025

    @kommander
    Collaborator

    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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions