How to change default shortcuts?

I'm trying to remove the shortcut (cmd + w) and cannot find it in the system preferences list of shortcuts which can be edited. I have also tried looking into ~/Library/Preferences/.GlobalPreferences.plist , but I don't know exactly how to change the hotkeys or which one I should be changing. How can I disable the shortcut without paying for software to do it for me?

MacBook Pro with Retina display, OS X Yosemite (10.10.2)

Posted on Jun 21, 2018 11:13 AM

Reply
Question marked as Top-ranking reply

Posted on Jul 1, 2018 6:34 PM

Not all apps use the exact same menu entry spelling, so you are going to have to create a replacement shortcut for each and every app using the exact "Close" spelling the App has in its menu.


You might be able to use a several All Application shortcuts, with one for each unique spelling an App uses to mean close.


Example changing TextEdit


This is the original TextEdit menu with "Close"

User uploaded file

This is the Keyboard Shortcuts tab. I selected TextEdit for the Application, I entered the EXACT spelling from the TextEdit menu for closing a window "Close", and then I pressed the keys I wanted to be my TextEdit Close

User uploaded file

Going back to TextyEdit, you can see the Menu has replaced Cmd+W with Option-Shift-Command-3

User uploaded file

My point is that NOT ALL Applications use the same menu spelling for closing a window, and the shortcut must match the menu entry spelling exactly. In this example I'm showing you that Safari uses the menu entry "Close Window", so for Safari you have to create a shortcut using the spelling "Close Window".

User uploaded file

You should test you shortcut for each app to make sure it is working as expected.

3 replies
Question marked as Top-ranking reply

Jul 1, 2018 6:34 PM in response to FOH112

Not all apps use the exact same menu entry spelling, so you are going to have to create a replacement shortcut for each and every app using the exact "Close" spelling the App has in its menu.


You might be able to use a several All Application shortcuts, with one for each unique spelling an App uses to mean close.


Example changing TextEdit


This is the original TextEdit menu with "Close"

User uploaded file

This is the Keyboard Shortcuts tab. I selected TextEdit for the Application, I entered the EXACT spelling from the TextEdit menu for closing a window "Close", and then I pressed the keys I wanted to be my TextEdit Close

User uploaded file

Going back to TextyEdit, you can see the Menu has replaced Cmd+W with Option-Shift-Command-3

User uploaded file

My point is that NOT ALL Applications use the same menu spelling for closing a window, and the shortcut must match the menu entry spelling exactly. In this example I'm showing you that Safari uses the menu entry "Close Window", so for Safari you have to create a shortcut using the spelling "Close Window".

User uploaded file

You should test you shortcut for each app to make sure it is working as expected.

Jul 1, 2018 1:54 PM in response to FOH112

For each app change the "Close Window" menu entry to some other key combination that will not be easy to trigger.


Get a hotkey creation app that allows you to create a new function for Command-W.


My perferred is BetterTouchTool as it allows me to create all kinds of trackpad gestures making the trackpad more useful than a million button mouse 🙂, but BTT has hotkey mapping (and I was able to create a Global Commmand-W with no action and this disabled Command-W for other apps).

<https://blog.boastr.net>

Jul 1, 2018 1:54 PM in response to BobHarris

As I'm hoping to not have to buy an app such as BetterTouchTool, I've tried to re-label the close window shortcut in the system preferences but with no success.


I go to Keyboard, Shortcuts, App Shortcuts, press "+" and then try to add a replacement shortcut but it seems to have no effect.

I select all applications (which is what I want) but what should I type into the Menu Title box in order for it to have the function of it closing the window?


Thanks for the help

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to change default shortcuts?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.