fix(ui): replace hardcoded ⌘/Option symbols with platform-aware labels#359
Merged
silverstein merged 1 commit intoJun 25, 2026
Merged
Conversation
On Windows/Linux the UI was showing ⌘ and "Option/Cmd" labels that don't correspond to any physical key. Replace with Ctrl/Alt text on non-macOS by deriving an `isMac` constant from the existing `data-platform` attribute set in <head>. macOS behaviour is unchanged. - Settings tooltip: was hardcoded title="Settings (⌘,)" in HTML; now set via JS as ⌘, on macOS or Ctrl+, on Windows/Linux. - Settings keyboard shortcut: was e.metaKey only (broken on Windows); now isMac ? e.metaKey : e.ctrlKey so Ctrl+, actually opens Settings. - Shortcut-select dropdown labels: rewrite .shortcut-select option text on non-macOS (Cmd→Ctrl, Option→Alt). <option value> attributes are untouched. - shortcutDisplayLabel(): added isMac branch; non-Mac path formats as Ctrl+Shift+Space with + separator instead of ⌘ Shift Space. Fixes silverstein#353. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@maosuarez is attempting to deploy a commit to the evil genius laboratory Team on Vercel. A member of the Team first needs to authorize it. |
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.
Summary
equivalents so Windows and Linux users see Ctrl/Alt instead.
behind an
isMacguard derived from the existingdata-platformattribute.Fixes #353.
Changes
const isMacreusing thedata-platformattribute already set in<head>— no new platform detection logic.titleattr from HTML; set via JS asSettings (⌘,)on macOS orSettings (Ctrl+,)elsewhere.e.metaKeyonly (broken on Windows); nowisMac ? e.metaKey : e.ctrlKeysoCtrl+,actually opens Settings..shortcut-select optiontext replacingCmd→CtrlandOption→Alt.valueattributes are untouched (the Tauri backend already usesCmdOrCtrlthere).shortcutDisplayLabel(): addedif (isMac)branch; non-Mac path formats asCtrl+Shift+Space(with+separator) instead of⌘ Shift Space.Notes
External contributor on Windows 11. Tested Windows behaviour locally. The
isMacconstant mirrors the same
navigator.platformcheck already at lines 9-10 of theinline
<head>script, so no new platform detection logic is introduced.