Index: binaries/data/mods/public/gui/credits/texts/programming.json =================================================================== --- binaries/data/mods/public/gui/credits/texts/programming.json +++ binaries/data/mods/public/gui/credits/texts/programming.json @@ -231,6 +231,7 @@ { "nick": "sathyam", "name": "Sathyam Vellal" }, { "nick": "sbirmi", "name": "Sharad Birmiwal" }, { "nick": "sbte", "name": "Sven Baars" }, + { "nick": "Schweini", "name": "Laurenz Reinthaler"}, { "nick": "scroogie", "name": "André Gemünd" }, { "nick": "scythetwirler", "name": "Casey X." }, { "nick": "serveurix" }, Index: binaries/data/mods/public/gui/options/options.js =================================================================== --- binaries/data/mods/public/gui/options/options.js +++ binaries/data/mods/public/gui/options/options.js @@ -363,6 +363,7 @@ { Engine.ConfigDB_WriteFile("user", "config/user.cfg"); Engine.ConfigDB_SetChanges("user", false); + Engine.ReloadHotkeys(); // reload hotkeys for the "Mac Mouse" option enableButtons(); } Index: binaries/data/mods/public/gui/options/options.json =================================================================== --- binaries/data/mods/public/gui/options/options.json +++ binaries/data/mods/public/gui/options/options.json @@ -84,6 +84,12 @@ "tooltip": "Show only generic names for units." } ] + }, + { + "type": "boolean", + "label": "Mac Mouse", + "tooltip": "Enables right-clicking with Ctrl+Click on Mac. Actions that used 'Ctrl' before will be changed to 'Cmd'.", + "config": "macmouse" } ] }, Index: source/ps/Hotkey.cpp =================================================================== --- source/ps/Hotkey.cpp +++ source/ps/Hotkey.cpp @@ -110,7 +110,25 @@ continue; } - SKey key = { scancode }; + SKey key; + key = { scancode }; + + // when the "Mac Mouse" option is enabled change all Ctrl only hotkeys to Super + if (OS_MACOSX) + { + bool macMouse; + configDB.GetValue(CFG_COMMAND, "macmouse", macMouse); + + if (macMouse && hotkey == "Ctrl") + { + key = {UNIFIED_SUPER}; + } + else if (!macMouse && hotkey == "Super") + { + key = {UNIFIED_CTRL}; + } + } + keyCombination.push_back(key); }