opentui: input_submit not reading <leader> keybind properly #2351

Open
opened 2026-02-16 17:35:16 -05:00 by yindo · 5 comments
Owner

Originally created by @jeeeem on GitHub (Oct 29, 2025).

Originally assigned to: @thdxr on GitHub.

Description

I have this input_submit keybind

"input_submit": "<leader>enter,<leader>s"

Other keybind with is working properly, but this specific keybind doesnt. I did a workaround so I can use the opentui version, but I would like to use this specic keybind of mine if that is possible.

OpenCode version

0.0.0-opentui-202510292344

Steps to reproduce

Use latest opentui

Screenshot and/or share link

No response

Operating System

macOS 26.0.1

Terminal

Ghostty

Originally created by @jeeeem on GitHub (Oct 29, 2025). Originally assigned to: @thdxr on GitHub. ### Description I have this input_submit keybind `"input_submit": "<leader>enter,<leader>s"` Other keybind with <leader> is working properly, but this specific keybind doesnt. I did a workaround so I can use the opentui version, but I would like to use this specic keybind of mine if that is possible. ### OpenCode version 0.0.0-opentui-202510292344 ### Steps to reproduce Use latest opentui ### Screenshot and/or share link _No response_ ### Operating System macOS 26.0.1 ### Terminal Ghostty
yindo added the opentuibug labels 2026-02-16 17:35:16 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 29, 2025):

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

  • #3219: Similar OpenTUI leader key issue on macOS with Ghostty (closed - may have resolution)
  • #1108: General key binding challenges on macOS + Ghostty environment
  • #3538: Leader-based keybind not working in OpenTUI (<leader>y copy issue)

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

@github-actions[bot] commented on GitHub (Oct 29, 2025): This issue might be a duplicate of existing issues. Please check: - #3219: Similar OpenTUI leader key issue on macOS with Ghostty (closed - may have resolution) - #1108: General key binding challenges on macOS + Ghostty environment - #3538: Leader-based keybind not working in OpenTUI (`<leader>y` copy issue) Feel free to ignore if none of these address your specific case with `input_submit` keybinding.
Author
Owner

@jeeeem commented on GitHub (Oct 29, 2025):

This also shows up when I hit <ctrl+alt+d>

Image
@jeeeem commented on GitHub (Oct 29, 2025): This also shows up when I hit `<ctrl+alt+d>` <img width="1122" height="297" alt="Image" src="https://github.com/user-attachments/assets/7580ab49-6559-4b73-9b5c-96cc4833163b" />
Author
Owner

@rekram1-node commented on GitHub (Oct 30, 2025):

thanks!

@rekram1-node commented on GitHub (Oct 30, 2025): thanks!
Author
Owner

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

thanks!

Just to update, still having this issue on 1.0.49, this works before so Im hoping this can be fix.

Im usingalt+c as my leader key, all other keybinds is working aside from input_submit.

The reason why I did because of this issue with zellij
https://github.com/zellij-org/zellij/issues/4159

I can’t enter a new line with shift+enter, though it works outside Zellij with using shift+return in Ghostty
https://github.com/sst/opencode/issues/1505#issuecomment-3506078083

It’s not a blocker since I can still use Opencode normally, but it’d be great if this could be fixed for consistency.

@jeeeem commented on GitHub (Nov 8, 2025): > thanks! Just to update, still having this issue on `1.0.49`, this works before so Im hoping this can be fix. Im using`alt+c` as my leader key, all other keybinds is working aside from input_submit. The reason why I did because of this issue with zellij https://github.com/zellij-org/zellij/issues/4159 I can’t enter a new line with `shift+enter`, though it works outside Zellij with using `shift+return` in Ghostty https://github.com/sst/opencode/issues/1505#issuecomment-3506078083 It’s not a blocker since I can still use Opencode normally, but it’d be great if this could be fixed for consistency.
Author
Owner

@taqtiqa-mark commented on GitHub (Nov 25, 2025):

I'm experiencing this issue on v1.0.109.
Frustratingly plain-old-key return/enter submits the text... this is really what I am trying to prevent.

    "leader": "ctrl-x"
    # ...
    # borked: return, enter, linefeed
    "input_submit": "<leader>enter",
    # ...

Workaround: Kinda pointless, since enter always submits, but anyway ctrl-enter or ctrl-return does submit the text.

The Alacritty workaround for input_newline reported here (https://github.com/sst/opencode/issues/4046#issuecomment-3577296119), but has no effect, and appears to be a distinct issue with <leader> key.

@taqtiqa-mark commented on GitHub (Nov 25, 2025): I'm experiencing this issue on **v1.0.109**. Frustratingly plain-old-key `return`/`enter` submits the text... this is really what I am trying to prevent. ```jsonc "leader": "ctrl-x" # ... # borked: return, enter, linefeed "input_submit": "<leader>enter", # ... ``` Workaround: Kinda pointless, since `enter` always submits, but anyway `ctrl-enter` or `ctrl-return` does submit the text. The Alacritty workaround for `input_newline` reported here (https://github.com/sst/opencode/issues/4046#issuecomment-3577296119), but has no effect, and appears to be a distinct issue with `<leader>` key.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2351