修复mac下只能全选一次的问题

This commit is contained in:
lyswhut
2020-05-01 20:02:18 +08:00
parent afc81b6308
commit 3be3b0ca36
5 changed files with 134 additions and 82 deletions
+6 -6
View File
@@ -4,27 +4,27 @@ let eventHub
const bindKey = () => {
mousetrap.reset()
mousetrap.bind('shift', (event, combo) => {
eventHub.$emit('shift_down', { event, combo })
eventHub.$emit('key_shift_down', { event, combo })
return false
}, 'keydown')
mousetrap.bind('shift', (event, combo) => {
eventHub.$emit('shift_up', { event, combo })
eventHub.$emit('key_shift_up', { event, combo })
return false
}, 'keyup')
mousetrap.bind('mod', (event, combo) => {
eventHub.$emit('mod_down', { event, combo })
eventHub.$emit('key_mod_down', { event, combo })
return false
}, 'keydown')
mousetrap.bind('mod', (event, combo) => {
eventHub.$emit('mod_up', { event, combo })
eventHub.$emit('key_mod_up', { event, combo })
return false
}, 'keyup')
mousetrap.bind('mod+a', (event, combo) => {
eventHub.$emit('mod+a_down', { event, combo })
eventHub.$emit('key_mod+a_down', { event, combo })
return false
}, 'keydown')
mousetrap.bind('mod+a', (event, combo) => {
eventHub.$emit('mod+a_up', { event, combo })
eventHub.$emit('key_mod+a_up', { event, combo })
return false
}, 'keyup')
}