Skip to content

feat(client): show key hints (button key combo) under labels - #94

Merged
jonocodes merged 3 commits into
mainfrom
feat/button-key-hints
Jul 31, 2026
Merged

feat(client): show key hints (button key combo) under labels#94
jonocodes merged 3 commits into
mainfrom
feat/button-key-hints

Conversation

@jonocodes

Copy link
Copy Markdown
Owner

Adds a per-device Show key hints toggle that renders the keyboard combo a button sends (its action.key, or a macro's first key step) as a small dimmed monospace caption under the label, e.g. Ctrl+A. Buttons whose action isn't a key combo (shell/url/dbus/launchers) show no hint.

What's included

  • Setting: Settings → display section (Show key hints, default off), persisted to localStorage (deckd.showKeyHints) with ?showKeyHints=1 URL override — same precedence as other client prefs.
  • Rendering: keyHint() / prettifyCombo() in ButtonGrid.tsx; .key-hint caption styled smaller/dimmer/monospace, scaling with --content-scale / --label-scale.
  • Demo + gallery: Firefox/YouTube/default fixtures carry real combos; Showcase stays combo-free to show the no-hint path; responsive gallery gains a key hints selector; new KeyHints Ladle story.
  • Docs: README settings list, URL params, and gallery description updated.

Verification

  • tsc --noEmit clean; 142 unit tests pass; lint clean (2 pre-existing errors on main unrelated).
  • Visually confirmed in the gallery across phone/tablet sizes with hints on.

Refs #93 (kept as Refs, not Closes, since #93 is human-verification-required — a human should verify on a real surface before closing).

🤖 Generated with Claude Code

jonocodes and others added 3 commits July 30, 2026 17:11
Shows the same 12 buttons reflowing across three surface sizes with a
banded (min/max) aspect-locked cell size. Illustrates the ordered-list
reflow model proposed in #92.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Records the decision to replace absolute [x,y,w,h] grid coordinates with
an ordered-list reflow model and a client-side min/max cell-size band.
Supersedes ADR-0004 (orientation transpose).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add a per-device "Show key hints" toggle that renders the key combo a
button sends (its action.key, or a macro's first key step) as a small
dimmed monospace caption under the label, e.g. Ctrl+A. Buttons whose
action isn't a key combo (shell/url/dbus/launchers) show no hint.

Persisted to localStorage (deckd.showKeyHints, default off) with the
usual ?showKeyHints=1 URL override. Demo fixtures (Firefox/YouTube/
default) carry real combos; the responsive gallery gains a key-hints
selector and there's a KeyHints Ladle story. README updated.

Refs #93

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jonocodes
jonocodes merged commit b016b83 into main Jul 31, 2026
2 checks passed
@jonocodes
jonocodes deleted the feat/button-key-hints branch July 31, 2026 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant