fix(keymap): render the primary modifier as Cmd on macOS - #67
Merged
Conversation
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>
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 the macOS CI failure on
mainafter #62 merged.The bug
KeystrokeStyle::Wordsrendered a platform-modifier keystroke asSuper+on macOS — the Linux name for that key — sosecondary-shift-rdisplayed asSuper+Shift+Rrather thanCmd+Shift+R.modifier_namehad 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 whatsecondary-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 warningsandcargo 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