Review fix for #2729: document the portable shortcut notation and the Mac-only override

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas
2026-11-02 05:16:38 -05:00
co-authored by Claude Opus 5.5
parent c1bc0980ca
commit 488f9982eb
+3
View File
@@ -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,