This commit is contained in:
Ther 2025-05-24 19:42:18 +08:00
parent 42aec3403a
commit 73cef1512c

View File

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