Show actual session_interrupt keybind instead of hardcoded esc #7653

Open
opened 2026-02-16 18:07:50 -05:00 by yindo · 1 comment
Owner

Originally created by @andersonjoseph on GitHub (Jan 26, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

The TUI prompt component was hardcoding "esc" for the interrupt key instead of displaying the user's configured session_interrupt keybinding.


I have a local branch with the following changes, let me know if a PR would be useful!

diff --git a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx
index e19c8b709..e80ab5170 100644
--- a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx
+++ b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx
@@ -1064,7 +1064,7 @@ export function Prompt(props: PromptProps) {
                 </box>
               </box>
               <text fg={store.interrupt > 0 ? theme.primary : theme.text}>
-                esc{" "}
+                {keybind.print("session_interrupt")}{" "}
                 <span style={{ fg: store.interrupt > 0 ? theme.primary : theme.textMuted }}>
                   {store.interrupt > 0 ? "again to interrupt" : "interrupt"}
                 </span>

Plugins

N/A

OpenCode version

1.1.35

Steps to reproduce

  1. Configure a custom session_interrupt keybind by editing the opencode config file (e.g., change from default "escape" to "ctrl+i")
  2. Send a prompt that produces output
  3. Look at the prompt UI where it displays "interrupt" option
  4. Observe it still shows "esc" instead of the configured "ctrl+i" keybind

Screenshot and/or share link

Image

Operating System

NixOS Xantusia (25.11.20260112.1327e79)

Terminal

Alacritty

Originally created by @andersonjoseph on GitHub (Jan 26, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description The TUI prompt component was hardcoding "esc" for the interrupt key instead of displaying the user's configured `session_interrupt` keybinding. --- I have a local branch with the following changes, let me know if a PR would be useful! ```diff diff --git a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx index e19c8b709..e80ab5170 100644 --- a/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/prompt/index.tsx @@ -1064,7 +1064,7 @@ export function Prompt(props: PromptProps) { </box> </box> <text fg={store.interrupt > 0 ? theme.primary : theme.text}> - esc{" "} + {keybind.print("session_interrupt")}{" "} <span style={{ fg: store.interrupt > 0 ? theme.primary : theme.textMuted }}> {store.interrupt > 0 ? "again to interrupt" : "interrupt"} </span> ``` ### Plugins N/A ### OpenCode version 1.1.35 ### Steps to reproduce 1. Configure a custom session_interrupt keybind by editing the opencode config file (e.g., change from default "escape" to "ctrl+i") 2. Send a prompt that produces output 3. Look at the prompt UI where it displays "interrupt" option 4. Observe it still shows "esc" instead of the configured "ctrl+i" keybind ### Screenshot and/or share link <img width="952" height="521" alt="Image" src="https://github.com/user-attachments/assets/fc06193e-c8ba-4103-80e0-087db2fb8bcf" /> ### Operating System NixOS Xantusia (25.11.20260112.1327e79) ### Terminal Alacritty
yindo added the opentuibugnix labels 2026-02-16 18:07:50 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 26, 2026):

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

  • #5752: session_interrupt command doesn't work when binded in non-default
  • #3699: Interrupting Session via ESC does not work

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] commented on GitHub (Jan 26, 2026): This issue might be a duplicate of existing issues. Please check: - #5752: `session_interrupt` command doesn't work when binded in non-default - #3699: Interrupting Session via ESC does not work For keybind-related issues, please also check our pinned keybinds documentation: #4997 Feel free to ignore if none of these address your specific case.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7653