Skip to content

Conversation

@zerone0x
Copy link
Contributor

What does this PR do?

Fixes the keyboard binding conflict where the Question tool's H/L navigation keys interfere with typing in the command palette.

When the Question tool is active and the user opens the command palette (Ctrl+P), pressing h or l would navigate the question tabs instead of typing in the command palette's search input.

This change adds a guard at the start of the useKeyboard handler to skip event processing when a dialog is open, following the established pattern used in dialog-command.tsx (lines 48 and 103).

Fixes #8118

How did you verify your code works?

  • Verified the fix follows the exact pattern established in dialog-command.tsx
  • The change uses the already-imported and instantiated dialog context from useDialog()
  • Minimal change: adds only 3 lines to check dialog.stack.length > 0 before processing

🤖 Generated with Claude Code

The QuestionPrompt component captures H/L keys for tab navigation,
which conflicts with typing in the command palette when opened via
Ctrl+P. This change adds a guard to skip keyboard event processing
when a dialog is open, following the established pattern used in
dialog-command.tsx.

Fixes anomalyco#8118

Co-Authored-By: Claude <[email protected]>
@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@rekram1-node rekram1-node merged commit 2199062 into anomalyco:dev Jan 13, 2026
4 checks passed
@jwinpbe
Copy link

jwinpbe commented Jan 13, 2026

thanks boss @zerone0x

sauerdaniel pushed a commit to sauerdaniel/opencode that referenced this pull request Jan 13, 2026
dl-alexandre pushed a commit to dl-alexandre/opencode that referenced this pull request Jan 13, 2026
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.

New "Question" tool captures vim motion H and L navigation while command palette is open

3 participants