How to disable keyboard shortcuts in Mac OS X?
Solution 1:
BetterTouchTool is no longer free.
I reached this page because I wanted to disable command-h (hide application) which is not shown in System Preferences. This is my solution.
BetterTouchTool is a utility which can disable keyboard shortcuts (and has many other uses). http://www.boastr.de/
To disable command-w globally
- Install BetterTouchTool
- Click on the BetterTouchTool menubar item and choose "Preferences"
- Click "Gestures"
- Click "Keyboard"
- Click "Global"
- Click "Add New Shortcut"
- Click "Keyboard Shortcut"
- Type the shortcut you want to disable (for example, command-w)
- Set Trigger Predefined Action to "No Action" (which is the default)
Note that you can also set a keyboard shortcut for a specific application.
To disable command-w only for Terminal
- Install BetterTouchTool
- Click on the BetterTouchTool menubar item and choose "Preferences"
- Click "Gestures"
- Click "Keyboard"
- Click the plus sign at the bottom of the "Select Application" pane
- Choose Terminal (in Applications/Utilities folder)
- Click "Add New Shortcut"
- Click "Keyboard Shortcut"
- Type the shortcut you want to disable (for example, command-w)
- Set Trigger Predefined Action to "No Action" (which is the default)
Solution 2:
To view or change Keyboard shortcuts:
- Open the System Preferences->Keyboard
- Click on the Keyboard Shortcuts tab
- To change a shortcut, double click on the existing shortcut, and press the keys that make up your new shortcut.
- If you make a mistake, click '"Restore Defaults to return the keyboard shortcuts to the factory defaults
Solution 3:
BetterTouch wasn't able to change or disable the key that was causing me grief: ctrl-cmd-d.
Here is how I was able to delete it:
- Edit
open ~/Library/Preferences/com.apple.symbolichotkeys.plist
- Find the code for kCGHotKeyLookUpWordInDictionary (70), and set 'enabled' to OFF (if it's not there just create an entry '70' with 'enabled' = OFF).
- Restart your system
From this site I learned about symbolic hot keys and found a list of them: http://www.theregister.co.uk/2009/02/24/hotkeys_framework2/
These sites have lists of the codes used in the plist file, so one can actually change the shortcuts instead of only deleting them: http://krypted.com/mac-os-x/defaults-symbolichotkeys/ and Documenting com.apple.symbolichotkeys.plist.
Solution 4:
A solution that may work for factory hotkeys in individual apps which conflict with your desired assignment:
Use the built-in hotkey management:
System Preferences | Keyboard | Shortcuts | App Shortcuts
...to map the pre-existing to some hard-to-hit keyboard combination (like Cmd-Opt-Shift-backslash). This will free-up the old key combination for assignment.