From 488cc40b467f4e40c6dc460094b20cd0c0a21241 Mon Sep 17 00:00:00 2001 From: Blore <1137480882@qq.com> Date: Wed, 21 Jun 2023 17:50:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dwindows/linux=E6=B2=A1?= =?UTF-8?q?=E8=A2=AB=E7=A6=81=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/keybinding/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/keybinding/index.js b/src/main/keybinding/index.js index 79692231..58f5e26f 100644 --- a/src/main/keybinding/index.js +++ b/src/main/keybinding/index.js @@ -66,8 +66,10 @@ class KeyBinding extends EventEmitter { registerKeyHandlers (win) { // macOS上菜单栏也会触发一次事件 if (!isOsx) { + const disabledAcceleratorId = ['edit.copy'] for (const [id, accelerator] of this._keys) { - if (accelerator && accelerator.length > 1) { + if (accelerator && accelerator.length > 1 && + disabledAcceleratorId.indexOf(id) === -1) { electronLocalshortcut.register(win, accelerator, () => { win.webContents.send('ficus::keyboard-event', { id }) })