Skip to content

Commit

Permalink
fix: 修复windows/linux没被禁用
Browse files Browse the repository at this point in the history
  • Loading branch information
Blore-lzn authored and Hyggge committed Jun 21, 2023
1 parent 8741b21 commit 488cc40
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/keybinding/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
})
Expand Down

0 comments on commit 488cc40

Please sign in to comment.