This page may be out of date. Submit any pending changes before refreshing this page.
Hide this message.

How do I disable "Command-q" in OS X?

I want to stop accidentally quitting my applications.
8 Answers
You can reassign menu commands in Mac's System Preferences menu to different shortcuts, either for individual applications or for all applications. This will let you effectively reassign Cmd-Q to anything (or nothing), if you'd like.

1. Go to System Preferences, and select Keyboard.

2. Click on Keyboard Shortcuts, then select the Application Shortcuts menu bar in the lower left.

3. Click the "+" button to add a shortcut for an application. For this example, we'll disable Cmd-Q for Google Chrome.



4. Figure out the command name for Google Chrome's "Quit" by going to the menu bar in Google Chrome and finding the menu item. In Chrome, under the "Chrome" menu bar element, you can find the action "Quit Google Chrome" attached to Cmd-Q.

5. Put the exact name of the menu action item as a new keyboard shortcut in the Keyboard Shortcut options.


6. Select a shortcut that isn't Cmd-Q (for example, Cmd-Option-Q). Click "Add" to finish the setting.
There are several ways to fix this, but my favorite is changing Cmd+Q to "Invert colors" so that it supersedes "Quit".

I like this because it provides feedback when I accidentally hit Command Q, but without quitting the application.

So, if your view is this:

Pressing Cmd+Q will make it look like this:
(Hitting Command Q again will bring it back to normal.)

Here's how to make the change...


First, go to System Settings, then Keyboard.

Under the Accessibility section, find the "Invert colors" option:

Select the option if it hasn't been selected already. Then click on the existing shortcut (mine was: ⌃⌥ ⌘8).

With it highlighted, press Command Q on your keyboard. This should change it to ⌘Q

Now you're all set.
After reading several forum posts on various websites (http://www.macosxhints.com/artic...), it seems like you can make 'Command-q' do things like "Show Help menu" through manipulation of the Keyboard Shortcuts prefpane.

Other commenters suggest using terminal with various arguments to 'defaults write NSGlobalDomain NSUserKeyEquivalents' to replace the shortcut for various applications.
If all you want is to disable this in Google Chrome, you can choose 'Warn Before Quitting' from its File menu. It is easier and does not require you to assign another shortcut.
Karl Kristjansson
Karl Kristjansson, Developer, food fanatic, photograper
Living in Iceland and using Icelandic keyboards this has bugged me from the moment I laid my hands on a mac keyboard the first time reason being we use the keyboard shortcut ALT GR+Q to type the @ symbol.

So every time a user with Icelandic keyboard settings (from a windows background) uses a mac the first thing you tell them is that the apple symbol + q quits the application, the alt button that usually lies next to space bar on non-apple keyboards.

This still happens to me every once in a while and has been driving me NUTS. Long story short, I found an answer here: http://hints.macworld.com/articl...

And I quote user waynerrr :
----------
i decided to bring alive this old post to today (November 2009 almost)
I really use a lot of keyboard shortcuts

But, I really dislike the Command Q (apple key + Q) command because I
was sick to death of "quitting without warning" applications by
accidently hitting the wrong shortcut  (e..g I use command+A (select
all) often) and this is so close to the "quit" shortcut
anyhow I'm on Leopard & i didnt fancy risking commands in the terminal so i did this
"system pref" keyboard & mouse"  I changed "show help menu" to
command+Q (you can change anther one if you dont fancy altering this
one)
thus the result is I've completely disabled the ability to quit Apps
P.S. I think command + Q to quit without warning is a horrible shortcut and one that causes me regular inconvenience.
----------
View More Answers