修复Linux下无法ctrl+a全选的问题

pull/277/head
lyswhut 2020-06-20 15:32:39 +08:00
parent f0dc76c7a4
commit 2424c76c50
1 changed files with 5 additions and 5 deletions

View File

@ -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('+')