refactor: how the keymap gets to the viewer

This commit is contained in:
2024-04-19 22:00:43 +02:00
parent e575974872
commit 1d203c687c
6 changed files with 26 additions and 15 deletions

View File

@@ -1,8 +1,8 @@
<script lang="ts">
import type { createKeyMap } from "$lib/helpers/createKeyMap";
import { getContext } from "svelte";
const { keys } = getContext<ReturnType<typeof createKeyMap>>("keymap");
export let keymap: ReturnType<typeof createKeyMap>;
const keys = keymap.keys;
</script>
<div class="wrapper">