[PR #3636] feat: allow ctrl+d to exit the app #10716

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

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

State: closed
Merged: Yes


I have another PR for v0 changes pointed at branch v0: https://github.com/sst/opencode/pull/3594

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've leveraged existing new OpenTUI keybindings to implementing both input_forward_delete (new functionality) and add ctrl+d to the existing app_exit event.

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/3636 **State:** closed **Merged:** Yes --- > I have another PR for v0 changes pointed at branch `v0`: https://github.com/sst/opencode/pull/3594 ## 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've leveraged existing new OpenTUI keybindings to implementing both `input_forward_delete` (new functionality) and add `ctrl+d` to the existing `app_exit` event. ## 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/b3eccdbd-356f-4820-8dc7-978c1ee59df2"></td> <td><video src="https://github.com/user-attachments/assets/359e518c-9f68-43f2-a1a4-d2067ac95d2a"></td> <td><video src="https://github.com/user-attachments/assets/9ea02f6c-4158-4940-9d21-c1d6ae1ec423"></td> </tr> </table>
yindo added the pull-request label 2026-02-16 18:15:27 -05:00
yindo closed this issue 2026-02-16 18:15:27 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10716