Getting used to various keyboard shortcuts and other shortcuts in OS X can greatly enhance your workflow efficiency. The basics of holding the Command key followed by Q, W, S, or other letters to invoke common functions like quitting, closing windows, or saving, are well known, but OS X and various applications you use may have some unique shortcuts that can be exceptionally useful to some people. Memorizing shortcuts can be a daunting task, but if you incorporate them over time into your workflow you can begin to build a great deal of efficiency into the way you use your Mac.
Shortcuts are available for a number of different task types, so their usefulness will depend on what you are doing, and in troubleshooting the system there are a few that stand out as being exceptionally useful. Here are some shortcuts in OS X that may be useful when troubleshooting and managing OS X:
This is the universal "Undo" option in OS X, and though it may seem odd to include as a special option here, it is perhaps one of the more useful commands when you are managing files on your disk. When trashing files, copying files, or moving them around on your disk, you may inadvertently place them in an unknown location. This can result in files suddenly disappearing or duplicates being created where you do not want them to be. Generally an easy fix once these actions have been performed is to merely press Command-Z to undo that last action.
Command-Delete: send selection to Trash
This shortcut commonly used to move an item or a selection of items to the Trash in the Finder, but can be more specific than dragging a file there. When you highlight a file or selection of files with the mouse, you can be certain just those files are selected and then pressing Command-Delete will move them to the Trash without the possibility of inadvertently dropping them on the desktop, placing them in the Dock, or dropping them on an application and thereby inadvertently opening them. When you do this, the system should make a small indicator sound to let you know the files have been moved to the Trash.
Shift-Command-Delete: empty the Trash
Emptying the Trash is generally not a confusing task, but right-clicking the Trash or selecting the empty Trash options in the "Finder" menu may be a bit cumbersome at times. If you have any items there, you can tell the system to empty it by pressing Shift-Command-Delete. Doing this will bring up the warning asking if you would like to empty the Trash, but you can have the system immediately empty it without issuing this warning by pressing the "Option" key as well, so Shift-Option-Command-Delete will toss the files without warning you.
Option-Command-Esc: force-quit window
This shortcut will bring up the force-quit window, similar to how you can bring up the Task Manager on Windows PCs by pressing Control-Alt-Delete.
Option-Shift-Command-Esc: force-quit application
While the force-quit window will work just fine to force-quit an application, in rare cases the window may not show up or you may just wish to quit the foremost application. To do this, press Option-Shift-Command-Esc and hold it for a few seconds, and the foremost application will be forced to shut down.
Managing the system
Apple used to have a power button on its keyboards that you could not only use to start up your Mac, but also use to quickly access sleep, shutdown, and restart functions on the system. This option is still available in OS X, but unless you have a laptop then the power button on your Mac may be a bit inconvenient to access. To overcome this, Apple has implemented some keyboard shortcuts using the Eject key, to quickly access these functions.
- Option-Command-Eject: Sleep that Mac
- Control-Command-Eject: Restart computer
- Control-Option-Command-Eject: Shut down computer
Managing the Terminal
Beyond the aforementioned keyboard shortcuts, Apple has implemented some application services that may be useful in troubleshooting if you use the Terminal, or may be useful if you are a general Terminal user. Some of these may have keyboard shortcuts assigned to them by default, but if not then you can always add shortcuts yourself using the Keyboard system preferences.
Open Man page in Terminal (Shift-Command-M)
The Terminal Man pages are useful for looking up commands. While you can generally type "man COMMAND" or search for them on the Internet, Apple has an option to look them up even quicker, by implementing a service to look up the man pages of a command that has been highlighted. Just right-click a command in any application, go to the "Services" menu, and select the "Open Man page in Terminal" option. If this is not available then you can enable it by checking it in the "Services" section of the "Keyboard" system preferences. In OS X Lion Apple has the shortcut Shift-Command-M associated with this function, so you can always double-click a command to select it in an application (i.e., the Terminal itself), and then press that shortcut to bring up the man page in the Terminal.
New Terminal at folder
Another option that is new in Lion is to open a new Terminal window at a specified folder in the Finder. While there are some existing utilities that can help with this, having a built-in option in OS X is nice to have. As with opening command Man pages, this option is available in the "services" contextual submenu, and should be available for any folder that is selected, including filesystem directories, application packages, and other package files such as libraries, extensions, and project files for some applications (e.g., Pages, iMovie, and Garageband). This by default does not have a keyboard shortcut associated with it, but you can assign one in the Keyboard system preferences. Do keep in mind that if you assign a keyboard shortcut, then in Column view the shortcut may not work unless the selected folder is a package file such as an application.