mirror of
https://github.com/rubickCenter/rubick
synced 2026-03-06 13:53:40 +08:00
Compare commits
5 Commits
v4.3.4
...
dc54b25f84
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dc54b25f84 | ||
|
|
fc51a383bf | ||
|
|
a546bc0d59 | ||
|
|
c732e448c3 | ||
|
|
fbc7da0606 |
@@ -42,7 +42,7 @@
|
||||
"eslint-plugin-prettier": "^3.3.1",
|
||||
"eslint-plugin-vue": "^7.0.0",
|
||||
"less": "^4.1.3",
|
||||
"less-loader": "5.0.0",
|
||||
"less-loader": "^6.2.0",
|
||||
"prettier": "^2.2.1",
|
||||
"typescript": "~4.1.5"
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "rubick",
|
||||
"version": "4.3.4",
|
||||
"version": "4.3.5",
|
||||
"author": "muwoo <2424880409@qq.com>",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
||||
@@ -110,9 +110,14 @@ const registerHotKey = (mainWindow: BrowserWindow): void => {
|
||||
// mainWindow.show();
|
||||
});
|
||||
|
||||
globalShortcut.register('CommandOrControl+W', () => {
|
||||
if (mainWindow && !mainWindow.isDestroyed() && mainWindow.isFocused()) {
|
||||
mainWindow.hide();
|
||||
// 添加局部快捷键监听
|
||||
mainWindow.webContents.on('before-input-event', (event, input) => {
|
||||
if (input.key.toLowerCase() === 'w'
|
||||
&& (input.control || input.meta) && !input.alt && !input.shift) {
|
||||
event.preventDefault();
|
||||
if (mainWindow && !mainWindow.isDestroyed()) {
|
||||
mainWindow.hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user