Better Google Keyboard Shortcuts using Greasemonkey
written on Thursday, March 5, 2009
Caution!
This post should only be used for historical reference. I am no longer supporting the Greasemonkey script at this time.
I used to be one of those "simple" folk using Google the normal way. This has got to be one of the most aggravating experiences. Even more so when looking for answers on an obscure topic. This is because Google is tricky to use, and getting results always takes multiple attempts. Even with a good search, it's likely the best match is buried a few pages in. The action of typing, scrolling, mousing, then clicking a few links, only to "rinse and repeat" 15 seconds later is enough to inflame my wrist with an RSI in under 20 minutes. After a full day of work, this becomes hazardous to your health.
You might be thinking that this kind of thing doesn't bother you. Well, just wait until you try Google with optimized keyboard shortcuts. You will never want to go back, I promise!
Since sometime back in 2008, I have been using the Google Experimental Keyboard Search feature to the point that it is almost second nature. With it, I can bring up a search and get 10 result pages loading in the background, in under 5 seconds. The speed comes from the fact that you can search and open selected results without ever having to leave the keyboard. Try it out for yourself.
You can easily enable this feature, but there are a few minor annoyances you have to deal with:
- The "stickiness" of the feature is tricky and I frequently find that the Google search page eventually resets back to the default mode. The only way to solve this it seems is to go back and re-join the experiment.
- There is no way to skip forward or back in the search results. Essentially you are stuck to the first page of results. This actually used to not be an issue, but sometime around late 2008 the J/K keys were disabled from jumping to the next and previous result pages.
Greasemonkey Script
Ok, so what is the solution to the bugs? The answer is Greasemonkey. If you haven't heard of Greasemonkey, it is an add-on for Firefox users (you do use Firefox right?) to tweak any web page you download with custom JavaScript code.
I wrote a custom Greasemonkey script that will always enable the Google Experimental Keyboard Search feature. This script also solves the other two bugs listed above.
Setup
Using Greasemonkey and user scripts is easy.
- If you do not have Greasemonkey, install it from the Mozilla Add-on page. Restart Firefox.
- Install my Google Search Enhanced Keyboard Navigation user script with the Installer Link.
Usage
After the script is installed, the Google search result page will have a selection arrow on the left-hand side. The arrow indicates the active link that can be opened.
The following keyboard commands can control the page navigation:
| Key | Action |
|---|---|
| H | Opens the previous results page. |
| J | Selects the next result. |
| K | Selects the previous result. |
| L | Opens the next results page. |
| O | Opens the selected result. |
| <Enter> | Opens the selected result. |
| / | Puts the cursor in the search box. |
| <Esc> | Removes the cursor from the search box. |
Happy Googling!