Start Safari’s private browsing via keyboard shortcut

Safari has a private browsing features that greatly limits the “tracks” you leave when browsing the Web. When in private browsing mode (Safari -> Private Browsing), Safari won’t add Web pages to the history file, removes things from the Downloads window, won’t save autofill information, and won’t add searches to the pop-up menu of recent searches. This is very useful for those times you’re using a public Mac, or if you just prefer not to leave lots of data bits behind as you surf the net.

If you simply pick Private Browsing from the Safari menu, however, you’ll see a dialog box that explains all of this, and asks you to confirm you really do want to enter private browsing mode. In fact, you’ll see that dialog every time you activate private browsing. You can skip the dialog box by holding down the Option key before choosing Private Browsing from the menu—with the option key down, the Private Browsing entry on the menu loses its ellipsis (…), and takes effect immediately when clicked. But we’ve covered that hint before.

Today’s hint has to do with using the keyboard to access this “no confirmation” private browsing mode—and it can be more broadly applied to many similar menu items, as you’ll see. If you create a keyboard shortcut for the normal private browsing menu item—Private Browsing…, including the ellipsis—you’ll find that you can’t just add the Option key to the mix to jump directly into private browsing mode. Instead, create a keyboard shortcut for Private Browsing (without the ellipsis)—this is how the text in the menu appears when you have the Option key held down.

As a quick aside, here’s how to create keyboard shortcuts in general. Open the Keyboard & Mouse System Preferences panel, then click on the Keyboard Shortcuts tab. Click the plus sign, then set the Application pop-up menu to Safari. Enter Private Browsing as the Menu Title, and your desired keyboard shortcut (I used Control-Option-P) in the Keyboard Shortcut box, then click Add.

Safari menus
When you switch back to Safari (in OS X 10.5), or relaunch it (in 10.4), the Safari menu will now have two Private Browsing entries. The one with the ellipsis is the usual “confirmation required” menu, and the other activates the “instant access” private browsing option. Just press the shortcut keys—Control-Option-P in this example—and you’ll be in private browsing mode.

You can extend this hint for any menu item that uses an ellipsis, changes when the Option (or other modifier key) is pressed, and doesn’t already have a keyboard shortcut assigned. In the Finder, for instance, selecting Finder -> Secure Empty Trash… puts a confirmation dialog on the screen. Create a keyboard shortcut for Secure Empty Trash, however, and you’ll be able to securely empty the trash with a keyboard shortcut, and without a confirmation dialog. (Be very careful with this one, though, as anything emptied from the trash in this manner will be absolutely, positively deleted forever!)

Subscribe to the Apple @ Work Newsletter

Comments