diff --git a/src-tauri/resources/default_settings.json b/src-tauri/resources/default_settings.json index 2040dc9..a41e7c5 100644 --- a/src-tauri/resources/default_settings.json +++ b/src-tauri/resources/default_settings.json @@ -4,7 +4,7 @@ "id": "transcribe", "name": "Transcribe Keyboard Shortcut", "description": "Converts your speech into text.", - "default_binding": "alt+space" + "default_binding": "Platform-specific: ctrl+space (Windows/Linux), alt+space (macOS)" } }, "push_to_talk": true diff --git a/src-tauri/src/settings.rs b/src-tauri/src/settings.rs index 4ade6ea..9adfbd1 100644 --- a/src-tauri/src/settings.rs +++ b/src-tauri/src/settings.rs @@ -39,6 +39,16 @@ fn default_always_on_microphone() -> bool { pub const SETTINGS_STORE_PATH: &str = "settings_store.json"; pub fn get_default_settings() -> AppSettings { + // Set platform-specific default keyboard shortcuts + #[cfg(target_os = "windows")] + let default_shortcut = "ctrl+space"; + #[cfg(target_os = "macos")] + let default_shortcut = "alt+space"; // Alt key on macOS (Option key) + #[cfg(target_os = "linux")] + let default_shortcut = "ctrl+space"; + #[cfg(not(any(target_os = "windows", target_os = "macos", target_os = "linux")))] + let default_shortcut = "alt+space"; // Fallback for other platforms + let mut bindings = HashMap::new(); bindings.insert( "transcribe".to_string(), @@ -46,8 +56,8 @@ pub fn get_default_settings() -> AppSettings { id: "transcribe".to_string(), name: "Transcribe".to_string(), description: "Converts your speech into text.".to_string(), - default_binding: "alt+space".to_string(), - current_binding: "alt+space".to_string(), + default_binding: default_shortcut.to_string(), + current_binding: default_shortcut.to_string(), }, ); // bindings.insert(