From 49de9fe42bc880b0a27e57b9f931676162cd6e30 Mon Sep 17 00:00:00 2001 From: Masahiko AMANO Date: Thu, 11 Jun 2026 17:24:39 +0300 Subject: [PATCH] feat(frontend): global keyboard navigation and shortcuts help overlay MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a single window-level key dispatcher in the root layout: `g` then c/t/f/p/s (or the digits 1–5) jump between the five sections, honouring each section's remembered URL so you land back on the same filter and scroll. `?` toggles a shortcuts cheat-sheet overlay. The handler stays out of the way while typing in inputs or when a browser/OS modifier is held. This is the foundation for the per-context keymaps (grid, viewer, tag/filter pickers) that follow. Co-Authored-By: Claude Opus 4.8 --- .../lib/components/layout/KeyboardHelp.svelte | 192 ++++++++++++++++++ frontend/src/routes/+layout.svelte | 77 ++++++- 2 files changed, 268 insertions(+), 1 deletion(-) create mode 100644 frontend/src/lib/components/layout/KeyboardHelp.svelte diff --git a/frontend/src/lib/components/layout/KeyboardHelp.svelte b/frontend/src/lib/components/layout/KeyboardHelp.svelte new file mode 100644 index 0000000..b1880b1 --- /dev/null +++ b/frontend/src/lib/components/layout/KeyboardHelp.svelte @@ -0,0 +1,192 @@ + + + + + + + diff --git a/frontend/src/routes/+layout.svelte b/frontend/src/routes/+layout.svelte index 64bf64c..1621fc5 100644 --- a/frontend/src/routes/+layout.svelte +++ b/frontend/src/routes/+layout.svelte @@ -1,8 +1,9 @@ + + {@render children()} +{#if helpOpen} + (helpOpen = false)} /> +{/if} + {#if !isLogin && !isAdmin}