Compare commits

..

No commits in common. "a546bc0d590804c9a435aeb483cd4424ba9e4873" and "6315ec12ae53a317ed13a1db26ed3f61500a77c6" have entirely different histories.

2 changed files with 4 additions and 9 deletions

View File

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

View File

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