Skip to content

fix(keybinds): remove ctrl+c from default app_exit to prevent accidental exits - #43592

Closed
Zhangbo-cn wants to merge 1 commit into
anomalyco:devfrom
Zhangbo-cn:fix-keybinds-ctrl-c-exit
Closed

Zhangbo-cn wants to merge 1 commit into
anomalyco:devfrom
Zhangbo-cn:fix-keybinds-ctrl-c-exit

Conversation

@Zhangbo-cn

@Zhangbo-cn Zhangbo-cn commented Aug 20, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #7957

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

ctrl+c is bound to app_exit by default in the TUI, so pressing it with an empty prompt or during generation quits the whole app. That conflicts with the universal copy shortcut and has been reported in #7957 (and earlier in #2999); previous fix PRs (#11291, #9050) were auto-closed before landing.

This PR removes ctrl+c from the app_exit default in packages/tui/src/config/keybind.ts: "ctrl+c,ctrl+d,<leader>q""ctrl+d,<leader>q". Ctrl+D and <leader>q still exit the app. Docs (18 locales) are synced.

No tests assert the old default, so no test changes are needed.

How did you verify your code works?

  • Reproduced the issue before the change: in tmux, Ctrl+C exits on both the idle home screen and mid-generation.
  • With the new default, Ctrl+C no longer exits the app; Ctrl+D and <leader>q still exit.
  • No unit tests cover the keybind defaults, so nothing else needed updating.

Screenshots / recordings

Keybinding default change in the TUI; no visible UI diff. Can add a terminal recording if helpful.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

…tal exits

Ctrl+C is the universal interrupt/copy key; binding it to exit by default
closes the entire TUI on a single press when the prompt input is empty or
during generation. Drop it from the app_exit default (Ctrl+D and <leader>q
still exit) and sync the docs.

Refs anomalyco#7957
@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. needs:issue labels Aug 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Aug 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@github-actions

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UX] Ctrl+C should not exit OpenCode - conflicts with universal copy shortcut

1 participant