YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
fix(app): add default audio recording shortcuts (#2404)
Sergioc1370311a2ab
diff --git a/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx b/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsxindex 903b9f8b5..579d9c21e 100644--- a/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx+++ b/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx@@ -252,8 +252,8 @@ let DEFAULT_SETTINGS: Settings = {showScreenpipeShortcut: "Control+Super+S",startRecordingShortcut: "Super+Alt+U",stopRecordingShortcut: "Super+Alt+X",- startAudioShortcut: "",- stopAudioShortcut: "",+ startAudioShortcut: "Control+Super+A",+ stopAudioShortcut: "Control+Super+Z",showChatShortcut: "Control+Super+L",searchShortcut: "Control+Super+K",realtimeAudioTranscriptionEngine: "deepgram",@@ -289,6 +289,8 @@ export function createDefaultSettingsObject(): Settings {DEFAULT_SETTINGS.showScreenpipeShortcut = p === "windows" ? "Alt+S" : "Control+Super+S";DEFAULT_SETTINGS.showChatShortcut = p === "windows" ? "Alt+L" : "Control+Super+L";DEFAULT_SETTINGS.searchShortcut = p === "windows" ? "Alt+K" : "Control+Super+K";+ DEFAULT_SETTINGS.startAudioShortcut = p === "windows" ? "Alt+Shift+A" : "Control+Super+A";+ DEFAULT_SETTINGS.stopAudioShortcut = p === "windows" ? "Alt+Shift+Z" : "Control+Super+Z";if (p === "windows") {DEFAULT_SETTINGS.enableAccessibility = true;@@ -394,6 +396,18 @@ function createSettingsStore() {needsUpdate = true;}+ // Migration: Fill empty audio shortcuts with platform defaults+ if (!settings.startAudioShortcut || settings.startAudioShortcut.trim() === "") {+ const p = platform();+ settings.startAudioShortcut = p === "windows" ? "Alt+Shift+A" : "Control+Super+A";+ needsUpdate = true;+ }+ if (!settings.stopAudioShortcut || settings.stopAudioShortcut.trim() === "") {+ const p = platform();+ settings.stopAudioShortcut = p === "windows" ? "Alt+Shift+Z" : "Control+Super+Z";+ needsUpdate = true;+ }+// Always override platform with runtime detection — never trust persisted value.// Platform can be "unknown" if it was saved during SSR or before Tauri was ready.try {diff --git a/apps/screenpipe-app-tauri/src-tauri/src/main.rs b/apps/screenpipe-app-tauri/src-tauri/src/main.rsindex 6b1a09589..ab16e8d3c 100755--- a/apps/screenpipe-app-tauri/src-tauri/src/main.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/main.rs@@ -280,12 +280,31 @@ impl ShortcutConfig {.unwrap_or_default().unwrap_or_default();+ let default_start_audio = if cfg!(target_os = "windows") {+ "Alt+Shift+A"+ } else {+ "Super+Ctrl+A"+ };+ let default_stop_audio = if cfg!(target_os = "windows") {+ "Alt+Shift+Z"+ } else {+ "Super+Ctrl+Z"+ };+Ok(Self {show: store.show_screenpipe_shortcut,start: store.start_recording_shortcut,stop: store.stop_recording_shortcut,- start_audio: store.start_audio_shortcut,- stop_audio: store.stop_audio_shortcut,+ start_audio: if store.start_audio_shortcut.trim().is_empty() {+ default_start_audio.to_string()+ } else {+ store.start_audio_shortcut+ },+ stop_audio: if store.stop_audio_shortcut.trim().is_empty() {+ default_stop_audio.to_string()+ } else {+ store.stop_audio_shortcut+ },show_chat: store.show_chat_shortcut,search: store.search_shortcut,disabled: store.disabled_shortcuts,diff --git a/apps/screenpipe-app-tauri/src-tauri/src/store.rs b/apps/screenpipe-app-tauri/src-tauri/src/store.rsindex d1a276da4..d2f610502 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/store.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/store.rs@@ -537,8 +537,14 @@ impl Default for SettingsStore {stop_recording_shortcut: "Alt+Shift+X".to_string(),#[cfg(not(target_os = "windows"))]stop_recording_shortcut: "Super+Ctrl+X".to_string(),- start_audio_shortcut: "".to_string(),- stop_audio_shortcut: "".to_string(),+ #[cfg(target_os = "windows")]+ start_audio_shortcut: "Alt+Shift+A".to_string(),+ #[cfg(not(target_os = "windows"))]+ start_audio_shortcut: "Super+Ctrl+A".to_string(),+ #[cfg(target_os = "windows")]+ stop_audio_shortcut: "Alt+Shift+Z".to_string(),+ #[cfg(not(target_os = "windows"))]+ stop_audio_shortcut: "Super+Ctrl+Z".to_string(),#[cfg(target_os = "windows")]show_chat_shortcut: "Alt+L".to_string(),#[cfg(not(target_os = "windows"))]