10

When I write a search query in the url bar in Chrome, I want the focus to go on the search result.

In Chrome I can search for something, then hit tab and select the results with my arrow keys (and open the link with return).

Is there any option/shortcut to focus the page after search?

enter image description here

6
  • 1
    Sorry, but I don't really understand what you mean. When I press tab in Chrome while in the searchbar, I can only select my bookmarks.
    – gentmatt
    Jul 26, 2012 at 7:15
  • when you use the search feature in chrome, it gives you focus on the page of the results, instead of leaving the focus on the url bar
    – pistacchio
    Jul 26, 2012 at 7:17
  • 1
    instant updates the page as you type, i'm talking about focus on the page after you hit enter
    – pistacchio
    Jul 26, 2012 at 7:20
  • 2
    Ok, I understand what you mean now. I'll edit your question to make it more clear.
    – gentmatt
    Jul 26, 2012 at 7:22
  • 1
    Ok, I noticed you already mentioned the excessive tabbing. I removed it from the question as this actually is this answer.
    – gentmatt
    Jul 26, 2012 at 7:34

9 Answers 9

7

Let me make a clarification.

The problem is real, and we got it with the unique URL bar behaviour in Safari 6.

If you make a google search from the URL bar, Safari doesn't bring the focus to the document, but (for some reason, e.g. assuming you continue with typing new search keywords) leaves the focus in the URL bar. This causes that you can't instantly use the very advanced keyboard handling of Google's search results pages - which is: from the input field TAB gives you a selector arrow and you can navigate with keyboard arrows.

For using the search result page's keyboard handling, you have to bring the focus to the document. Now, whether it's easy or not depends on your keyboard settings in System Preferences. If the setting which says "Full Keyboard Access: In windows and dialogs, press Tab to move keyboard focus between:" is set to "Text boxes and lists only", then it's easy to bring the focus to the document by hitting Tab only once. But if it's set to "All controls" (which actually happens a lot if you're accustomted to using the keyboard in UI navigation), then Safari brings you through all the bookmark bar items and such buttons when you hit Tab. This is definitely a no-way.

You always need to switch back to "Text box only" (by hitting Ctrl-F7). The problem is that in this mode you can't navigate between form elements like checkboxes and buttons.

In Chrome the problem doesn't exist, because Chrome always brings the focus to the document when doing a search.

Apple should definitely address this issue.

Until then, a workaround can be that you hit Ctrl-F (moves focus to in-page search), then hit Tab 4x.

4
  • I like Safari 7 selecting the search bar after the search. Thus I can easily refine my search. May 31, 2014 at 15:41
  • Is it possible to create an extension to have the best of both worlds?
    – abc123
    Jul 21, 2014 at 5:03
  • This seems to have broken again in Safari 8. I have to hit tab, then the down arrow to get the first search result.
    – abc123
    Nov 4, 2014 at 5:09
  • There's another thing that really solves it. In Safari preferences, go to "Advanced". Look for a checkbox labeled "Press tab to highlight each item on a page". It bothers me that this is not the default.
    – Ernesto
    Sep 6, 2018 at 13:19
5

In Safari 12 (and possibly earlier versions), pressing the Escape key after the page has finished loading will focus the web page content, letting you use any keyboard shortcuts that the web site has defined (such as the J and K keys in a search results page in Duck Duck Go).

If you press the escape key before the page has finished loading, it will simply stop the page from loading. Fortunately, search results pages from the major search engines load quite fast so it’s not too much cognitive load to wait.

Sadly, Google have removed custom keyboard shortcuts from their search results page. You can use the Tab key to move between page elements, but you must tab through UI elements like the search input box before getting to the results.

This keyboard shortcut is not listed in the Help section inside Safari, or in the keyboard shortcuts help page on Apple’s support site.

1

I haven't been able to replicate the exact Chrome behaviour, but I adapted this extension for Safari, and maybe it'll help if you're used to keyboard shortcuts. What it does:

  • After searching, remove focus from the search field
  • Navigate results using j (down), k (up) and / (search field focus)

The extension and source can be found here.

1
  • You'll see a link to the Safari extension in the README of the link. It works great! Apr 12, 2015 at 13:42
0

It's almost the same in Safari but you need to hit tab three times instead of one.

  1. Search in the url bar
  2. Hit enter
  3. Hit tab tree times and use the / to navigate between the results
5
  • i guess you haven't any bookmarks. the first tab goes to the "download" button, the other on the bookmarks. if you have many (like me), you have to hit tab too many times :(
    – pistacchio
    Jul 26, 2012 at 7:29
  • @pistacchio Are you talking about Safari now? I do have a lot of bookmarks. The first tab jumps to the search bar of the webpage, the second tab jumps to the preview of the first search results (but does not select it), the third tab selects the second search result.
    – gentmatt
    Jul 26, 2012 at 7:36
  • @pistacchio I'm using Safari 6 in Mountain lion. Are you using Safari 6 in Lion?
    – gentmatt
    Jul 26, 2012 at 7:37
  • yes, i haven't upgraded to ML yet.
    – pistacchio
    Jul 26, 2012 at 7:56
  • @pistacchio — You have to tab so much because your System Prefs have been changed. In the System Prefs, set Tab to switch between text fields and lists only. Thus you will need much less Tabs. May 31, 2014 at 15:53
0

This is a serious problem for keyboard users in Safari. The omnibox can't be used for search via google without having to use the mouse to open search results.

0

If you haven't enabled full keyboard access from System Preferences, you can press tab twice.

If you have enabled full keyboard access, you can press shift-tab three times.

0

If you customize your toolbar to have no items to the right of the search bar, you can move your focus to the page with a single press of tab.

0

If you simply want to select Google search results using the keyboard, first run this:

d=~/Library/Scripts/Applications/Safari;mkdir -p $d;for i in {1..9};do echo 'tell app"safari"to do javascript"window.location.href=document.querySelectorAll(\".r>a:first-child\")['$((i-1))'].href"in document 1'|osacompile -o "$d/Select Google Link $i.scpt";done

Then use FastScripts to assign a keyboard shortcut to the scripts.

The :first-child part above is needed to skip the "Translate this page" links.

0

I discovered this way to mouselessly visit search result web sites—in part by accident:

  1. ⌘L → focus on URL search field in Safari.
  2. Type search terms & hit enter.
  3. Search results are displayed and focus remains in the URL search field.
  4. Hit tab. Focus moves from URL search field to DuckDuckGo's Search field.
  5. [This was the accident]: Hit Escape. Focus moves to a magnifying glass button next to the DuckDuckGo search field.
  6. Now use either "j" or down-key to move down your results.
  7. Hit return when you land on a plausible source of funny cat videos to visit that site.
  8. Use Safari's "Search Results Snapback" (⌥⌘S) to return to your DuckDuckGo search results. My previous choice was highlighted again.
  9. Use j/l or down-/up-key to move about

this is with Safari Version 12.1.2 (14607.3.9) & DuckDuckGo

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .