Skip to content

fix(keymap): render the primary modifier as Cmd on macOS - #67

Merged
noahbclarkson merged 1 commit into
mainfrom
fix/macos-primary-modifier-display
Aug 3, 2026
Merged

fix(keymap): render the primary modifier as Cmd on macOS#67
noahbclarkson merged 1 commit into
mainfrom
fix/macos-primary-modifier-display

Conversation

@noahbclarkson

Copy link
Copy Markdown
Owner

Fixes the macOS CI failure on main after #62 merged.

The bug

KeystrokeStyle::Words rendered a platform-modifier keystroke as Super+ on macOS — the Linux name for that key — so secondary-shift-r displayed as Super+Shift+R rather than Cmd+Shift+R. modifier_name had the same gap. This is the exact drift #61 was filed about, in the PR that set out to fix it.

Why it wasn't caught

The tests hard-coded Ctrl+..., which is only what secondary- resolves to off macOS — so they passed on Windows and Linux while asserting the wrong thing on macOS. Fork PRs never had workflow approval, so macOS CI first ran only after the merge.

Test expectations now derive the modifier from the platform. Bindings written as an explicit ctrl- still assert Control, because those stay Control everywhere — that distinction is what the previous blanket expectation lost.

Verification

cargo fmt --check, cargo clippy --workspace --all-targets -- -D warnings and cargo test --workspace (1146 passed) all clean locally on Windows. macOS is the case that matters here, so CI on this PR is the real check.

🤖 Generated with Claude Code

The word style spelled a platform-modifier keystroke "Super+" on macOS —
the Linux name for that key — so any surface asking for words rather than
glyphs advertised "Super+Shift+R" instead of "Cmd+Shift+R". That is the
same class of drift issue #61 was filed about.

The tests missed it because they asserted "Ctrl+..." unconditionally, which
is only what `secondary-` resolves to off macOS. They now derive the
expected modifier from the platform, so the macOS spelling is actually
pinned. Bindings written as an explicit `ctrl-` keep asserting Control, since
those stay Control everywhere.

Caught by CI on macos-14 after the keymap work merged; Windows and Linux
were green throughout, which is why this survived local verification.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@noahbclarkson
noahbclarkson merged commit d0d04ac into main Aug 3, 2026
3 checks passed
@noahbclarkson
noahbclarkson deleted the fix/macos-primary-modifier-display branch August 3, 2026 10:01
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