vue-hotkeys-hook

1.0.4 • Public • Published

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

Package Sidebar

Install

npm i vue-hotkeys-hook

Weekly Downloads

1

Version

1.0.4

License

MIT

Unpacked Size

3.19 kB

Total Files

4

Last publish

Collaborators

  • gshohat