1.0.4 • Published 2 years ago

vue-hotkeys-hook v1.0.4

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Vue Hotkeys Hook

NPM License

Lightweight Vue hook for using keyboard shortcuts in components in a declarative way < 5k 😎

hotkeys-hook

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 💫 connect@giladshohat.com

giladshohat.com