Skip to content

fix: use cmd/ctrl+enter to open search result in a new tab#6

Merged
inkless merged 1 commit into
mainfrom
gz/mdb-18-shift-enter-new-tab-fix
Jun 9, 2026
Merged

fix: use cmd/ctrl+enter to open search result in a new tab#6
inkless merged 1 commit into
mainfrom
gz/mdb-18-shift-enter-new-tab-fix

Conversation

@inkless

@inkless inkless commented Jun 9, 2026

Copy link
Copy Markdown
Owner

What

Follow-up to #4. Shift+Enter on a search result opened a new window instead of a new tabwindow.open() reads the live keyboard modifiers, and a held Shift is the OS "new window" convention (Shift+Click→window).

Rather than work around that, bind the new-tab action to Cmd/Ctrl+Enter, mirroring the Cmd/Ctrl+Click affordance on result rows. Cmd/Ctrl maps to "new tab", so window.open(path, "_blank") does the right thing with no workaround. Shift+Enter is no longer bound. Plain Enter still navigates the current tab. The modal stays open after opening a tab, so you can fan out to several files.

Also makes the hint platform-aware (⌘↵ on macOS, Ctrl+↵ elsewhere).

Test plan

  • pnpm build / tsc --noEmit / pnpm lint clean
  • pnpm test:e2e — 22 pass (Cmd+Enter and Cmd+Click new-tab cases)
  • Manual: Cmd+Enter in the search modal opens a new tab

🤖 Generated with Claude Code

Shift+Enter (shipped in the previous change) opened a new *window* rather
than a new tab: window.open() reads the live keyboard modifiers, and a
held Shift is the OS "new window" convention. Bind the new-tab action to
Cmd/Ctrl+Enter instead, mirroring the Cmd/Ctrl+Click affordance on result
rows — Cmd/Ctrl maps to "new tab", so window.open() does the right thing
with no workaround. Shift+Enter is no longer bound.

The modal stays open after opening a tab so you can fan out to several
files. Hint updated to a platform-aware "⌘↵ / Ctrl+↵ new tab".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@inkless inkless force-pushed the gz/mdb-18-shift-enter-new-tab-fix branch from 7e39d4d to 074e3b7 Compare June 9, 2026 04:52
@inkless inkless changed the title fix: open search result in new tab on shift+enter, not new window fix: use cmd/ctrl+enter to open search result in a new tab Jun 9, 2026
@inkless inkless merged commit 94ed892 into main Jun 9, 2026
4 checks passed
@inkless inkless deleted the gz/mdb-18-shift-enter-new-tab-fix branch June 9, 2026 05:02
@github-actions github-actions Bot mentioned this pull request Jun 9, 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.

1 participant