@shuk/shortcut-manager
v0.0.3
Published
## [Demo](https://svelte-key-sequence.surge.sh/)
Maintainers
Readme
Svelte Key Sequence Capture
Demo
npm i svelte-key-sequence-capturer
Types
type KeyCode = {
[prop: string]: {
code: string | string[];
symbol: string;
}
}
interface Shortcut {
title: string | () => string;
sequence: KeyCode[];
fn: () => void;
escaped?: () => boolean;
}API
Inputs:
permanents: Shortcut[];
helper: boolean // show window
strict: boolean // show window only if a key is pressedA pre-made Keys lib is also exported
Future
- Usage based attaching/detaching of scoped shortcuts
