diff --git a/OpenRA.Mods.Common/Widgets/Logic/Editor/MapEditorLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/Editor/MapEditorLogic.cs index 5dce26be69..fd60faa1f2 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/Editor/MapEditorLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/Editor/MapEditorLogic.cs @@ -88,6 +88,16 @@ namespace OpenRA.Mods.Common.Widgets.Logic var copypasteButton = widget.GetOrNull("COPYPASTE_BUTTON"); if (copypasteButton != null) { + // HACK: Replace Ctrl with Cmd on macOS + // TODO: Add platform-specific override support to HotkeyManager + // and then port the editor hotkeys to this system. + var copyPasteKey = copypasteButton.Key.GetValue(); + if (Platform.CurrentPlatform == PlatformType.OSX && copyPasteKey.Modifiers.HasModifier(Modifiers.Ctrl)) + { + var modified = new Hotkey(copyPasteKey.Key, copyPasteKey.Modifiers & ~Modifiers.Ctrl | Modifiers.Meta); + copypasteButton.Key = FieldLoader.GetValue("Key", modified.ToString()); + } + copypasteButton.OnClick = () => editorViewport.SetBrush(new EditorCopyPasteBrush(editorViewport, worldRenderer, () => copyFilters)); copypasteButton.IsHighlighted = () => editorViewport.CurrentBrush is EditorCopyPasteBrush; }