fix: ctrl+a does not work on Windows in code block (#5692)

This commit is contained in:
Tom Moor
2023-08-14 16:16:12 -04:00
committed by GitHub
parent 9f0534d544
commit 28ae1af2a3
12 changed files with 30 additions and 19 deletions

View File

@@ -1,6 +0,0 @@
const SSR = typeof window === "undefined";
const isMac = !SSR && window.navigator.platform === "MacIntel";
export default function isModKey(event: KeyboardEvent | MouseEvent): boolean {
return isMac ? event.metaKey : event.ctrlKey;
}