Skip to content

Text editing shortcuts (Option+Arrow, Option+Backspace) don't work in search dialogs #7398

Closed

Description

@trungung

Description

On Mac, when using search functionality in dialogs (command palette, theme selection, model selection), text editing shortcuts don't work:

  • Option+ArrowLeft/ArrowRight - navigate by word
  • Option+Backspace - delete previous word

Plugins

None

OpenCode version

1.1.17

Steps to reproduce

  1. Open command palette (Ctrl+P) or any search dialog (theme selection, model selection)
  2. Click in the search input field
  3. Type some text like "hello world test"
  4. Try Option+ArrowLeft or Option+ArrowRight
    • Expected: Cursor jumps one word at a time
    • Actual: Cursor doesn't move
  5. Try Option+Backspace
    • Expected: Previous word is deleted
    • Actual: Nothing happens

Screenshot and/or share link

Image

Operating System

macOS 26

Terminal

Ghostty

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Jan 9, 2026
  2. github-actions commented on Jan 9, 2026

    @github-actions
    Contributor

    For keybind-related issues, please also check our pinned keybinds documentation: #4997

  3. trungung commented on Jan 9, 2026

    @trungung
    Author

    For keybind-related issues, please also check our pinned keybinds documentation: #4997

    Based on my findings, this is likely not a keybinding issue. It appears to be a conflict in how events are handled:

    Scope

    1. packages/ui/src/components/list.tsx (line 97-112)
    2. packages/ui/src/hooks/use-filtered-list.tsx (line 78-87)

    Root causes

    1. List component's handleKey passes all keys (except Escape) to list.onKeyDown() from solid-list
    2. No check for modifier keys (altKey, metaKey) to skip list navigation
    3. solid-list library calls preventDefault() on these events
    4. Blocks browser's default behavior for text editing shortcuts (Option+Arrow, Option+Backspace, Cmd+Arrow)

    Solution
    Add a modifier key check in List's handleKey function (similar to prompt-input) before passing events to onKeyDown().

  4. added a commit that references this issue on Jan 10, 2026
    2aa73ed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions