Uh oh!
There was an error while loading. Please reload this page.
fix(keybinds): remove ctrl+c from default app_exit to prevent accidental exits - #11291
fix(keybinds): remove ctrl+c from default app_exit to prevent accidental exits#11291shrwnsan wants to merge 1 commit into
Conversation
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found several related PRs that attempted similar solutions to the Ctrl+C exit issue: Potentially Related PRs
These PRs (especially #9050 and #6494) represent alternative approaches to solving the accidental exit problem. Your PR (#11291) takes a different approach by simply removing Ctrl+C from the default entirely rather than requiring a double-press. Worth reviewing these to ensure consistency and no conflicting changes. |
f1ae801 to
08fa7f7Comparealexanderkjeldaas
commented
Feb 1, 2026
alternative could be that ctrl+c must be pressed twice or more? or quickly. |
shrwnsan
commented
Feb 2, 2026
Could be too. Some open PRs addressing it indeed |
… accidental exits
Ctrl+C is the universal copy shortcut on Windows and commonly used on Linux.
Users frequently press Ctrl+C out of habit to copy text, accidentally
terminating their session and losing context.
Changes:
- Changed default app_exit from "ctrl+c,ctrl+d,<leader>q" to "ctrl+d,<leader>q"
- Fixed hardcoded ctrl+c check in ErrorComponent to respect keybind config
Users can restore old behavior by setting:
"keybinds": { "app_exit": "ctrl+c,ctrl+d,<leader>q" }
Closesanomalyco#7957
Co-Authored-By: Kimi k2.5 <opencode/kimi-k2.5-free>a4df59d to
97c5dbbCompareClosing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR. |
Summary
Removes
Ctrl+Cfrom the defaultapp_exitkeybind to prevent users from accidentally exiting OpenCode when trying to copy text.Problem
Ctrl+Cis the universal copy shortcut on Windows and commonly used on Linux. Users frequently press it out of habit, accidentally terminating their session and losing context/conversation history.Changes
app_exitfrom"ctrl+c,ctrl+d,<leader>q"to"ctrl+d,<leader>q"ctrl+ccheck in ErrorComponent to respect configurable keybindsTesting
Ctrl+Cno longer exits (clears input or does nothing)Ctrl+Dexits as expectedMigration
Users who prefer the old behavior can restore it via config:
{ "keybinds": { "app_exit": "ctrl+c,ctrl+d,<leader>q" } }Closes#7957