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(windows): add Alt+S fallback keydown listener for timeline close
louis0301954f475264f03a
diff --git a/apps/screenpipe-app-tauri/components/rewind/hooks/use-timeline-keyboard.ts b/apps/screenpipe-app-tauri/components/rewind/hooks/use-timeline-keyboard.tsindex 459f821d1..367b1465d 100644--- a/apps/screenpipe-app-tauri/components/rewind/hooks/use-timeline-keyboard.ts+++ b/apps/screenpipe-app-tauri/components/rewind/hooks/use-timeline-keyboard.ts@@ -177,15 +177,25 @@ export function useTimelineKeyboard(opts: {// Listen for Rust global-shortcut Escape eventconst unlisten = listen("escape-pressed", handleEscape);- // Fallback: direct keydown listener for Escape.- // On Windows, the global shortcut Escape registration can be lost- // due to focus races (unregister/register happen in separate threads).- // This direct listener works whenever the webview has focus.+ // Fallback: direct keydown listener for Escape and Alt+S.+ // On Windows, global shortcut registrations can be lost due to+ // focus races (unregister/register happen in separate threads)+ // or the OS intercepting Alt as a menu-bar activator.+ // These direct listeners work whenever the webview has focus.const handleKeyDown = (e: KeyboardEvent) => {if (e.key === "Escape") {e.preventDefault();handleEscape();}+ // Alt+S (Windows) / Ctrl+Cmd+S (macOS) — close timeline+ const isToggleShortcut = isMac+ ? e.metaKey && e.ctrlKey && e.key.toLowerCase() === "s"+ : e.altKey && e.key.toLowerCase() === "s";+ if (isToggleShortcut) {+ e.preventDefault();+ pausePlayback();+ commands.closeWindow("Main");+ }};window.addEventListener("keydown", handleKeyDown);@@ -193,7 +203,7 @@ export function useTimelineKeyboard(opts: {unlisten.then((fn) => fn());window.removeEventListener("keydown", handleKeyDown);};- }, [showSearchModal, embedded, resetFilters, inSearchReviewMode, clearSearchHighlight]);+ }, [showSearchModal, embedded, resetFilters, inSearchReviewMode, clearSearchHighlight, isMac, pausePlayback]);// Handle arrow key navigation via JS keydown (no global hotkey stealing)useEffect(() => {