vue-hotkeys-hook
v1.0.4
Published
Vue hook for handling keyboard shortcuts
Downloads
6
Maintainers
Readme
Vue Hotkeys Hook
Lightweight Vue hook for using keyboard shortcuts in components in a declarative way < 5k 😎
Usage
npm i vue-hotkeys-hook
<script setup>
import {useHotkeys} from 'vue-hotkeys-hook';
import {ref} from 'vue';
const counter = ref(0);
useHotkeys('shift+g', () => {
counter.value++;
});
</script>
<template>
<div>
counter: {{counter}}
</div>
</template
Contact
Feel free to ping me 💫 [email protected]