From 2424c76c50112e5d25351fed437dbe0bab47287f Mon Sep 17 00:00:00 2001 From: lyswhut Date: Sat, 20 Jun 2020 15:32:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DLinux=E4=B8=8B=E6=97=A0?= =?UTF-8?q?=E6=B3=95ctrl+a=E5=85=A8=E9=80=89=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/utils/keyBind.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/renderer/utils/keyBind.js b/src/renderer/utils/keyBind.js index 9b33b112..5210f68d 100644 --- a/src/renderer/utils/keyBind.js +++ b/src/renderer/utils/keyBind.js @@ -1,14 +1,14 @@ -import { isMac, isWin } from '../../common/utils' +import { isMac } from '../../common/utils' const downKeys = new Set() const handleEvent = (type, event, keys) => { - if (isWin) { - let index = keys.indexOf('ctrl') - if (index > -1) keys.splice(index, 1, 'mod') - } else if (isMac) { + if (isMac) { let index = keys.indexOf('meta') if (index > -1) keys.splice(index, 1, 'mod') + } else { + let index = keys.indexOf('ctrl') + if (index > -1) keys.splice(index, 1, 'mod') } let key = keys.join('+')