Auto-detects default hotkey scheme by platform

Improves user experience by setting the default hotkey
scheme based on the user's operating system, ensuring
better alignment with platform conventions.
This commit is contained in:
LAPTOP-O016UC3M\Qi Chen committed 2025-12-12 11:19:32 +08:00
1 parent aab977f194
commit 21172fadd4
1 file changed
+5 -1
+5 -1
View File
@@ -20,7 +20,11 @@ const DEFAULT_COLOR = '221.2 83.2% 53.3%';
const DEFAULT_THEME: 'light' | 'dark' = 'light';
const DEFAULT_TERMINAL_THEME = 'netcatty-dark';
const DEFAULT_FONT_FAMILY = 'menlo';
const DEFAULT_HOTKEY_SCHEME: HotkeyScheme = 'mac';
// Auto-detect default hotkey scheme based on platform
const DEFAULT_HOTKEY_SCHEME: HotkeyScheme =
typeof navigator !== 'undefined' && /Mac|iPhone|iPad|iPod/i.test(navigator.platform)
? 'mac'
: 'pc';
const applyThemeTokens = (theme: 'light' | 'dark', primaryColor: string) => {
const root = window.document.documentElement;