January 16, 2011

OS X Keyboard shortcuts in Safari

John Gruber's 4-Nov-2010 post Going Flash-Free on Mac OS X, and How to Cheat When You Need It, described a strategy for disabling Flash on OS X, and then using Google Chrome, which has its own self-contained Flash Player, as needed.

John detailed how to use OS X's Keyboard preference pane to create a keyboard shortcut to quickly open the current Safari webpage in Chrome. Over the following week I noticed that, while selecting from Safari's menu: Develop > Open Page With… > Google Chrome always worked, my keyboard shortcut was not reliable.

A comment by Louije on Daniel Jalkut's 14-Jan-2011 post on using Red Sweater Software's FastScripts and Safari with Marco Arment's Instapaper identified the problem:

"Shortcuts assigned to Safari bookmarks via the Keyboard preference pane are not available until the menu has been loaded once–that is, you need to click the Bookmarks menu once per session for the [Instapaper] to work."

Bingo! Sure enough when I first open Safari, my keyboard shortcut, Ctrl-Opt-Cmd-G, does nothing. But if I select Develop > Open Page With, my keyboard shortcut then starts working and will continue to do so until I quit Safari. [The Develop menu is enabled under Safari > Preferences… > Advanced]

P.S. If you've ever wondered how to report this bug (or any other): apple.com/feedback/macosx.html or bugreport.apple.com [registered developers]

References
UPDATES