Ctrl+C in modal inputs closes dialog instead of clearing first #9241

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

Originally created by @mcostasilva on GitHub (Feb 13, 2026).

Originally assigned to: @kommander on GitHub.

Description

In TUI modals with a focused text field, pressing Ctrl+C closes the modal immediately even when the field has text.
Expected behavior: Ctrl+C should clear the focused modal input first and only close the modal when that input is already empty (same model as the main prompt input).

Plugins

None

OpenCode version

1.1.65

Steps to reproduce

  1. Open a modal with a focused text input (for example, the command/search modal).
  2. Type any text.
  3. Press Ctrl+C

Screenshot and/or share link

N/A

Operating System

No response

Terminal

Ghostty

Originally created by @mcostasilva on GitHub (Feb 13, 2026). Originally assigned to: @kommander on GitHub. ### Description In TUI modals with a focused text field, pressing `Ctrl+C` closes the modal immediately even when the field has text. Expected behavior: `Ctrl+C` should clear the focused modal input first and only close the modal when that input is already empty (same model as the main prompt input). ### Plugins None ### OpenCode version 1.1.65 ### Steps to reproduce 1. Open a modal with a focused text input (for example, the command/search modal). 2. Type any text. 3. Press `Ctrl+C` ### Screenshot and/or share link N/A ### Operating System _No response_ ### Terminal Ghostty
yindo added the opentuibug labels 2026-02-16 18:11:59 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 13, 2026):

This issue might be related to other Ctrl+C keyboard handling issues in the TUI. Please check:

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

@github-actions[bot] commented on GitHub (Feb 13, 2026): This issue might be related to other Ctrl+C keyboard handling issues in the TUI. Please check: - #12939: CTRL + C bug - #11826: Ctrl-C Bug Report For keybind-related issues, please also check our pinned keybinds documentation: #4997
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9241