Skip to content

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

fix(chat): add browser keydown fallback for Cmd+L shortcut

Louis Beaumont13e11b93145a
diff --git a/screenpipe-app-tauri/components/global-chat.tsx b/screenpipe-app-tauri/components/global-chat.tsx
index c48e8c602..76a1d62fa 100644
--- a/screenpipe-app-tauri/components/global-chat.tsx
+++ b/screenpipe-app-tauri/components/global-chat.tsx
@@ -192,6 +192,18 @@ export function GlobalChat() {
};
}, []);
+ // Browser-level fallback for Cmd+L when window has focus
+ useEffect(() => {
+ const handleKeyDown = (e: KeyboardEvent) => {
+ if ((e.metaKey || e.ctrlKey) && e.key === "l") {
+ e.preventDefault();
+ setOpen((prev) => !prev);
+ }
+ };
+ window.addEventListener("keydown", handleKeyDown);
+ return () => window.removeEventListener("keydown", handleKeyDown);
+ }, []);
+
// Focus input when opening
useEffect(() => {
if (open) {