From 892f8b10febc2a512059bfd1b7671c1504164143 Mon Sep 17 00:00:00 2001 From: Anirudh Sevugan Date: Tue, 25 Feb 2025 19:22:42 +0530 Subject: [PATCH] Changes for future deployment To-be-deployed (as of Tuesday, Feb 25, 2025) changes. Snapshot key shortcut changed to CommandOrControl+S, and snapshots only occur when the app is in focus. AGAIN, to be deployed --- simpliplay/main.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/simpliplay/main.js b/simpliplay/main.js index 6606495..59dcc27 100644 --- a/simpliplay/main.js +++ b/simpliplay/main.js @@ -149,7 +149,15 @@ const setupShortcuts = () => { }); }); - globalShortcut.register('CommandOrControl+Shift+S', takeSnapshot); + globalShortcut.register('CommandOrControl+S', () => { + const focusedWindow = BrowserWindow.getFocusedWindow(); // Get the currently focused window + + if (!focusedWindow) return; // Do nothing if no window is focused + + takeSnapshot + }); + + // globalShortcut.register('CommandOrControl+Shift+S', takeSnapshot); }; // App lifecycle management