fix(desktop): spell keyboard shortcut labels per platform - #3887
Open
riba2534 wants to merge 4 commits into
Open
fix(desktop): spell keyboard shortcut labels per platform#3887riba2534 wants to merge 4 commits into
riba2534 wants to merge 4 commits into
Conversation
6 tasks
M4n5ter
force-pushed
the
cursor/desktop-platform-aware-shortcut-labels-d7d5
branch
from
August 26, 2026 09:25
a137005 to
3ba2395
Compare
Shortcut BINDINGS were already cross-platform: every entry is registered as `mod`, which Astryx resolves to Command on macOS and Control everywhere else, so Ctrl+N has always created a task on Windows. The LABELS were written once, in macOS glyphs, and shown to everyone — the rail's new-task row read `⌘ N`, the palette hints read `⌘,` / `⌥⌘S` / `⇧⌘D`, and the shortcuts sheet was authored with a literal `⌘`. Adds a single owner for how a shortcut is spelled (`formatShortcut` in @maka/ui), keyed on the host OS the main process reports and published through HostPlatformProvider. The locale catalogs now carry neutral tokens (`mod`, `shift`, `alt`) instead of glyphs, since a shortcut is not localized — only the platform varies. No binding changes. Astryx's Kbd resolves `mod` but spells ctrl/alt/shift with Apple glyphs on every platform, so chips that carry a modifier are now product-drawn from the same theme tokens; Kbd stays where the keys are identical everywhere (the palette footer's arrows, Enter and Esc). Closes apache#3876
The bug in apache#3876 was that only one platform's spelling had ever been checked, so these read the real locale catalogs through the real formatter — the same call the shortcuts sheet and the palette make — on all three platforms. Two of them are regression fences rather than examples: no palette hint may carry an Apple modifier glyph off macOS, and no sheet row may be authored with one at all, since a row that arrives already spelled has no platform left to answer to.
M4n5ter
force-pushed
the
cursor/desktop-platform-aware-shortcut-labels-d7d5
branch
from
August 26, 2026 09:58
3ba2395 to
827a056
Compare
The platform-aware shortcut label work added shortcut-keys.tsx, its stylesheet and host-platform-context.tsx, so the generated surface inventory no longer matched disk and the coverage gate failed.
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.
Fixes #3876.
Shortcut bindings are already cross-platform (mod to Cmd on macOS, Ctrl elsewhere). The labels were hard-coded as macOS glyphs, so Windows/Linux showed Cmd-N instead of Ctrl-N.
This adds a platform-aware formatter keyed on app.info().platform. Locale catalogs now use neutral tokens (mod, shift, alt). Bindings are unchanged.
AI use: generative tooling made a substantive contribution.