From cc10c0de557f6306611c5c671a6fc2c0e18bb43a Mon Sep 17 00:00:00 2001 From: Ivan Shishkanov Date: Sat, 17 Oct 2026 16:13:47 +0300 Subject: [PATCH] M7: use native macOS paste modifiers in tests --- crates/ui-egui/src/paste_image_tests.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ui-egui/src/paste_image_tests.rs b/crates/ui-egui/src/paste_image_tests.rs index 48bd142e0..b6775f93a 100644 --- a/crates/ui-egui/src/paste_image_tests.rs +++ b/crates/ui-egui/src/paste_image_tests.rs @@ -163,7 +163,8 @@ impl Win { } } -const CMD: Modifiers = Modifiers::COMMAND.plus(Modifiers::CTRL); +// egui sets `command` for Cmd on macOS and for Ctrl elsewhere; macOS Ctrl is a separate key. +const CMD: Modifiers = if cfg!(target_os = "macos") { Modifiers::COMMAND } else { Modifiers::COMMAND.plus(Modifiers::CTRL) }; fn key(key: Key, pressed: bool, modifiers: Modifiers) -> Event { Event::Key { key, physical_key: Some(key), pressed, repeat: false, modifiers }