feat(client): show key hints (button key combo) under labels - #94
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a per-device Show key hints toggle that renders the keyboard combo a button sends (its
action.key, or a macro's firstkeystep) 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
Show key hints, default off), persisted tolocalStorage(deckd.showKeyHints) with?showKeyHints=1URL override — same precedence as other client prefs.keyHint()/prettifyCombo()inButtonGrid.tsx;.key-hintcaption styled smaller/dimmer/monospace, scaling with--content-scale/--label-scale.KeyHintsLadle story.Verification
tsc --noEmitclean; 142 unit tests pass; lint clean (2 pre-existing errors onmainunrelated).Refs #93 (kept as
Refs, notCloses, since #93 ishuman-verification-required— a human should verify on a real surface before closing).🤖 Generated with Claude Code