Skip to content

fix(ui): replace hardcoded ⌘/Option symbols with platform-aware labels#359

Merged
silverstein merged 1 commit into
silverstein:mainfrom
maosuarez:fix/windows-macos-symbols
Jun 25, 2026
Merged

fix(ui): replace hardcoded ⌘/Option symbols with platform-aware labels#359
silverstein merged 1 commit into
silverstein:mainfrom
maosuarez:fix/windows-macos-symbols

Conversation

@maosuarez

@maosuarez maosuarez commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replaces hardcoded macOS keyboard symbols (⌘, Option, "Cmd") with platform-aware
    equivalents so Windows and Linux users see Ctrl/Alt instead.
  • macOS behaviour and appearance are completely unchanged — all fixes are
    behind an isMac guard derived from the existing data-platform attribute.

Fixes #353.

Changes

  • Added const isMac reusing the data-platform attribute already set in <head> — no new platform detection logic.
  • Settings button tooltip: removed static title attr from HTML; set via JS as Settings (⌘,) on macOS or Settings (Ctrl+,) elsewhere.
  • Settings keyboard shortcut (functional bug): was e.metaKey only (broken on Windows); now isMac ? e.metaKey : e.ctrlKey so Ctrl+, actually opens Settings.
  • Shortcut-select dropdown labels: on non-macOS, rewrites .shortcut-select option text replacing Cmd→Ctrl and Option→Alt. value attributes are untouched (the Tauri backend already uses CmdOrCtrl there).
  • shortcutDisplayLabel(): added if (isMac) branch; non-Mac path formats as Ctrl+Shift+Space (with + separator) instead of ⌘ Shift Space.

Notes

External contributor on Windows 11. Tested Windows behaviour locally. The isMac
constant mirrors the same navigator.platform check already at lines 9-10 of the
inline <head> script, so no new platform detection logic is introduced.

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>
@vercel

vercel Bot commented Jun 25, 2026

Copy link
Copy Markdown

@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.

@silverstein silverstein merged commit 42cd435 into silverstein:main Jun 25, 2026
14 of 15 checks passed
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.

Windows: macOS keyboard glyphs (⌘/⌥) and "Cmd/Option" labels shown in the desktop UI

2 participants