Skip to content
Source
Sign inSign up
pingdotgg/t3code

Render shortcuts with Apple's modifier and key glyphs #4701

Closedcolonelpanic8(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/4701/headopened View on GitHub

What

Shortcut labels spelled modifiers out on Linux and Windows (Ctrl+Shift+E) while already using Apple's glyphs on macOS. This uses one representation everywhere.

Linux / WindowsmacOS
mod+shift+e⌃⇧E⇧⌘E
mod+alt+k⌃⌥K⌥⌘K
mod+backspace⌃⌫⌘⌫
mod+escape⌃⎋⌘⎋

⌃⌥⇧ for control, option and shift on every platform, ⌘ for command on macOS, in Apple's canonical order with no separators.

Details

  • Key glyphs too, not just modifiers: ⎋ ⇥ ⏎ ⌫ ⌦ ␣ ↑ ↓ ← → ⇞ ⇟ ↖ ↘. Keys with no established glyph — function keys, punctuation — keep their word, so mod+f1 stays ⌃F1.
  • A non-mac meta/super key stays Super. Apple has no glyph for it, and borrowing ⌘ would be a lie about which key to press.
  • The keybindings settings table rendered each token as its own chip through a separate platform conditional, which had already drifted from the label formatter — it showed Ctrl beside ⇧ in the same row. It now shares one formatShortcutTokenLabel, so the two can't disagree again.

Screenshots

The keybindings settings table, whose per-token chips now share the same formatter (previously Ctrl beside ⇧ in one row):

Keybindings settings table with Apple glyphs

The composer's hold-modifier keycaps from #4271, which is what the width buys:

Composer keycaps showing full chords

Why

Consistency across platforms, and horizontal space in every chip and keycap that shows a shortcut. ⌃⇧E is roughly a third the width of Ctrl+Shift+E, which is what makes the composer's hold-modifier keycaps in #4271 fit inside a control's disclosure-chevron slot instead of needing their own row.

Affected surfaces: command palette, sidebar chips, terminal tooltips, keybindings settings, and the composer hints in #4271.

Tests

Updated the label expectations in apps/web/src/keybindings.test.ts and added coverage for key glyphs, the word fallback for keys without one, and the token formatter including the non-mac meta case. Typecheck, lint, and the apps/web suite pass (1606 tests).

🤖 Generated with Claude Code


Note

Low Risk Display-only changes to shortcut formatting; key matching behavior is unchanged.

Overview Shortcut labels now use Apple-style modifier and key glyphs everywhere, not word forms like Ctrl+Shift+D on Linux/Windows. Chords are shown in canonical order with no + separators (e.g. ⌃⇧D on non-mac, ⇧⌘D on macOS).

formatShortcutLabel in keybindings.ts is reworked around a SHORTCUT_KEY_SYMBOLS map (escape, tab, arrows, etc.) and glyph modifiers. Non-mac Super/meta still renders as the word Super with + when there is no Apple glyph. A new formatShortcutTokenLabel maps raw binding tokens for chip-style UI.

Keybindings settings KeybindingPill drops inline platform conditionals and calls formatShortcutTokenLabel so the table matches other shortcut surfaces. Tests in keybindings.test.ts are updated and extended for glyphs, tokens, and the Super edge case.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 0975c27145b75db359ff58726ff67e1b33e1a56d. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Render keyboard shortcuts with Apple modifier and key glyphs across all platforms

  • Replaces word-based modifier labels (e.g. Ctrl, Shift) with Apple-style glyphs (⌃, ⇧, ⌘, ⌥) in shortcut displays on all platforms, including non-mac.
  • Adds SHORTCUT_KEY_SYMBOLS map and formatShortcutTokenLabel in keybindings.ts to convert individual tokens to glyphs; refactors formatShortcutLabel to concatenate glyphs without separators.
  • Updates KeybindingPill in KeybindingsSettings.tsx to use formatShortcutTokenLabel instead of manual platform checks.
  • Behavioral Change: On non-mac, meta key renders as Super with + separators (e.g. ⌃⇧+Super+K); all other modifiers use glyphs with no separators.
Macroscope summarized 0975c27.
    1. coderabbitai[bot](GitHub profile, opens in a new tab)commented

      Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: 07a894d4-c875-4170-ae7b-b3f2d46fe73b

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review
      ✨ Finishing Touches
      🧪 Generate unit tests (beta)
      • Create PR with unit tests

      Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

      ❤️ Share
      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

      Fix All in Cursor ❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the [Cursor dashboard](https://www.cursor.com/dashboard/bugbot). Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit f21f7458556cd0146d7ea633ddf1887f235270c5. Configure [here](https://www.cursor.com/dashboard/bugbot).
    4. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Approved

      This PR changes keyboard shortcut display formatting to use Apple-style glyphs (⌘, ⌃, ⇧) instead of text labels. The change is purely cosmetic presentation - no keyboard behavior changes. Logic is centralized into well-tested utility functions.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    5. Note

      🤖 GPT-5.6 Sol responding on behalf of Theo

      Closing this PR after an automated pass over open pull requests. Current keyboard shortcut formatting already renders Apple modifier symbols.

Sign in to join this conversation.