+
+
+
+ {#each actions as actionId}
+ {@const {icon, id, code} = KEYMAP_CODES[actionId] ?? {code: actionId}}
+ {#if !icon && id?.length === 1}
+
{id}
{:else}
-
{action}
+
{icon ?? id ?? `0x${code.toString(16)}`}
{/if}
{/each}
-
-
+
diff --git a/src/lib/components/action-extension.ts b/src/lib/components/action-extension.ts
index e69de29b..da403250 100644
--- a/src/lib/components/action-extension.ts
+++ b/src/lib/components/action-extension.ts
@@ -0,0 +1,8 @@
+import {Extension, Node} from "@tiptap/core"
+
+const CharaAction = Node.create({
+ name: "Action",
+ renderHTML({HTMLAttributes}) {
+ return ["kbd", HTMLAttributes, 0]
+ },
+})
diff --git a/src/lib/components/layout/ActionSelector.svelte b/src/lib/components/layout/ActionSelector.svelte
index c49c8aa8..8da7efe4 100644
--- a/src/lib/components/layout/ActionSelector.svelte
+++ b/src/lib/components/layout/ActionSelector.svelte
@@ -6,9 +6,8 @@
import ActionListItem from "$lib/components/ActionListItem.svelte"
import LL from "../../../i18n/i18n-svelte"
import {action} from "$lib/title"
- import type {KeymapCategory} from "$lib/assets/keymaps/keymap"
- export let currentAction: number
+ export let currentAction: number | undefined = undefined
const index = new Index({tokenize: "full"})
for (const action of Object.values(KEYMAP_CODES)) {
@@ -117,10 +116,12 @@
>
{/each}
-