mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-10-09 19:19:50 +08:00
8 lines
305 B
TypeScript
8 lines
305 B
TypeScript
/** True on macOS and iOS, where shortcuts use ⌘ instead of Ctrl */
|
|||
|
|
export const isMac =
|
||
|
|
typeof navigator !== "undefined" &&
|
||
|
|
/Mac|iPhone|iPad/.test(navigator.userAgent)
|
||
|
|
|
||
|
|
/** Prefix for shortcut labels: "⌘" on Apple platforms, "Ctrl+" elsewhere */
|
||
|
|
export const modKey = isMac ? "⌘" : "Ctrl+"
|