Make Ubiquity More Ubiquitous

Software engineer and Lifehacker reader William Bartholomew loves previously mentioned Firefox extension Ubiquity, but would prefer it were a bit more... well, ubiquitous.

One of the biggest limitations I see is that its keyboard shortcut is only available from within Firefox; I really want to be able to invoke it from whatever application I'm currently using.

To address this issue, Bartholomew created a small program that creates a global shortcut that invokes Ubiquity no matter what application you're using. It's all written in a few lines of AutoHotkey, so keep reading for a closer look at the code, a link to download the executable, and a reminder of exactly what Ubiquity brings to your Firefox installation.

First, if you need a quick refresher on what Ubiquity can do for you, check out the screencast below:

In addition to the features shown in the video above, Ubiquity has also seen integration with popular to-do list manager Remember the Milk. Now let's take a look at how the AutoHotkey script works. (If you're not interested in the code, just grab the download here and be on your way.)

Now let's take a look at the code:

; Make ubiquity ubiquitous
#space:: ; Change shortcut if needed
FirefoxTitle = Mozilla Firefox
FirefoxPath = %programfiles%\Mozilla Firefox\firefox.exe
SetTitleMatchMode, 2
IfWinNotExist, %FirefoxTitle%
Run %FirefoxPath%
WinActivate, %FirefoxTitle%
WinWaitActive, %FirefoxTitle%
Send, ^{Space} ; Change shortcut if needed

As you can see, this works very similarly to TabsLock, the application that switches to or opens Chrome or Firefox whenever you tap you Caps Lock key. The difference: Instead of opening a new tab once Firefox is active, this script invokes Ubiquity.

If you wanted to change your keyboard shortcuts—whether you've set a different shortcut to invoke Ubiquity from Firefox or you'd prefer a different gloabl shortcut—you can do that directly in the script.


Be the first to comment on this story!

Trending Stories Right Now