May 09

Lifehack: Accessing Safari/WebKit tabs via a key stroke

Tech, Web Browsing with tags: , , 3 Comments »

I love how Firefox lets me hit Apple (or Splat as James Strachan calls it!) plus a number to go to the given tab in the browser window.

I often follow the pattern of “open new link in a tab and go to it at the end” and also have windows open with known apps up in the same tab location so I can get to them quickly, without even thinking. Being able to Splat-9 to go to the end is key to this of course.

Although Firefox does this by default, WebKit/Safari does not, so I changed it via a simple hack that others have mentioned. Some people saw me doing this at JavaOne and asked me how I did it, so I decided to quickly show how it is done in the window below.

The steps to follow are:

  • Generate AppleScripts to tell Safari and WebKit to go to the right tab. This is talked about here, and I have a slightly modified version that I will paste at the end of this post
  • Tie together the AppleScript to the browsers. I tried to use simple keyboard bindings in the keyboard pref panel, but that didn’t work, so I ended up using Quicksilver triggers

See how it all fits together below!

Loading...