The easiest way to do this is to install a key remapper (I use KeyRemap4MacBook). Though the name seems to suggest otherwise, currently KeyRemap4MacBook actually works with all Apple computer products that can run OS X 10.4 or later, including iMac, Mac mini, and Mac Pro.
Using this method, you can map ⌘M, which OS X maps to the minimize function by default, to Fn+⌘M, which is significantly harder to accidentally press, and which OS X maps to no functionality by default.
In other words, you can swap the functionality of these two key combinations so that ⌘M no longer has a functionality and is essentially disabled. While it is not strictly “disabling” the shortcut, this workaround achieves the same effect.
Use the following steps to disable the minimize shortcut in Mavericks:
1. Install KeyRemap4MacBook
Download the appropriate
.DMG file from the link above and double click it. If you get a message like this:
Your security preferences allow installation of only apps from the Mac App Store and identified developers
Then open the
System Preferences program already installed on your computer and, under the
Personal tab, select
Security & Privacy. Next, under the
General tab, click the lock in the lower left corner to make changes (provide an administrative password if needed), and under
Allow applications downloaded from: label, select the
Anywhere radio button.
Now you can install the application; you may need to restart once it's finished.
2. Configuring the custom settings
While KeyRemap4MacBook offers a diverse collection of useful features, disabling the minimize shortcut is not among them. Instead, it provides a handy XML file that you can modify using their API to achieve almost any key remapping you can think of.
Open KeyRemap4MacBook, and navigate to the
Misc & Uninstall tab. Under the
Custom Setting label, click the
Open private.xml button. Make sure the document opens in a plain-text editor such as TextEdit. Once opened, you should see a blank XML file with empty
root tags. Replace the entirety of its contents with the following code snippet:
<?xml version="1.0"?> <root> <item> <name>Disable Minimize</name> <identifier>private.disable_minimize</identifier> <autogen> __KeyToKey__ KeyCode::M, ModifierFlag::COMMAND_L, KeyCode::M, ModifierFlag::COMMAND_L | ModifierFlag::FN </autogen> <autogen> __KeyToKey__ KeyCode::M, ModifierFlag::COMMAND_L | ModifierFlag::FN, KeyCode::M, ModifierFlag::COMMAND_L </autogen> </item> </root>
[Note: The previous code uses the left-most command key. If you are interested in disabling the right-most command key, change each instance of
private.xml file. Return to the
Change key tab. In the main list, under the
remapping label, you should now see a
Disable Minimize checkbox.
Check the checkbox, and you should now no longer be able to minimize your windows with the ⌘M shortcut. If you ever need to use the shortcut again, use Fn+⌘M, or simply uncheck the
Disable Minimize checkbox.