Assign a keyboard shortcut to Private Browsing in Safari

Jun 13, '11 07:30:00AM

Contributed by: kolouker

The Private Browsing mode in Safari has no default keyboard shortcut, and the toggle has a modal confirmation dialog. This hint shows how to assign a keyboard shortcut to Private Browsing and bypass the confirmation dialog.

One of my favourite features of Mac OS X is the ability to assign a keyboard shortcut to any menu item of any application. This is fairly straightforward and was covered in many hints before.

In order to assign a keyboard shortcut, in this case to the Private Browsing toggle in Safari, we have to do the following:

The instruction says that we should 'Enter the exact name of the menu command you want to add.' When doing so, i.e. type 'Private Browsing…' the keyboard shortcut will execute the default action and presents the confirmation dialog window.

In order to bypass that dialog, we have to type 'Private Browsing' (without the elipsis) as the menu item name. As a result, the keyboard shortcut will instantly toggle private browsing on and off.

You will notice that there are now two menu items in Safari menu called Private Browsing, one with the shortcut assigned, and the default one with the elipsis.

The shortcut I use is Command+Shift+P. It is easy to remember, does not interfere with printing (Command+P), and makes private browsing a feature I actually use on a regular basis (e.g. when accessing my bank account).

[crarko adds: I tested this, and it works as described.]

Comments (7)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20110610091929287