Repository navigation
Fix keybind parse missing super:false - #6664
Closed
opencode-agent[bot] wants to merge 1 commit into
Closed
opencode-agent[bot] wants to merge 1 commit into
opencode-agent[bot] wants to merge 1 commit into
Conversation
Co-authored-by: rekram1-node <[email protected]>
opencode-agent
Bot
force-pushed
the
dev
branch
from
January 30, 2026 14:32
00637c0 to
71e0ba2
Compare
thdxr
force-pushed
the
dev
branch
3 times, most recently
from
January 30, 2026 14:37
f1ae801 to
08fa7f7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The fix is complete. Here's a summary of the changes:
Summary
Root Cause: When parsing keybind strings like
"ctrl+u", theKeybind.parsefunction was creatingInfoobjects without asuperfield (it wasundefined). This caused issues when these keybinds were passed to OpenTUI's textarea, where the missingsuperfield (undefined) was interpreted differently thansuper: false, leading to unintended keybind conflicts.The Fix:
In
packages/opencode/src/util/keybind.ts(line 67): Addedsuper: falseto the initialinfoobject in theparsefunction. This ensures that all parsed keybinds explicitly havesuper: falseunless they specifically include the "super" modifier in their keybind string.Updated all 15 test cases in
packages/opencode/test/keybind.test.tsto includesuper: falsein their expected results, ensuring the tests accurately reflect the new behavior.Why this fixes the issue: When a user configures
messages_half_page_up: "ctrl+u", the parsed keybind now explicitly hassuper: false. When this keybind is passed to OpenTUI's textarea viamapTextareaKeybindings, thesuper: false || undefinedexpression evaluates toundefined, but more importantly, OpenTUI now receives a consistent set of keybindings where thesupermodifier is always explicitly defined. This preventscmd+backspace(which issuper+backspace) from being incorrectly matched against keybinds that don't use the super modifier.Closes #6650
opencode session | github run