From 488f9982ebf05be9bfe581489d0edc6e3918eec7 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Mon, 2 Nov 2026 05:16:38 -0500 Subject: [PATCH] Review fix for #2729: document the portable shortcut notation and the Mac-only override Co-Authored-By: Claude Opus 5.5 --- crates/engine/src/cmd.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/engine/src/cmd.rs b/crates/engine/src/cmd.rs index 1f5597a6f..f8c8d260f 100644 --- a/crates/engine/src/cmd.rs +++ b/crates/engine/src/cmd.rs @@ -40,7 +40,10 @@ pub struct CommandSpec { pub label: &'static str, /// Ribbon/menu placement, e.g. `["Home", "Font"]`. Empty = not in menus. pub menu: &'static [&'static str], + /// Portable notation: `Cmd` is ⌘ on macOS and Ctrl elsewhere. pub shortcut: Option<&'static str>, + /// macOS override when its key differs. Equal to `shortcut` marks a Mac-only shortcut + /// (Align Left/Center): other platforms show none. See [`CommandInfo::shortcut_for_platform`]. pub shortcut_mac: Option<&'static str>, pub params: &'static str, pub enabled: Enabled,