Switching Safari Tabs With Custom Shortcuts

So I dumped Minefield / Firefox a while a go to give a try to Safari 4 beta and I really love it, I love the speed and how perfectly integrates into OS X and with the brand new Web Inspector my life is complete, or is it?. Turns out one major flaw in Safari for me is the lack of fast switching into different tabs, Safari has the nice shortcuts ⌘1 to ⌘9 bound to the bookmarks in your bookmark bar instead of the tabs, like Firefox does. So after researching a bit I found a way to do it using QuickSilver + AppleScript but using QuickSilver was kinda of an overkill for me for such a simple task and also it started to crash and I could never recover. Instead a good friend of mine told me about Spark, it's a light and free shortcut manager that let's you define custom shortcuts per application and execute scripts / commands, that's just exactly what you need.

The setup is simple, click "All Applications's HotKeys" it will show a drawer, click the + button there, add Safari.

In there, hit ⌘1 to add a new AppleScript instruction, name it "Tab1" and on the source write this:

~~~~ {lang="applescript"} tell front window of application "Safari" to set current tab to tab 1 wzxhzdk:0

After you are done, go back to to Safari and test your brand new custom shortcuts to switch tabs.

Yes, now go ahead and tell your friends!.

Update: I figured out how to do the ⌘K shortcut for the Google Search box in this post: Safari 4 Google Search Shortcut

Comments !

blogroll

social