From 18fcc48046b76d42bff2e064de2ff5f19f04befe Mon Sep 17 00:00:00 2001 From: storybored379 Date: Sat, 3 Oct 2026 23:36:10 -0700 Subject: [PATCH] Shortcuts: don't bind macOS-only Ctrl+Cmd shortcuts off macOS Off macOS `Cmd` maps to Ctrl, so Enter Full Screen's Ctrl+Cmd+F parsed to the same keys as Find's Cmd+F and both commands were bound to Ctrl+F (ui_and_menu_shortcuts_do_not_collide fails on Linux and Windows). Shortcuts that use both Ctrl and Cmd can't be typed distinctly there, so they are skipped when the key bindings are built off macOS. Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/src/menus.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/ui-egui/src/menus.rs b/crates/ui-egui/src/menus.rs index 1dfb54d3..25f33b1c 100644 --- a/crates/ui-egui/src/menus.rs +++ b/crates/ui-egui/src/menus.rs @@ -1182,6 +1182,11 @@ pub type Binding = (egui::Modifiers, egui::Key, String, Value); pub fn bindings(session: &effectcraft_engine::Session) -> Vec { let mut v: Vec = Vec::new(); for (sc, b) in session.shortcuts().bindings() { + // Off macOS `Cmd` is Ctrl, so a Ctrl+Cmd shortcut (Enter Full Screen's Ctrl+Cmd+F) would + // steal the plain Cmd one (Find's Cmd+F): such macOS-only shortcuts aren't bound there. + if !cfg!(target_os = "macos") && sc.split('+').any(|p| p == "Ctrl") && sc.split('+').any(|p| p == "Cmd") { + continue; + } if let Some((m, k)) = parse_shortcut(sc) { if m.shift && let Some(alias) = shifted_alias(k)