Here's a little timesaver that- - even though it's specific to the iPhone/iPods and iTunes - may help you in other programs as well. As regular readers know, I'm a huge fan of using the keyboard whenever possible, so I usually assign shortcuts to often-used menu items via the Keyboard Shortcuts tab of the Keyboard & Mouse System Preferences panel.
After reaching for the mouse one time too many to press the Sync button to re-sync my iPhone (after installing application updates, for instance), I decided to add a keyboard shortcut for the Sync button - you may not have noticed it, but Sync "User's iPhone" is a menu option in the File menu. (Today's hint can be just as easily used for iPods as well as iPhones, of course.)
There was just one challenge to overcome to get this done: the menu item uses smart quotes (both the single and double quotes) instead of the straight quotes one gets by pressing the quotes key on the keyboard. So how do you create a keyboard shortcut for a menu item that uses smart quotes?
There are at least two ways to do this that I'm aware of.
First, you can use TextEdit (or similar editors), as long as you've got its preferences set properly. Press Command-comma to open TextEdit's preferences. In the Options section near the bottom of the window, check the Smart Quotes box, then close preferences. Now create a new TextEdit document (Command-N), and type the name of the menu exactly as it appears in iTunes. TextEdit will take care of converting the single- and double-quotes to their "smart" forms. So if your iPhone was named Paul's white iPhone, then you'd type this in TextEdit: Sync "Paul's white iPhone". You can then copy and paste this text into the Keyboard Shortcuts pane to create the shortcut (explained in detail below, if you need a refresher).
The other way to type the smart quotes is by using a keyboard shortcut - which only seems fitting - directly in the Keyboard Shortcuts shortcut creation window. Open the Keyboard and Mouse System Preferences panel, click on the Keyboard Shortcuts tab, then click the plus sign at the bottom to add a new shortcut. In the new window that opens, set the Application pop-up to iTunes.
Now for the tricky bit - typing the menu title, smart quotes and all. Again, assume your iPhone is named Paul's white iPhone, which means the iTunes' menu item would be Sync "Paul's White iPhone" - with both single and double smart quotes. To type this into the title box, you can use these shortcut keys:
Option-[ and Shift-Option-[: These keys type the open and closing double smart quotes (" "), respectively.
Option-] and Shift-Option-]: These keys type the open and closing single smart quotes (' '), respectively.
So after typing Sync into the Title box, press the Space Bar, then type Option-[, then Paul, then Option-], then s white iPhone, and finally, Shift-Option-[ to close the smart quotes. Once you've got the name typed, put in a keyboard shortcut--in my testing, I had some issues with shortcuts that used the Control key, but it worked fine with Command-Option combinations. (This may be particular to my setup of course; feel free to try key combinations using Control; if you don't get a sync when you press the shortcut, try a shortcut without the Control key.)
Click Add after entering your shortcut, then switch back to iTunes in OS X 10.5 (or quit and relaunch it in 10.4), and make sure you see the shortcut next to the Sync "Paul's white iPhone" entry in the File menu. If you see the shortcut listed, press that keyboard combo with your iPhone (or iPod) connected to start a sync. If you don't see the shortcut listed, then there's some subtle difference between the actual menu item and what you typed in the Keyboard Shortcuts panel. Compare the two closely--versions of iTunes before iTunes 8, for instance, used smart double quotes but dumb (straight) single quotes. Edit your shortcut menu title as necessary to make sure it matches what you see in iTunes, and it should just work at that point.