How to Launch a Bookmarklet with a Keyboard Shortcut

In keeping with my recent theme of keyboard shortcuts, this post will show you how to launch any bookmarklet you want with a keyboard shortcut. At first I searched high and low for a Firefox extension that would help with this. The closest one I found is called Devo. It’s a command launcher for Firefox, similar to Launchy or Quicksilver. However, it’s still experimental and requires a login to even download it. I opted not to try it out because of the hassle and potential instability at this stage.

My solution isn’t great, but it’s the best I’ve found. It’s to use AutoHotkey to manually launch the bookmarklet.

The main reason I wanted this functionality is because I bookmark all sorts of sites on delicious with their bookmarklet, but I have to take my hands off the keyboard and use the mouse to do it. Now I can just hit a few keys, type in some tags and be done.

Here’s my example shortcut:

  Send ^l
  SendInput {Raw} (Paste the contents of the bookmarklet here)
  SendInput {Enter}

The first line makes the shortcut Control-Alt-9. The next line puts the cursor in the Firefox URL bar. The third line types the link of the bookmarklet into the URL bar. The last line hits enter, submitting the bookmarklet.

SendInput is the fastest way to send data, but it still takes a long time to enter the text. This is far from a perfect solution, but until I find a better one this gets the job done.

Number of readers
- home
news links
other links

about me
blog archives
funny lists
web designs
webmaster help

Become a Patron

Most Popular Pages

Sign up
Enter your email address to be notified of new blog posts

Search blog archives

December 2008
« Nov Jan »

Random quote
If people are good only because they fear punishment, and hope for reward, then we are a sorry lot indeed. -- Albert Einstein

(See all the quotes)

Say hi on

(?) Choose theme:  X X X X X X
Page loaded in 0.0211 seconds