Use accesskeys for navigating Google search results pages with Greasemonkey

The Greasemonkey script: Enables navigation through Google search results pages using ALT+, and ALT+..

This script enables accesskeys for navigating through pages of Google search results using ALT+, for “previous page of results” and ALT+. for “next page of results”. I find it useful, so maybe someone else will too 🙂

I’ve been using Jesse Rudermans Search Keys Firefox extension since he first released it. It’s brilliant – when you perform a search on any of the listed search engines it inserts the numbers 1-0 after them, and makes them links, so that pressing “1” will take you to the first result, “2” the second, and so on. This has proved very useful for me, because I’m quite the keyboard fan, and tend to search Google from the address bar, and then just press the number of the result I want to see.

The problem was that if the result I wanted wasn’t on the first page then I had to grab my mouse and click “Next”, or use find-as-you-type and hope that the word “next”, or “xt” wasn’t in any of the links already there. This script helps me get around that, so that now I have a guaranteed method of moving between pages of the Google search results. Marvellous.

Published by

15 thoughts on “Use accesskeys for navigating Google search results pages with Greasemonkey”

  1. This is great, Phil.

    Just wanted to let you know that the first sentence in your post has a typo – it says “Alt+. and Alt+.”. (neither of them is a comma).

    But nice script. I’ll add it to the wiki if it isn’t already there.

  2. Thanks for that Aaron, I would have fixed it sooner had Blogger actually been responding 🙂

    Thanks also for adding it to the wiki already! Fast moving!

  3. clapu, thanks for spotting that, I’d never have seen it myself! I’ll update the script. Thanks.

  4. This is a great script. Works well with AccessBar (i.e. tells you what keys are defined). I have one suggestion:

    In FF, you can turn off the default setting for the Location Bar to make it search google normally instead of the “I’m Feeling Lucky” search.

    The default URL when you type something in is e.g. “keyword:soccer”

    You should include an “@include keyword:*” bit in your code.

    Cheers!

  5. Nice one, used an prev/next extension before but that one was buggy.
    I changed the keys to left Alt+Z and left Alt+X because i still want find-as-you-type.

    Let’s see if i can make some ‘macros’ for webbased applications at work.

  6. I kept getting a javascript error:
    Error: a has no properties
    Source File: googleaccesskeys.user.js

    I added the following code right after you set the variable ‘a’ and it seems to have fixed the problem:
    if (!a) {
    return;
    }

  7. hi
    I’ve just recently discovered Greasemonkey, and this script would be very useful. Unfortunately, it does not work – I’ve tried it on Windows / Firefox 1.5 at work and on Linux / Firefox 1.5 at home, and nothing happens when I press alt+,/. . Am I missing something or has Google changed their html code? I analyzed html, and script seems to be doing the right think. Any ideas?
    thx

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.