[PR #8786] fix(tui): resolve keybind conflicts and missing defaults (issue #4997) #12872

Open
opened 2026-02-16 18:17:45 -05:00 by yindo · 0 comments
Owner

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

State: open
Merged: No


This PR addresses multiple keybinding regressions and conflicts reported in Issue #4997 to improve TUI usability across platforms.

Changes
Ctrl+C Handling (Windows/Linux): Modified the Prompt component to prioritize "Copy" when text is selected. If no text is selected, it falls back to "Clear Input" or "Exit App".

Conflict Resolution:
Remapped model_provider_list from Ctrl+A to Ctrl+Alt+M. This restores the standard Emacs/Readline behavior where Ctrl+A moves the cursor to the start of the line.

Navigation & Editing Defaults:
Added Ctrl+N (Next) and Ctrl+P (Previous) to both history navigation and vertical cursor movement.
Ensured Shift+Enter and Ctrl+Enter trigger a newline.
Ensured Ctrl+Left / Ctrl+Right trigger word-wise navigation.
Ensured Alt+D and Option+Delete trigger word-wise deletion.

Testing
Verified configuration loading and default values via unit tests.
Verified no remaining critical collisions in default keybinds.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/8786 **State:** open **Merged:** No --- This PR addresses multiple keybinding regressions and conflicts reported in Issue #4997 to improve TUI usability across platforms. Changes Ctrl+C Handling (Windows/Linux): Modified the Prompt component to prioritize "Copy" when text is selected. If no text is selected, it falls back to "Clear Input" or "Exit App". Conflict Resolution: Remapped model_provider_list from Ctrl+A to Ctrl+Alt+M. This restores the standard Emacs/Readline behavior where Ctrl+A moves the cursor to the start of the line. Navigation & Editing Defaults: Added Ctrl+N (Next) and Ctrl+P (Previous) to both history navigation and vertical cursor movement. Ensured Shift+Enter and Ctrl+Enter trigger a newline. Ensured Ctrl+Left / Ctrl+Right trigger word-wise navigation. Ensured Alt+D and Option+Delete trigger word-wise deletion. Testing Verified configuration loading and default values via unit tests. Verified no remaining critical collisions in default keybinds.
yindo added the pull-request label 2026-02-16 18:17:45 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12872