mirror of
https://github.com/tauri-apps/meilisearch-docsearch.git
synced 2026-01-31 00:45:16 +01:00
fix: fix command+k hotkey on macOS devices (#178)
This commit is contained in:
5
.changes/macos-meta.md
Normal file
5
.changes/macos-meta.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"meilisearch-docsearch": "patch"
|
||||
---
|
||||
|
||||
Fix <kbd>Command</kbd>+<kbd>k</kbd> not working on macOS devices.
|
||||
@@ -58,8 +58,9 @@ export function useDocSearchHotKeys({
|
||||
modsAndkeys.some(isCtrl);
|
||||
const shift = event.shiftKey == modsAndkeys.includes("shift");
|
||||
const alt = event.altKey == modsAndkeys.some(isAlt);
|
||||
const meta =
|
||||
!isAppleDevice() && event.metaKey == modsAndkeys.some(isMeta);
|
||||
const meta = isAppleDevice()
|
||||
? true
|
||||
: event.metaKey == modsAndkeys.some(isMeta);
|
||||
|
||||
return ctrl && shift && alt && meta;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user