Mac OS X 10.8 introduced a caching system for app preferences ("cfprefsd"). Relaunch Finder once again and verify that its Quit command now shows ⌘⌥Q: Background Information (Technical)
#Prefedit code#
The final step is to add the new shortcut code for the Quit Finder entry. Only if the triangle is opened (pointing down) can new entries be added to this item as children:Īdd another entry named Quit Finder, which is the title of the Quit menu item, and set its type to String: Press the cursor-right key to open its triangle. Let's go back to viewing Finder's preferences in Prefs Editor and add another entry named NSUserKeyEquivalents, which is the key for defining new keyboard shortcuts in an app (this works with any app), and set its type to Dictionary (if the Add button remains disabled, it means there is already a key with this name, so you can skip this step):
#Prefedit how to#
But we'll do this using the Prefs Editor now to show how to add keys to Array and Dictionary entries. The normal way to change such shortcuts is to open the Keyboard Control Panel from the System Preferences app, and then add a new shortcut under Shortcuts / App Shortcuts. Let's do one more improvement: We'd like to change the keyboard shortcut for Finder's Quit command from ⌘Q to ⌘⌥Q to prevent accidentally quitting Finder. Once Finder has relaunched, check its File menu and a new Quit menu item should appear: This will show an additional "Relaunch" option in the menu: A quicker way is to right-click (or ctrl-click) on Finder in the Dock while holding down the option (⌥) key. The easiest way is to log out and in again. Now relaunch Finder to have it recognize our modification. Many apps have such keys for handling special cases that would be supplied only when needed, e.g. It's what we call an undocumented or secret preference key. (This particular key was found by others that dug deeper into the operations of Finder. You have now added a new key named "QuitMenuItem" of type Boolean with the value YES to Finder preferences. In the next dialog, enter QuitMenuItem (case matters!) for the Key and select Boolean for the Type (or press cmd+5): In the new window showing Finder's preferences, click the button at the lower left or press the Return key. Launch Prefs Editor (if it's already running, type cmd+shift+O to open the domains chooser), then type "finder" into the top-right search field: Examples Click here to see instructions on adding a Quit menu to Finder as an example of using this tool. If in doubt, quit the app before using Prefs Editor on their preferences. Other apps will need to be restarted manually for changes to take effect - the latter may also reset your changes if they're running while you're making changes. Some apps play along nicely and will notice changes to their preferences immediately. If that doesn't help, you can also delete them all (type cmd+A, then the Delete key), then restart the related app to have it reset all its prefs to its defaults as if it was just launched for the first time. If you messed it up, first try to Undo your changes using the Edit / Undo menu command. Of course, you should know what you're doing, or at least be instructed, as messing with the wrong values can cause the app that owns these preference to malfunction. You can Undo (cmd+Z) all modifications as well. You can now click on the values in the rightmost column to edit them, add new values by clicking on the button at the bottom-left (or by pressing the Return key) or delete one or more items by selecting them and using the button. Once you have opened a preference, you'll see a list of key-value pairs, like this: Hold down the option (⌥) key to open the globals-host). (Note: You can also open the user's globals domain from the File menu. Alternatively, you can drag and drop the plist file from the Preferences folder or the Application into this window or onto the Dock icon. If the list is long, enter part of the app's name into the Filter field to limit the list to matching names. See also this blog article explaining its features from another person's point of view.įirst, choose which preferences domain you want to edit: Prefs Editor can edit application and system preferences in a simple, tabular format. Mac OS X Prefs Editor - A GUI for the 'defaults' command