Skip to content

feat(keymap): align rows like a physical board and recolor shift cue - #22

Merged
narze merged 2 commits into
mainfrom
keymap-physical-layout
Jun 13, 2026
Merged

feat(keymap): align rows like a physical board and recolor shift cue#22
narze merged 2 commits into
mainfrom
keymap-physical-layout

Conversation

@narze

@narze narze commented Jun 13, 2026

Copy link
Copy Markdown
Member

What

Polishes the on-screen Manoonchai keymap so it reads like a real staggered keyboard, and gives the Shift cue its own color.

  • Uniform keys / column alignment — the board is now a size container and each key is sized in cqw off the board width, so keys are identical across all three rows at every viewport.
  • Placeholder modifier keys — added non-functional Tab, Caps Lock, and Enter caps; all side caps flex-grow equally so both the left and right edges line up and the Shift keys are stretched.
  • Physical stagger — staggering now comes from the modifier widths (Tab < Caps < Shift), giving top→home a 0.25u offset and home→bottom an exact half-key pitch.
  • Shift recolor — the shift highlight no longer borrows the orange --accent; it uses a dedicated violet --shift color (+ a .glow-shift utility) in both light and dark themes.

Why

  • The rows overflowed the fixed-width container, so flex-shrink resized keys per-row — the 11-key home row stayed wide while the 13- and 12-key rows shrank. The unequal widths accumulated drift, so e.g. sat over instead of .
  • The bottom row led with an oversized 1.6u SHIFT cap, pushing its keys past the natural half-key stagger (so wasn't centered between and ).
  • --accent is the terracotta "achievement" color reserved for the drill-climax Net WPM readout (number + chart line); reusing it for Shift muddied that meaning.

Reviewer notes

  • The cqw divisor 16.25 is chosen so that, with the side caps flex-growing equally to fill each row, the top→home stagger lands at exactly 0.25u (home→bottom is half-pitch regardless of the divisor). See the comment in Keymap.svelte.
  • --shift is a new semantic token; --accent is intentionally left in place for WpmChart and DrillSummary.
  • Verified live (desktop + 375px mobile): keys uniform, both edges flush, / centered on their home-row midpoints, no horizontal overflow, and the shift highlight renders violet in both themes.

🤖 Generated with Claude Code

The on-screen keymap had three issues. Rows overflowed the fixed-width
container, so flex-shrink resized keys per-row (home row stayed wide while
the 13- and 12-key rows shrank), making columns drift out of alignment.
The bottom row also led with an oversized SHIFT cap, pushing its keys past
the natural half-key stagger. And the shift highlight reused the orange
"achievement" accent that's reserved for the drill-climax Net WPM readout.

- Size the board as a container and derive key width in cqw, so every key
  is identical across rows at any viewport and columns never drift.
- Add placeholder Tab / Caps Lock / Enter caps and let all side caps
  flex-grow equally, so both edges line up and the modifier widths produce
  a true physical-keyboard stagger (top->home 0.25u, home->bottom half-pitch).
- Introduce a dedicated violet --shift color (+ .glow-shift) for the shift
  highlight, freeing the orange accent for its intended climax role.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
learn-manoonchai Ready Ready Preview, Comment Jun 13, 2026 6:35am

Request Review

The shift caps now use the natural-case label "Shift" (uppercased via CSS)
instead of the literal "SHIFT", so the indicator assertion was failing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@narze
narze merged commit d56e85e into main Jun 13, 2026
3 checks passed
@narze
narze deleted the keymap-physical-layout branch June 13, 2026 08:43
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