@svelte-put/shortcut
4.1.0 • Public • PublishedThis package is part of the@svelte-put family. For contributing guideline and more, refer to itsreadme.
See the dedicated documentation page here.
<scriptlang="ts">import{shortcut,typeShortcutEventDetail}from'@svelte-put/shortcut';functionhandleK(detail:ShortcutEventDetail){console.log('attached node:',detail.node);console.log('original trigger config:',detail.trigger);}</script><svelte:windowuse:shortcut={{trigger:{key: 'k', modifier: ['ctrl', 'meta'], callback: handleK, }, }}/>
Provenance
Share feedback
Package Sidebar
Install
npm i @svelte-put/shortcut
Repository
Weekly Downloads
34,568
Version
4.1.0
License
MIT
Unpacked Size
24 kB
Total Files
9