Skip to content

feat(search): intercept Ctrl+F / Cmd+F to open Sable search#304

Merged
Just-Insane merged 2 commits intodevfrom
feat/ctrl-f-search
Mar 16, 2026
Merged

feat(search): intercept Ctrl+F / Cmd+F to open Sable search#304
Just-Insane merged 2 commits intodevfrom
feat/ctrl-f-search

Conversation

@Just-Insane
Copy link
Collaborator

Summary

Fixes #179 — Pressing Ctrl+F / Cmd+F previously opened the browser's native find-in-page dialog. It now opens Sable's search modal instead.

Change

In SearchModalRenderer, the keyboard shortcut handler was extended to also match mod+f in addition to the existing mod+k. Both shortcuts now:

  • preventDefault() the event (suppressing browser find-in-page)
  • Toggle the search modal open/closed
  • Skip opening if another overlay (portal) is already visible

The hint text in the search modal footer was updated to show both Ctrl+K / Ctrl+F (or ⌘+K / ⌘+F on macOS).

Overrides browser find-in-page (Ctrl+F) to open Sable's search modal
instead, matching the behavior users expect from chat applications.
The existing Ctrl+K hotkey remains functional.

Fixes #179
@Just-Insane Just-Insane requested a review from a team March 16, 2026 19:08
@github-actions
Copy link
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

Status Preview URL Commit Alias Updated (UTC)
✅ Deployment successful! https://pr-304-sable.raspy-dream-bb1d.workers.dev 26e9d10 pr-304 Mon, 16 Mar 2026 19:29:49 GMT

@Just-Insane
Copy link
Collaborator Author

Tested in browser, works as expected.

@Just-Insane Just-Insane added this pull request to the merge queue Mar 16, 2026
Merged via the queue into dev with commit b58aa52 Mar 16, 2026
8 checks passed
@Just-Insane Just-Insane deleted the feat/ctrl-f-search branch March 17, 2026 03:43
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.

Override ctrl + f to show the search window instead.

1 participant