We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ac1dabc commit d85b620Copy full SHA for d85b620
src/lib/components/generic/KeyControls.svelte
@@ -1,10 +1,8 @@
1
<script>
2
import { KEY_CODES } from '$lib/config';
3
import { keyControlsContextKey } from '$lib/context';
4
- import throttle from 'just-throttle';
5
import { getContext } from 'svelte';
6
7
- export let limit = 0;
8
export let ctx = null;
9
10
const currentCtx = getContext(keyControlsContextKey);
@@ -15,7 +13,7 @@
15
13
if (mapping) mapping();
16
14
};
17
18
- $: eventHandler = limit ? throttle(key, limit) : key;
+ $: eventHandler = key;
19
</script>
20
21
<svelte:window on:keydown={eventHandler} />
0 commit comments