Friday, February 26, 2010

Mac 101: Navigating OS X with your keyboard


Let's face it: unless you're just casually surfing the Internet or playing a game, chances are pretty good that your hands are on the keyboard most of the time when you're at the computer. Sure, the mouse is only a few inches away, but wouldn't it just be easier if you didn't have to keep going back and forth from the mouse to the keyboard?




Enter the world of keyboard shortcuts. A keyboard shortcut is exactly what the name implies: a way of using the keys on your keyboard to quickly perform tasks that typically would require multiple steps using a mouse. Before we dive in to the magic keystrokes, let's take a quick look at how shortcuts work on the Mac.





Most keyboards have a number of special keys in the bottom corners that look and work differently from the other keys. These keys are called 'modifier keys', because they change (or modify) the behavior of any keys that are pressed while the modifier key is held down. A good example of this is the shift key, which causes letters to appear in uppercase as they are typed. Although the shift key is commonly found on everything from typewriters to telephones, the other keys that are available depend on the keyboard you have and what kind of computer it is plugged in to. But just like the shift key, you use them by holding down the modifier key, pressing another key, then letting go of both keys.



On a Mac, the most commonly used modifier key is the Command key, which is just to the left of the space bar, and can be identified by a clover-like icon on the key. The most commonly used shortcuts in OS X make use of the Command key. For example, in most applications, pressing Command-S will save the document you have open, while Command-O will show the open dialog so you can open another document. Less common tasks make use of the other modifier keys, such as the Option and Control keys, and some even use more than one at a time (such as Command-Shift-S to show the Save As dialog instead of just saving the document).



If you're switching from using a PC, and you're familiar with keyboard shortcuts in Windows, you will find that many of the common shortcuts are similar, but it might take some time to train your muscle memory to find the Command key as it is in roughly the same spot as the Alt key on most PC keyboards.



One last thing that's important to know about keystrokes is exactly where they will work, or their 'scope'. There are a handful of shortcuts built in to OS X that have a global scope, meaning they will work pretty much anywhere, at any time, from any application. Here are some of my favorites:



Global OS X Keyboard Shortcuts



Command+Tab - This is handy for switching between applications. Hold down Command and press the Tab key repeatedly to cycle through all of the running applications. You can also use the ` key (while still holding down the Command key) to go through the list of applications in reverse. Command+Space Bar - This will pop open the Spotlight search box so you can do a quick search. This can also double as a quick way to open applications without a mouse -- just type in an application, and hit enter when it shows up in the Spotlight search results. Command+H - Hide the current application. I use this to get rid of my e-mail window when I'm finished with it. You can get back to it by using Command+Tab as mentioned above, or clicking the icon in the dock. Command+Option+H - Hide all other applications (but the current one). This is really useful if you have a lot of windows open and want to focus on just one of them, or if you just want to reduce screen clutter. F8 through F12 - These keys toggle Spaces, Expose`, and Dashboard. On newer Macs, you might need to hold down the fn key as well. Common Application Shortcuts



Besides the global shortcuts, there are several shortcuts that are standard across most applications, allowing you to quickly perform common tasks without having to guess what the keystroke might be:



Command+X, Command+C, & Command-V - Cut, copy and paste. I know, they aren't easy to remember by the letters, but somewhere along the line that became the standard. Command-N - Open a new file, or sometimes a new window, depending on the application. Command-O - Show the open file dialog Command-S - Save the current document Command-W - Close the current window or tab Command-Q - Quit the current application These are just the tip of the iceberg -- there are dozens of shortcuts covering everything from inverting your screen colors for high-contrast visibility to shutting down your Mac after a long day's work. If you're a power user who wants to do more with your keyboard, stay tuned -- we'll be covering more advanced keystrokes in the near future.