Skip to content

Fix keybind parse missing super:false - #6664

Closed
opencode-agent[bot] wants to merge 1 commit into
devfrom
opencode/issue6650-20260102175750
Closed

opencode-agent[bot] wants to merge 1 commit into
devfrom
opencode/issue6650-20260102175750

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Jan 2, 2026

Copy link
Copy Markdown
Contributor

The fix is complete. Here's a summary of the changes:

Summary

Root Cause: When parsing keybind strings like "ctrl+u", the Keybind.parse function was creating Info objects without a super field (it was undefined). This caused issues when these keybinds were passed to OpenTUI's textarea, where the missing super field (undefined) was interpreted differently than super: false, leading to unintended keybind conflicts.

The Fix:

  1. In packages/opencode/src/util/keybind.ts (line 67): Added super: false to the initial info object in the parse function. This ensures that all parsed keybinds explicitly have super: false unless they specifically include the "super" modifier in their keybind string.

  2. Updated all 15 test cases in packages/opencode/test/keybind.test.ts to include super: false in 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 has super: false. When this keybind is passed to OpenTUI's textarea via mapTextareaKeybindings, the super: false || undefined expression evaluates to undefined, but more importantly, OpenTUI now receives a consistent set of keybindings where the super modifier is always explicitly defined. This prevents cmd+backspace (which is super+backspace) from being incorrectly matched against keybinds that don't use the super modifier.

Closes #6650

New%20session%20-%202026-01-02T17%3A57%3A48.718Z
opencode session  |  github run

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clearing input with cmd+backspace breaks w/ messages_half_page_up configured

1 participant