Skip to content

Releases: metonym/svelte-keydown

v0.7.0

15 Mar 02:21
Compare
Choose a tag to compare

Breaking Changes

  • drop bundled UMD/ESM support; only publish uncompiled .svelte code
  • colocate TypeScript definitions with component source

Fixes

  • add exports field to package.json

v0.6.0

14 Feb 19:28
Compare
Choose a tag to compare

Features

  • add separator prop to customize the key between keys (c4a28e9, #17 contributed by @jkoking)

    <Keydown separator="+" on:combo={(e) => (combo = [...combo, e.detail])} />

v0.5.0

22 Jan 16:55
Compare
Choose a tag to compare

Features

  • forward keydown, keyup events to svelte:body

    <Keydown
      on:keydown={(e) => {
        if (e.key === " ") e.preventDefault();
      }}
      on:Space={(e) => {
        console.log("key", "Space");
      }}
    />

v0.4.1

22 Jan 02:57
Compare
Choose a tag to compare

Fixes

  • alias space (" ") as "Space" for the dynamic on:[Key] event

    <Keydown on:Space />

v0.4.0

26 Oct 16:22
Compare
Choose a tag to compare

Breaking Changes

  • use .svelte.d.ts extension for component TypeScript definition

v0.3.1

20 Jun 21:54
Compare
Choose a tag to compare

Fixes

  • do not reset combo if one or more keys are down

v0.3.0

10 Jun 14:14
Compare
Choose a tag to compare

Features

  • add pauseOnInput prop to prevent keydown capturing on input events (default is false)

v0.2.1

22 Dec 01:35
Compare
Choose a tag to compare

Fixes

  • add index type in TypeScript definitions for generic key events

v0.2.0

22 Dec 01:36
Compare
Choose a tag to compare

Features

  • add TypeScript definitions