@estrategiahq/vue-hotkey
v0.1.2
Published
Simple Vue hotkeys
Downloads
5
Readme
Vue Hotkey
Simple Vue Hotkey
We're using hotkey under the hood for now.
Install
npm install @estrategiahq/vue-hotkey
Setup
import Vue from 'vue'
import VueHotkey from '@estrategiahq/vue-hotkey'
Vue.use(VueHotkey, {
prevent: ['input', 'textarea'] // default configs
})
Using
// Register a binding
this.$VueHotkey.register('ctrl+a', (event) => {
// handle event
})
// Unregister a binding
this.$VueHotkey.unregister('ctrl+a')