Merge pull request #438 from siriusol/master

fix issues #437
This commit is contained in:
muwoo 2025-07-17 20:56:14 +08:00 committed by GitHub
commit 3f03e5578e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -93,6 +93,12 @@ const registerHotKey = (mainWindow: BrowserWindow): void => {
// mainWindow.show(); // mainWindow.show();
}); });
globalShortcut.register('CommandOrControl+W', () => {
if (mainWindow && !mainWindow.isDestroyed() && mainWindow.isFocused()) {
mainWindow.hide();
}
});
// 注册自定义全局快捷键 // 注册自定义全局快捷键
config.global.forEach((sc) => { config.global.forEach((sc) => {
if (!sc.key || !sc.value) return; if (!sc.key || !sc.value) return;