Movatterモバイル変換


[0]ホーム

URL:


⚠️

Security Update: npm classic token creation is now disabled. Existing classic tokens will be revoked onNovember 19, 2025. Migrate to trusted publishing or granular access tokens to avoid disruption.Learn more.

@svelte-put/shortcut
TypeScript icon, indicating that this package has built-in type declarations

4.1.0 • Public • Published

npm.badgebundlephobia.badgedocs.badge

Svelte actionuse:shortcut - add event listener for keyboard shortcuts

svelte-put

This package is part of the@svelte-put family. For contributing guideline and more, refer to itsreadme.

Usage & Documentation

See the dedicated documentation page here.

Quick Start

<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

Weekly Downloads

34,568

Version

4.1.0

License

MIT

Unpacked Size

24 kB

Total Files

9

Last publish

Collaborators

  • vnphanquang

[8]ページ先頭

©2009-2025 Movatter.jp