parent
fd11c4f323
commit
f6544852d0
@ -1,13 +1,10 @@
|
||||
import { inject } from 'vue'
|
||||
const mousetrap = inject('mousetrap') as any
|
||||
const commonKeyDown = (keyCode: number) => {
|
||||
document.dispatchEvent(new KeyboardEvent('keydown', { keyCode }));
|
||||
}
|
||||
const c = () => {
|
||||
commonKeyDown(27)
|
||||
}
|
||||
|
||||
const initBind = () => {
|
||||
const initBind = (mousetrap) => {
|
||||
mousetrap.bind('c', c)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in new issue