Cmd-Number Shortcuts For Safari 9

If you’re a Safari user and you’ve updated to the Safari 9 or OS X 10.11 beta, you may have noticed a minor change in the default keyboard shortcuts for the app.

In Safari 8 and earlier, keyboard shortcuts combining the Command key and a number, e.g. Cmd-1, Cmd-2, Cmd-3, would open the corresponding bookmark bar item. So if you arranged your most-frequently-visited sites in the first few bookmark bar slots, you could easily jump to those pages by muscle memory thanks to these shortcuts.

In Safari 9, these shortcuts now switch to any open tabs you have in a Safari window. This will come as a surprise to folks who have gotten used to e.g. using Cmd-1 to quickly jump to e.g. Google News, or Yahoo Stocks.

The implicit shortcuts for bookmark bar items are still available, but you have to add the option key into the mix. So where you used to press Cmd-1, you must now press Cmd-Opt-1.

This may not be a big deal to you, and you may choose to simply adapt, but for those who got used to the old behavior and want to preserve a similar functionality, FastScripts can do the job of putting things back into order for you.

Safari’s scripting interface doesn’t support selecting a specific bookmark bar item by number, so FastScripts can’t exactly replicate the old behavior. What it can do though is bind (just about) any keystroke to a script that opens a specific URL in Safari. You might find after getting used to doing things “the FastScripts way” that you prefer it to the old Safari way, because you won’t be limited to using numeric shortcuts, and will instead be able to choose whatever shortcuts you like. For example, I use Ctrl-N as my shortcut to quickly jump to Google News.

Here’s a step-by-step procedure for adding shortcuts to Safari to open a specific URL:

Download FastScripts. It’s free for up to 10 shortcuts.

Launch FastScripts and find its icon in the upper-right corner of your Mac’s screen. It looks like this:

Launch or activate Safari so it’s the front-most app.

Click the FastScripts icon and select FastScripts -> Create Safari Scripts Folder.

Download this script and copy it to the Safari scripts folder.

Double-click the script to open in Script Editor.

Change the URL in the script from “http://www.red-sweater.com” to whatever URL you like, e.g. “http://news.google.com/”

Save the script and rename it to e.g. “Open Google News”.

Back in Safari, hold the Command down and select “Open Google News” from the FastScripts menu. This is a shortcut to quickly change a script’s keyboard shortcut.

Set the desired keyboard shortcut in FastScripts’s preferences.

There’s no step 11! From now on, whenever you’re in Safari and want to jump to that URL, just press the keyboard shortcut, and you’re done.

This sounds a bit more complicated to set up than it is in practice. Once you get the hang of it you’ll be able to quickly replace however many Cmd-Number shortcuts as you like in Safari, and it might even open the door to overriding behaviors of other apps. This is an area where FastScripts really shines. Enjoy!