Skip to content

Library fixes, fuller docs and site polish - #1

Merged
0xdhrv merged 28 commits into
mainfrom
docs-site-and-parser-fixes
Nov 11, 2026
Merged

0xdhrv merged 28 commits into
mainfrom
docs-site-and-parser-fixes

Conversation

@0xdhrv

@0xdhrv 0xdhrv commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Library fixes, docs that match what the library does, and site polish. Each commit stands on its own.

Library

  • Regex keys containing + work. "(F\\d+)", "([a-z]+)" and "$mod+(Digit[0-9]+)" passed the type check but threw "unknown modifier" at runtime, because the parser split on the regex's own +. A press ending in (…) is now read as one regex. Parse speed is unchanged (the regex is tried only when the press ends with )).
  • Listeners on a menu, listbox or tablist get their arrow keys. The default ignore dropped plain arrows inside those widgets even when the listener sat on the widget itself, so a component couldn't own its own arrows without a custom ignore.
  • formatKeybinding formats $mod for the apple option. formatKeybinding("$mod+k", { apple: false }) returned "Win+K" on a Mac; it now returns "Ctrl+K".
  • useKeybindings resubscribes when a ref target mounts or changes after the first render. Before, bindings on a conditionally rendered element never attached.
  • React is declared as an optional peer dependency (>=18). peerDependenciesMeta listed it with no matching peerDependencies, which strict package managers reject.

Docs

  • New sections: exclusive scopes, recording shortcuts (with a live recorder), React hooks, keyboard layouts, and which binding wins when a key also starts a sequence.
  • The ignore description now says what's actually skipped ($mod combos and Escape still fire in inputs), and the options table lists exclusive.
  • site/public/docs.md mirrors every change. The README uses pnpm for dev setup (npm fails on workspace:*).

Site

  • Keycaps are prerendered for both platforms and picked before paint, so Mac visitors no longer see "Ctrl K" before JS loads.
  • Tabs move with arrow keys, Home and End (dogfooding microkeys). The palette demo announces the highlighted command to screen readers.
  • The Copy button no longer covers code on narrow screens.
  • Unknown addresses get a 404 page (not_found_handling: "404-page").
  • Key sounds keep working after a ⌘ shortcut on macOS and now play on /docs/ too. The Konami confetti is skipped under reduced motion. Skipped view transitions no longer log errors.
  • The tests page pauses its own shortcuts while the live tape is open.

Tooling

  • wrangler.jsonc is formatted (it was failing pnpm check and therefore prepublishOnly) and has a previews block, which wrangler preview builds require.
  • New check.yml workflow runs pnpm check and the site build on pushes to main and on PRs.

Verification

  • pnpm check passes with no warnings: 97 unit tests (each new test fails without its fix), typecheck and lint.
  • pnpm site:build passes, and the browser test page passes 42/42.
  • Site changes were checked in the browser, including at 375px width. The 404 page was checked with wrangler dev.

Not in this PR

npm still serves 0.1.0 because the v0.1.1 publish failed with ENEEDAUTH. The footer still shows v0.1.0.

@0xdhrv 0xdhrv changed the title style: format wrangler.jsonc Library fixes, fuller docs and site polish Nov 11, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://docs-site-and-parser-fixes-microkeys.dhrvs.workers.dev (commit 07d1dee)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Failed ❌

View logs ↗
baeef68 2026-11-11T13:51:36.010Z View logs ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://feaff3d9-microkeys.dhrvs.workers.dev 07d1dee 2026-11-11T15:13:51.128Z Visit the dashboard ↗

@0xdhrv
0xdhrv merged commit 598d337 into main Nov 11, 2026
2 checks passed
@0xdhrv
0xdhrv deleted the docs-site-and-parser-fixes branch November 11, 2026 15:26
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