Skip to content

Commit 012c9a0

Browse files
committed
feat(search): add Ctrl+F / Cmd+F as search hotkey
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
1 parent cf4c390 commit 012c9a0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

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)