Releases: metonym/svelte-focus-key
Releases · metonym/svelte-focus-key
v1.0.0
- support combination of keys (e.g.,
key="Meta+k"
) (4d59ee3) - use strict equality check for element to focus (4d59ee3)
Combo keys should be delimited by a +
symbol.
<script>
import FocusKey from "svelte-focus-key";
let element;
</script>
<input bind:this={element} placeholder={'Press "⌘+k" to focus'} />
<FocusKey {element} key="Meta+k" />
v0.3.2
v0.3.1
focusKey
action should reflect updated actions
<script>
import { focusKey } from "svelte-focus-key";
let selectText = false;
let key = "k";
let value = "text";
</script>
<input
use:focusKey={{ key, selectText }}
placeholder={'Press "k" to focus'}
bind:value
/>
<button
on:click={() => {
key = key === "/" ? "k" : "/";
selectText = !selectText;
}}
>
Update options
</button>
v0.3.0
v0.2.4
v0.2.3
v0.2.2
v0.2.1
v0.2.0
v0.1.1
- remove
update
key fromfocus-key.d.ts
Full Changelog: v0.1.0...v0.1.1