You can remap any key and key combination with the wonderful and free software Karabiner. After installing, just add the following code to your ~/Library/Application Support/Karabiner/private.xml
:
<item>
<name>Map Cmd-M to Cmd-Alt-M</name>
<appendix>Changes the minimize shortcut</appendix>
<not>EMACS</not>
<identifier>private.kill_m</identifier>
<autogen>__KeyToKey__ KeyCode::M, ModifierFlag::COMMAND_L|ModifierFlag::OPTION_L, KeyCode::M, ModifierFlag::COMMAND_L</autogen>
<autogen>__KeyToKey__ KeyCode::M, ModifierFlag::COMMAND_L, KeyCode::VK_NONE</autogen>
</item>
<item>
<name>Map Cmd-Q to Cmd-Alt-Q</name>
<appendix>Changes the quit shortcut</appendix>
<not>EMACS</not>
<identifier>private.kill_q</identifier>
<autogen>__KeyToKey__ KeyCode::Q, ModifierFlag::COMMAND_L|ModifierFlag::OPTION_L, KeyCode::Q, ModifierFlag::COMMAND_L</autogen>
<autogen>__KeyToKey__ KeyCode::Q, ModifierFlag::COMMAND_L, KeyCode::VK_NONE</autogen>
</item>
Then klick "Reload XML" in the Karabiner preferences and set checkmarks for the new items.
This way the minimizing shortcut is not entirely disabled but still available with the additional option key: Cmd+Option+M or by simply using the right command key: Cmd (right)+M.
Note that the second part also changes the Cmd+Q shortcut to Cmd+Option+Q for your convenience. You can omit the second item, if you don’t need it.