Some very useful keystrokes you might not know about.
This is the feature of the Mac interface I hate the most: secret key combinations that invoke useful functions.
Here is an Apple support document listing secret key strokes: OS X:kyeboard shortcuts.
To put the computer to sleep: press the power button for a second in Mavericks. Before Mavericks, use ⌘ ⌥ ⏏.
To kill a hung application: ⌘ ⌥ ESC.
How to force a shutdown if the computer won't shut down normally: hold power key 10 seconds.
Choosewhile holding Option to avoid being asked if you REALLY want to restart.
After restart, an app may be unable to re-open its previous windows, and be unable to launch. Hold Shift while launching the app; this clears out its "saved state". (Thanks, MacInTouch and Matt Neuburg.)
Control-click brings up a context menu: this is the same as right-click on a two-button mouse.
Quick look. In finder, select a file or group of files and hit the space bar, and you'll get a popup window with a preview. Works for Mail.app attachments also.
Hit cmd-space for a Spotlight search.
Screen shot. ⌘ shift 4 gets cross hairs, hold mouse, Drag, release. Picture is stored on Desktop.
Hit F9 to see thumbnails of all windows, F11 to hide all applications and see the desktop.
Hit F12 for Dashboard. F12 again hides it. Configure widgets by clicking on the i. Add widgets by clicking the + and selecting a widget. You can find other widgets at apple.com.
Right-click on the dividing line in the dock: this brings up a menu that lets you change Dock preferences such as hiding and magnification.
Control-click (or right click) on a word in some apps and choose "look up in Dictionary."
Command-shift-M toggles the mini-player in iTunes 12