How to disable command-Q for Quit

applicationskeyboard

Is there any way to disable command+Q for quitting apps?

I tried adding this menuitem to the "Keyboard Shortcuts" preference pane (as suggested here), and remapping it to command+option+Q (slightly harder to hit), and the menu item changed to show this, but command+Q still causes the app to quit.

I'm using OS X 10.7, but I'd happily upgrade to 10.8 if it fixed this.

The app I really want this for is Firefox, but if there was a solution that disabled command+Q for every app, that would be fine, too.

Best Answer

Go to System Preferences, then Keyboard. Select Shortcuts. On the left pane, find Accessibility. Now on the right pane enable Invert colors and then click on the shortcut box to reassign the shortcut to Cmd+Q.

That's it. Now when you press Cmd+Q the colors of the screen will be inverted. Press it again to go back to normal colors. No more accidentally quitting applications (like closing over two hundred tabs on Firefox when trying to use Cmd+a or three dozen pdfs on Preview when trying to use Cmd+tab; last two things I did, never again.)

P.S. Whoever thought it was a good idea to use Cmd+Q to quit applications should go back to usability school.


There's also a nice plugin that you can use called Always Ask, which forces a prompt dialog before leaving Firefox.