From 21172fadd43eba9c8eab5cca2cf1db243cda9b5f Mon Sep 17 00:00:00 2001 From: "LAPTOP-O016UC3M\\Qi Chen" <16399091+binaricat@users.noreply.github.com> Date: Fri, 12 Dec 2025 11:19:32 +0800 Subject: [PATCH] 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. --- application/state/useSettingsState.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/application/state/useSettingsState.ts b/application/state/useSettingsState.ts index 5aa526e55..3e620910f 100644 --- a/application/state/useSettingsState.ts +++ b/application/state/useSettingsState.ts @@ -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;