6

I am using WinOS at the office and MacOS at home. But I am more experienced on WinOS. While i am browsing (via Firefox), I use ⌘ CMD+Q accidentally to write "@" mark because of WinOS and keyboard habits. So, the browser quits and I lose all what I've written.

Is there a way to constrain this key combination on MacOS or do I have to look for it on Firefox? (I know, the best way is adapting MacOS but mostly I am working on WinOS.)

3 Answers 3

9

Unfortunately, Firefox (at least the 3.6 version I experimented with) does not disable the command shortcut for Quit when you change it in System Preferences.

I think the quick and easy fix for this is to add ⌘Q as a global shortcut to something else innocuous. In my experiments, I found this to work:

  1. Open System Preferences.
  2. Click on the Keyboard pane.
  3. Click Keyboard Shortcuts tab.
  4. Click Exposé & Spaces shortcuts in the left side list.
  5. Under "Exposé" change the shortcut for "Desktop" to ⌘Q

Now when you accidentally hit ⌘Q, your desktop will magically and amusingly appear reminding you of your folly. Hit ⌘Q again and you're back exactly where you were.

As a sidenote, after a while you may want to change this back after you "unlearn" your behaviour. ⌘Q, the Mac equivalent to "ALT-F4" has been the standard shortcut since the introduction of the Macintosh, and like the other "standard" shortcuts ⌘W,⌘Z,⌘C,⌘V and so on, it's best to learn them to ease use of other Mac computers or when you upgrade.

4
  • Good idea. I'd suggest something a little more innocuous than Exposé if you're not going to break the habit, though. Spotlight, maybe (hit Esc to dismiss). Less likely to interrupt your workflow as much. Jan 11, 2011 at 2:30
  • @Matthew Well, what I like about Exposé idea is it's immediately apparent you hit the wrong key and it's a toggle so you can just hit it again to get back to the right state. Spotlight works in the same way so that's another option.
    – ghoppe
    Jan 11, 2011 at 15:20
  • Good point, you'll definitely know it when it happens with Expose. There's little chance you'll go on blindly typing into the wrong box. Jan 11, 2011 at 23:21
  • this is a good solution for bad habits. Thank you.
    – ARTniyet
    Jan 12, 2011 at 23:02
6

Here's how to change that particular shortcut for Firefox:

  1. Open System Preferences. This is in the Applications folder.
  2. Go to the Keyboard pane, and click the Keyboard Shortcuts tab.
  3. Click the [+] button near the bottom.
  4. Select Firefox from the Application menu. For Menu Title, type 'Quit Firefox' (without the quotes)
  5. For the Keyboard Shortcut, push a key combination that you're not likely to hit by accident (control-q, for example).
  6. Open Firefox. Now, cmd-q does nothing (you can quit with ctrl-q, or whatever you set it to).

Hope this helps.

6
  • Thanks for the answer but this only adds another Quit shortcut to Firefox. cmd+q still quits Firefox
    – ARTniyet
    Jan 7, 2011 at 23:24
  • If that is the case, what you typed didn't match the name of the command exactly. Try again, making sure that what you type in to System Preferences matches exactly the name of the command you see in the program (no quotes or anything). Jan 8, 2011 at 0:20
  • I've got the same problem as him Nathan, even though it shows the changes take effect (Quit Firefox as ^Q) when I click on the Firefox menu, cmd+q still closes the application. I'm not too sure why though since this method works for Google Chrome.
    – Darel
    Jan 9, 2011 at 15:05
  • I can confirm that Firefox (3.6) does not remove the cmd-q shortcut, the System Preference shortcut is added, but the default is not removed.
    – ghoppe
    Jan 10, 2011 at 19:19
  • Granted, this is non-standard behaviour, as most other applications will indeed disable the standard shortcut.
    – ghoppe
    Jan 10, 2011 at 19:42
2

I'm on macOS Ventura and I need to remove the “Close Window” shortcut Cmd+W, as I often accidentally close an app.

The way to do it is to find out the exact specific command in the menu bar. In my case, it is called “Close”.

Then go to System Preferences > Keyboard > Shortcuts > App Shortcuts then click + to add a new shortcut for the app. Next, reassign an obscure keyboard shortcut (for me Ctrl+Option+Cmd+W).

Reference: How to disable COMMAND+Q for certain applications

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .