Compare commits

...

3 Commits

Author SHA1 Message Date
muwoo
a546bc0d59
Update package.json 2025-07-25 18:40:09 +08:00
muwoo
c732e448c3
Merge pull request #449 from siriusol/master
fix #448
2025-07-25 18:39:43 +08:00
Ther
fbc7da0606 fix #448 2025-07-25 18:24:52 +08:00
2 changed files with 9 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "rubick", "name": "rubick",
"version": "4.3.4", "version": "4.3.5",
"author": "muwoo <2424880409@qq.com>", "author": "muwoo <2424880409@qq.com>",
"private": true, "private": true,
"scripts": { "scripts": {

View File

@ -110,9 +110,14 @@ const registerHotKey = (mainWindow: BrowserWindow): void => {
// mainWindow.show(); // mainWindow.show();
}); });
globalShortcut.register('CommandOrControl+W', () => { // 添加局部快捷键监听
if (mainWindow && !mainWindow.isDestroyed() && mainWindow.isFocused()) { mainWindow.webContents.on('before-input-event', (event, input) => {
mainWindow.hide(); if (input.key.toLowerCase() === 'w'
&& (input.control || input.meta) && !input.alt && !input.shift) {
event.preventDefault();
if (mainWindow && !mainWindow.isDestroyed()) {
mainWindow.hide();
}
} }
}); });