[PR #3594] feat: allow ctrl+d to exit the app (v0) #10706

Closed
opened 2026-02-16 18:15:26 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/3594

State: closed
Merged: No


I have another PR for OpenTUI changes pointed at branch dev: https://github.com/sst/opencode/pull/3636

Problem

Pressing ctrl+d should terminate OpenCode. Claude Code and Codex support similar behavior (Claude Code with two presses, Codex with one), and Unix tools typically require one press to exit programs as well.

See https://github.com/sst/opencode/issues/3025 for more details of the problem statement.

Solution

I opted to roll this new functionality into the existing AppExitCommand code. I added a separate block to control the new ctrl+d app exit (on single press) but also preserved the existing forward delete functionality when the text editor has content in it.

I also updated all locations I could find with the new keybinding information, including where it's displayed for /help.

Testing

Below is videos showing testing on all major platforms.

MacOS 15.7.1 Windows 11 (26120.6982) Linux (Ubuntu 24.04)
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/3594 **State:** closed **Merged:** No --- > I have another PR for OpenTUI changes pointed at branch `dev`: https://github.com/sst/opencode/pull/3636 ## Problem Pressing `ctrl+d` should terminate OpenCode. Claude Code and Codex support similar behavior (Claude Code with two presses, Codex with one), and Unix tools typically require one press to exit programs as well. See https://github.com/sst/opencode/issues/3025 for more details of the problem statement. ## Solution I opted to roll this new functionality into the existing `AppExitCommand` code. I added a separate block to control the new `ctrl+d` app exit (on single press) but also preserved the existing forward delete functionality when the text editor has content in it. I also updated all locations I could find with the new keybinding information, including where it's displayed for `/help`. ## Testing Below is videos showing testing on all major platforms. <table> <tr> <th>MacOS 15.7.1</th> <th>Windows 11 (26120.6982)</th> <th>Linux (Ubuntu 24.04)</th> </tr> <tr> <td><video src="https://github.com/user-attachments/assets/09a31db8-2ba1-44aa-94b1-ad8ff8eea5b2"></td> <td><video src="https://github.com/user-attachments/assets/c47654ae-2954-40c6-a9f8-d6468086a53b"></td> <td><video src="https://github.com/user-attachments/assets/4fb7c7da-bfea-4807-8918-57e87aa29e7d"></td> </tr> </table>
yindo added the pull-request label 2026-02-16 18:15:26 -05:00
yindo closed this issue 2026-02-16 18:15:26 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10706