Use command-F to search iTunes
One of the things I love about OS X is its consistency. Consider File: Open (command-O), Edit: Copy (command-C), and File: Print (command-P). It doesn’t matter which application you’re using, you know exactly what those menu commands and shortcut keys will do. The same goes for the shortcut command-F—it always activates Find or Search. At least, it does in Apple’s Safari, TextEdit, and iPhoto, as well as in probably 200 other programs I could name.
Try it in iTunes, though, as I used to do by force of habit, and you get the full-screen iTunes interface. That’s quite a surprise when you’re expecting to see the cursor jump to the Search box. You might think that I could simply reassign the shortcut, using the handy Keyboard Shortcuts tab of the Keyboard & Mouse pane in System Preferences (see “Make Your Own Shortcuts”). Unfortunately, if you go to enter the name of the Search menu command, you’ll find that there isn’t one! But never fear: you can use Terminal (/Applications/Utilities/) to reassign this shortcut.
The first step is to change iTunes’ View: Full Screen shortcut from command-F to something else. Quit iTunes and open the Keyboard & Mouse preference pane. Select the Keyboard Shortcuts tab, and click on the plus sign (+) to add a new shortcut. Set the Application pop-up menu to iTunes, type
Full Screenin the Menu Title field, and then put your cursor in the Keyboard Shortcut box and press a new key combination—command-shift-F, perhaps. Click on Add, and you’re done—you can now use command-shift-F to access iTunes’ Full Screen mode.
Now launch Terminal (make sure iTunes isn’t running) and copy and paste this command:
defaults write com.apple.iTunes \ NSUserKeyEquivalents -dict-add "Target Search Field" "@F"
Press return. That’s it; you’re done. Open iTunes and press command-F—the cursor will jump to the Search box.
If you ever decide you’d like the old behavior back, you don’t need Terminal at all. Just quit iTunes, go back to the Keyboard Shortcuts tab of the Keyboard & Mouse preference pane, and use the minus-sign button (-) to delete the entry for iTunes’ Full Screen menu. The next time you launch iTunes, command-F will invoke Full Screen mode again.
Make your own shortcuts
You know you waste time whenever you reach for the mouse to activate commonly used commands. But what if the command’s keyboard shortcut is awkward, or there isn’t one for something you do a lot? Try the Keyboard & Mouse preference pane.
Change a Shortcut It’s easy to reassign a shortcut if it’s listed in the Keyboard & Mouse preference pane’s Keyboard Shortcuts tab. Just double-click on the existing shortcut and then press the combination you’d rather use. For instance, if you think that command-shift-control-3 (which copies a picture of your screen to the Clipboard) requires too much finger gymnastics, simply double-click on the entry and try a simpler replacement.
You can use the Keyboard Shortcuts tab to change not only program-specific but also systemwide shortcuts. This can be helpful if a standard shortcut is hard for you to remember, or when a shortcut in one program has a completely different function in another. For example, consider command-L. If you’re in Apple’s Safari (and most other browsers), that shortcut places your cursor in the address bar, so you can start typing the URL of a Web site. But in iChat, command-L is the shortcut for logging out—and immediately ending all your current conversations.
To prevent that, you can assign a new shortcut to logging out of iChat. First quit iChat, and then switch to the Keyboard Shortcuts tab of the Keyboard & Mouse preference pane. Click on the plus sign (+) at the lower left corner of the window, and a small shortcut-definition window will appear. Click on the Application drop-down menu and select iChat from the list. In the Menu Title field, type
Log Out of AIM. Note that you must exactly match the name of the menu item, including any capitalization. Put your cursor in the Keyboard Shortcut box, and press the new shortcut you’d like iChat to use—perhaps command-shift-L, which is still easy to remember but hard to type accidentally. Click on Add, and the next time you launch iChat, look under the iChat menu. You should see your new command-shift-L shortcut.
Create a New Shortcut The Keyboard Shortcuts pane is also useful when you want to create shortcuts for commands that don’t have them—even a systemwide command such as Sleep. To make a Sleep shortcut, click on the plus sign in the Keyboard Shortcuts tab and set the Applications pop-up menu to All Applications. Type
Sleep(again, capitalization counts) in the Menu Title field, and then go to the Keyboard Shortcut box and press the shortcut you want to use. I use command-control-O. Click on Add.
You will need to restart all programs that were running when you created the shortcut, including the Finder, before they can see the shortcut. If you don’t have much open, you can just log out and back in (Apple menu: Log Out user name ). If you have a lot of programs open, it’s quicker to open Activity Monitor (/Applications/ Utilities/), select the Finder and all programs in the list of processes, and then click on the Quit Process button in the toolbar.
[ Senior Editor Rob Griffiths runs the MacOSXHints.com Web site. ]