52

This question already has an answer here:

As of today, Google Instant Search is dead. This is what it used to look like:

https://www.youtube.com/watch?v=ANVT56wlmTo

I never cared much for the instant display of results while I typed. However, I did use, hundreds of times a day, the keyboard shortcuts it allowed.

For those that never used it - with instant search turned on, you could:

  • Press enter after a search, and use the up/down keys to move a 'pointer' down through the results

  • Then press 'enter' to open a search result being pointed at

  • At any point in time, typing letters/numbers on the keyboard would refocus on the search bar

  • Pressing enter with a result highlighted could be combined with the ctrl modifier to open a result in a new tab.

I find the mouse quite difficult to use and try to avoid it when possible. Is there a tool or script I could use to replicate the keyboard behaviour that instant search used to give me?

Previous questions have asked (and been answered) in the era of instant search (e.g. this, this and my previous question here), while I'm looking for a non-google replacement with the same functionality.

I am using Chrome on Ubuntu 15.01.

marked as duplicate by Burgi, Pimp Juice IT, fixer1234, music2myear, G-Man Aug 5 '17 at 3:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    You remember correctly, it used to work fine. It seems it has gone away along with the instant search. searchengineland.com/… . But are you sure the instant search is still working for you, though? For me, it doesn't do a search before I press enter any more. (I like that behaviour, but I want the little blue arrow back, like you do.) – Bloke Jul 26 '17 at 15:11
  • 1
    this is extremely disappointing .... it seems the hotkey to use '/' to return to the search bar has also gone away with instant search – itzjustricky Jul 26 '17 at 15:54
  • 3
    In the same position as you. It's bizarre the most popular web page on the planet has messed up this simple UX design. I'm sure a greasemonkey/tampermonkey script could work but not the most desired solution. – Kable Jul 27 '17 at 7:54
  • You can still navigate the search results using the Tab key. – Seth Jul 27 '17 at 10:30
  • 2
    chrome.google.com/webstore/detail/keyboard-shortcuts-for-go/… This one works perfectly out of the box for me! Chrome only obvi. – Thalassophobia Jul 28 '17 at 2:47
24

Google have removed this feature (called Google Instant Prediction), so you can't just turn it out like you used to be able to.

I was so sad to see this feature go that I wrote a hack to re-engineer it last night. So far it only works with Google Chrome, but can be adapted to work with all the others:

  1. Install Chrome extension ShortKeys.
  2. Click on the ShortKeys menu and select "Options" enter image description here
  3. Click on "Add" and fill in the following fields:

Keyboard Shortcut: tab

Behavior: Run JavaScript

Label as: Result Picker

  1. Paste the following JavaScript into the JavaScript code to run:

    document.selectedResultId=0
    function selectResult(newId){
        els = document.querySelectorAll("div.r h3")
        if(newId < 0 || newId >= els.length)
            return  //Could modify for page nav...?
        rp = document.getElementById("result-pointer")
        if(rp != null){
            rp.remove()
        }
        document.selectedResultId=newId
        el = els[newId]
        lnk = el.firstElementChild
        el.innerHTML = "<div id=\"result-pointer\" style=\"position:absolute;left:-15px;\">&gt;</div>" + el.innerHTML
        lnk.focus()
    }
    document.onkeyup=function(event){
        if(event.keyCode==38)
            selectResult(document.selectedResultId-1)
        if(event.keyCode==40)
            selectResult(document.selectedResultId+1)
        if(event.keyCode==13){
          var el = document.querySelectorAll("div.r h3")[document.selectedResultId]
          var lnk = el.parentElement
          var url = lnk.href
          if(event.ctrlKey){
            var win = window.open(url,"_blank")
            win.blur()
            window.open().close()
          }
          else{
            document.location = url
          }
        }
    }
    selectResult(0)
    
  2. Configure the Activation Settings:

Active while in form fields (Checked)

Websites (Only specific sites)

URLS (one per line): *.google.*

This is what the Options page should look like

ShortKeys Options Page

  1. Click Save and then close your browser.

Instructions:

  • When you restart you should see a little blue ">" appear by search results when you hit tab.

  • The up/down arrow keys make it cycle through the results.

  • Hitting "Enter" will navigate to the highlighted result.

  • Hitting "Ctrl+Enter" to open the result in a new tab.

Happy Searching!

12

I've created a Chrome extension that will add back the primary keyboard functionality (that I used at least). If the search box isn't focused, pressing any key will automatically focus it. In addition, arrow keys and tab/shift+tab will let you navigate between results. Hopefully this can help us remain productive until Google (hopefully) adds the functionality back.

https://chrome.google.com/webstore/detail/google-search-result-keyb/iobmefdldoplhmonnnkchglfdeepnfhd?hl=en&gl=US

Here's the code for the extension in case you want to edit it:

(function() {
  'use strict';

  var isResultsPage = document.querySelector('html[itemtype="http://schema.org/SearchResultsPage"]');
  if (!isResultsPage) {
    return;
  }

  var searchbox = document.querySelector('form[role="search"] input[type="text"]:nth-of-type(1)'),
      results = document.querySelectorAll('h3 a'),
      KEY_UP = 38,
      KEY_DOWN = 40,
      KEY_TAB = 9;

  function focusResult(offset) {
    var focused = document.querySelector('h3 a:focus');

    // No result is currently focused. Focus the first one
    if (focused == null) {
      results[0].focus();
    }
    else {
      for (var i = 0; i < results.length; i++) {
        var result = results[i];
        if (result === focused) {
          var focusIndex = i + offset;
          if (focusIndex < 0) focusIndex = 0;
          if (focusIndex >= results.length) focusIndex = results.length - 1;
          results[focusIndex].focus();
        }
      }
    }
  }

  window.addEventListener('keydown', function(e) {
    e = e || window.event;

    var isSearchActive = searchbox === document.activeElement,
        keycode = e.keyCode,
        // From https://stackoverflow.com/questions/12467240/determine-if-javascript-e-keycode-is-a-printable-non-control-character
        isPrintable = (keycode > 47 && keycode < 58)   || // number keys
                      (keycode > 64 && keycode < 91)   || // letter keys
                      (keycode > 95 && keycode < 112)  || // numpad keys
                      (keycode > 185 && keycode < 193) || // ;=,-./` (in order)
                      (keycode > 218 && keycode < 223);   // [\]' (in order)

    if ((!isSearchActive && e.keyCode == KEY_DOWN) || (e.keyCode == KEY_TAB && !e.shiftKey)) {
      e.preventDefault();
      e.stopPropagation();
      focusResult(1); // Focus next
    }
    else if ((!isSearchActive && e.keyCode == KEY_UP) || (e.keyCode == KEY_TAB && e.shiftKey)) {
      e.preventDefault();
      e.stopPropagation();
      focusResult(-1); // Focus previous
    }
    else if (!isSearchActive && isPrintable) {
      // Otherwise, force caret to end of text and focus the search box
      searchbox.value = searchbox.value + " ";
      searchbox.focus();
    }
  });
})();
9

As of 2017-07-31, Google removed this feature entirely from search.

I created the open source Web Search Navigator extension to fix this and add extra features (like configurable keyboard shortcuts).

See installation instructions.

Hope you find it useful, but in any case - feedback is welcome!

  • 2
    This is brilliant! More people should be aware of it. – SlavaSt Jan 7 '18 at 19:34
  • The Chrome-link is 404 now – Rheven Sep 27 '18 at 7:35
  • @Rheven see updated answer – infokiller Oct 1 '18 at 10:54
4

For firefox I solve this issue by Google Search Result Keyboard Shortcuts add-on. https://addons.mozilla.org/en-US/firefox/addon/google-search-result-shortcuts/?src=api

1

You may try extensions that introduce Vim-like keybindings. With them you'll never need to use your mouse again. For example, cVim is the one that's currently most powerful for Chrome, while Vimperator is the one for Firefox.

With such extensions you can access any link on the current page by pressing f (by default) followed by a one/two key combination.

Not the answer you're looking for? Browse other questions tagged or ask your own question.