Skip to content

Commit b58aa52

Browse files
authored
Merge pull request #304 from SableClient/feat/ctrl-f-search
feat(search): intercept Ctrl+F / Cmd+F to open Sable search
2 parents 67f0b9b + 26e9d10 commit b58aa52

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

.changeset/feat-ctrl-f-search.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
default: patch
3+
---
4+
5+
Add Ctrl+F / Cmd+F keyboard shortcut to open Sable search instead of browser find-in-page

src/app/features/search/Search.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,8 @@ export function Search({ requestClose }: SearchProps) {
407407
<Text size="T200" priority="300">
408408
Type <b>#</b> for rooms, <b>@</b> for DMs and <b>*</b> for spaces. Hotkey:{' '}
409409
<b>{isMacOS() ? KeySymbol.Command : 'Ctrl'} + k</b>
410+
{' / '}
411+
<b>{isMacOS() ? KeySymbol.Command : 'Ctrl'} + f</b>
410412
</Text>
411413
</Box>
412414
</Modal>
@@ -423,7 +425,7 @@ export function SearchModalRenderer() {
423425
window,
424426
useCallback(
425427
(event) => {
426-
if (isKeyHotkey('mod+k', event)) {
428+
if (isKeyHotkey('mod+k', event) || isKeyHotkey('mod+f', event)) {
427429
event.preventDefault();
428430
if (opened) {
429431
setOpen(false);

0 commit comments

Comments
 (0)