diff --git a/ts/lib/tslib/shortcuts.ts b/ts/lib/tslib/shortcuts.ts index 0cb0b2f2d..6e7061798 100644 --- a/ts/lib/tslib/shortcuts.ts +++ b/ts/lib/tslib/shortcuts.ts @@ -34,7 +34,10 @@ const keyCodeLookup = { ".": 190, "/": 191, "`": 192, -}; + "!": 49, + "*": 56, + "@": 50, +} as const; function isRequiredModifier(modifier: string): boolean { return !modifier.endsWith("?"); @@ -113,6 +116,7 @@ function keyCombinationToCheck( keyCombination.slice(0, -1), ); + console.log({ keyCode, required, optional }); return check(keyCode, required, optional); } diff --git a/ts/routes/reviewer/reviewer-bottom/More.svelte b/ts/routes/reviewer/reviewer-bottom/More.svelte index 5220a9a02..8b82b228f 100644 --- a/ts/routes/reviewer/reviewer-bottom/More.svelte +++ b/ts/routes/reviewer/reviewer-bottom/More.svelte @@ -9,6 +9,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html import { setFlag } from "@generated/backend"; import type { ReviewerState } from "../reviewer"; import type { MoreMenuItemInfo } from "./types"; + import Shortcut from "$lib/components/Shortcut.svelte"; let showFloating = false; let showFlags = false; @@ -114,8 +115,30 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html setFlag({ cardIds: [card!.id], flag: index }); $cardData!.queue!.cards[0].card!.flags = index; } + + function prepKeycodeForShortcut(keycode: string) { + return keycode.replace("Ctrl", "Control"); + } +{#each shortcuts as shortcut} + {#if shortcut !== "hr"} + + {/if} +{/each} + +{#each flags as flag, i} + changeFlag(i + 1)} + /> +{/each} +