初始化

This commit is contained in:
xiaoyi
2024-01-27 19:53:17 +08:00
commit 07dbe71c31
840 changed files with 119152 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
// shortcutManager.js
const { globalShortcut, BrowserWindow } = require('electron');
let isWindowVisible = true;
function registerShortcuts(mainWindow) {
globalShortcut.register('Ctrl+L', () => {
if (mainWindow && !mainWindow.isFullScreen()) {
if (isWindowVisible) {
mainWindow.hide();
} else {
mainWindow.show();
}
isWindowVisible = !isWindowVisible;
}
});
}
module.exports = { registerShortcuts };