Skip to content

Commit 65be0a2

Browse files
Fixed issue with modifier key for command palette on Windows
1 parent 51eb3a5 commit 65be0a2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

web/composables/useCommandPalette.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
import { Platform } from "quasar"
2+
3+
const modifier = Platform.is.mac ? "Meta" : "Control";
4+
15
/**
26
* Composable for the command palette
37
*/
@@ -9,7 +13,7 @@ function useCommandPalette() {
913
return;
1014
}
1115

12-
if (e.key === "p" && e.getModifierState("Meta")) {
16+
if (e.key === "p" && e.getModifierState(modifier)) {
1317
e.preventDefault();
1418
showFileSelector.value = !showFileSelector.value;
1519
}

0 commit comments

Comments
 (0)