mirror of
https://github.com/rubickCenter/rubick
synced 2025-07-28 03:59:31 +08:00
Compare commits
3 Commits
6315ec12ae
...
a546bc0d59
Author | SHA1 | Date | |
---|---|---|---|
|
a546bc0d59 | ||
|
c732e448c3 | ||
|
fbc7da0606 |
@ -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": {
|
||||||
|
@ -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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user