Friday, December 2, 2011

keyboard navigation on google search (knogs)

on chrome 44, window.open() opens a new window instead of a new tab if the shift key is pressed ... which conflicted with the use of shift-o

'o' now opens a link in a new tab, enter opens in the current tab, and shift-enter or shift-o open in a new window

tl;dr - the alternatives worked, but they were no substitute for the real thing, so i wrote my own wrapper

google's experimental search page used to list a keyboard shortcuts feature. it's been deprecated for a long time, and was showing some rust, but was still working, was still an invaluable part of my desktop. a few days ago it finally stopped working. so i tried the google-recommended replacement, the accessibility experiment

it's not officially supported for chrome

instead of a cursor (a la gmail) it highlights the selected item

too large, can't change defaults, leaves artifacts

it works, though it's a bit clunky

i sent the usual scathing critique to google begging them to give us back the keyboard shortcuts experiment (i'd actually be willing to pay for search + shortcuts, i should have mentioned that). but i wanted to list some of the good stuff about the accessibility experiment

"n" and "p" move to the next and previous item, including to the next and previous page ... this is a feature that was often requested (and at one point worked iirc) for the shortcuts

shift-enter is an undocumented shortcut that will open the selected link in a new page

just tried it in firefox - the highlight box is still too large and no obvious way to change the default. but it does make a cute clicking and wooshing sound as you move though the results, unfortunately a second or two after moving the cursor

another option is google's standard search. pressing tab provides a small cursor that can be controlled with the up and down arrows. enter or ctrl-enter open an item. it's workable, but kludgey. i also tried the 43131 userscript, but couldn't get it to work on chrome

google still hosts the javascript that does the actual control, they just don't provide a means of injecting it, and it's got a little bit-rot. so i wrote my own wrapper. it looks like a userscript, but it doesn't really work right on firefox, so consider it chrome-specific. the shortcuts conflict with google's instant search, so i have a kludge to fix some focus issues that mostly works. here it is: keyboard navigation for google search on chrome. at some point i'll probably write my own javascript (as opposed to wrapping googles), but in the meantime i hope this works for some people

Thank you OP for making this fix that I still can't understand why Google hasn't done so already and yjsoon for pointing me here. This whole "enhanced" accessibility search is just too much pain to watch.

just released a new version that fixes a problem with loading ... if a page had ads with id "mbEnd", it caused the google provided js to bomb out. i remove that id and the js loads correctly (though unfortunately it makes the ads look worse)

Woah! I wrote a comment here waaaay back in December 2011. Had given up on getting Google search keyboard shortcuts working long ago but somehow tonight decided to look through some old bookmarks. So cool to find your extension and it's working perfectly for me so far. Thank you!!