Skip to content

selevt/svelte-gh-hotkey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

svelte-gh-hotkey

Simple Svelte action wrapping @github/hotkey taking care of the lifecycle.

Usage

use:hotkey={'j'} results in data-hotkey="j"

<script>
  import { hotkey } from "svelte-gh-hotkey";
  let count = 0;
</script>

<button on:click={() => count++} use:hotkey={'i'}>
    Press i to increment
</button>
{count}

Run example

Run on REPL

Run locally:

cd example
npm run dev

License

Distributed under the MIT license. See LICENSE for details.

About

Svelte action for @github/hotkey

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published