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:

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

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
docs
entertainment
experiences
funny lists
humor
intellectual
interests
music
opinions
photos
web designs
tools
software
webmaster help

Most Popular Pages


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



Search blog archives

Calendar
December 2008
SMTWTFS
« Nov Jan »
 123456
78910111213
14151617181920
21222324252627
28293031 







Random quote
When you die and go to heaven every dog you ever owned will run up to greet you.

(See all the quotes)



Say hi on








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