Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

OS X user here. I'm currently learning both Vim and Vimium, it's been really fun. A major annoyance with Chrome is that I can press Cmd+L to highlight the address bar, but I can't unselect it without clicking on anywhere on the page (and resume to normal navigation). How do I (using the keyboard only) unselect the address bar in Chrome?

P.S. Sorry if this has been asked already. I just cannot find the combination of search terms in Google as what I'm searching for is a bit descriptive

share|improve this question

I've had the same issue but I found a simple hack. Just go to your Chrome settings and click manage search engines. Then add a new search engine with 'javascript:' as the url, and whatever word or key you want for the shortcut. I use Vim with jj or kk mapped to esc, so I used those two keys as the shortcut for my Chrome.

http://imgur.com/ipIdKUV

share|improve this answer
    
Two problems: can't set the custom engine as default. Two: how do you map a key-combo to escape? Just map jj <Esc>? – The Unfun Cat Jun 23 '15 at 8:29

I am not a OS X user, but I think this should be the same as in Windows,press the Tab once or more time after selecting the Chrome adress bar with Win+L. In Windows pressing F6 once or more times will deselect the omnibox in chrome, but I don't know if this will work also in OS X, it is worth a try.

share|improve this answer
1  
Thanks @Devid. Yup, that works as a workaround. When I try here in SuperUser though, when I press Tab, it selects the next HTML element or something. So when I attempt to scroll using j on Vimium, an error beep occurs. I can press j again, and I end up in the SuperUser search box. From there I can unselect it and navigate using keyboard. I would much rather that I just plain unselect the address bar with no side effects such as selecting HTML elements. – Daryll Santos Mar 8 '14 at 20:12
    
In windows there is also F6 and pressing it 3 times deselects the omnibox without side effects. Maybe there is something similar in OS X – Devid Mar 8 '14 at 20:25
1  
Best answer!!!! – laike9m Oct 10 '15 at 7:39
    
@DaryllSantos If this answer worked for you (it did for me) you can select it as your answer. – Spotlight May 17 at 15:33

Since you are presumably a superuser in addition to using OS X, here is my Karabiner .xml that enables me to exit the omnibox with Command_L + ; (ø on Norw/Danish keyboards). Change to whatever keycombo you need:

<?xml version="1.0"?>
<root>
  <item>

    <appendix>Use ø (;) to exit the satanically moronic omnibox in chrome.</appendix>
    <identifier>private.make_up_for_shitty_chrome_behavior</identifier>
    <only>GOOGLE_CHROME</only>

    <autogen>
      __KeyToKey__
      KeyCode::SEMICOLON, ModifierFlag::COMMAND_L,

      __{ KeyCode::TAB, KeyCode::TAB, KeyCode::ESCAPE, }__
    </autogen>
  </item>
</root>

What it does is execute the key-sequence TAB TAB ESC when you trigger it. This makes the first HTML element selected so it is kind of a hack.

I'd personally just remap ESC to ESC ESC in Karabiner so that ESC drops out of the omnibox, but that might interfere with your usage/lead to uninteded consequences.

(I could not get Wang's answer to work)

Edit: This seems like a more robust way to do it in karabiner:

<?xml version="1.0"?>
<root>
  <item>
    <name>Mouse Warping</name>
    <vkopenurldef>
      <name>KeyCode::VK_OPEN_URL_SHELL_mousetowindowcenter</name>
      <url type="shell">
        <![CDATA[
                 /Applications/Karabiner.app/Contents/Library/utilities/bin/warp-mouse-cursor-position screen 0 bottom 0 right 0
        ]]>
      </url>
    </vkopenurldef>
    <item>
      <identifier>private.f14_mousetowindowcenter</identifier>
      <name>F14 to move the mouse to the center of the current window</name>
      <autogen>
        __SimultaneousKeyPresses__
        KeyCode::A, KeyCode::K,
        KeyCode::VK_OPEN_URL_SHELL_mousetowindowcenter,
        KeyCode::VK_WAIT_100MS,
        PointingButton::LEFT,
        KeyCode::ESCAPE,
      </autogen>
    </item>
  </item>
  </root>

My first answer works for most sites, but for sites with many search boxes you need more than x tab clicks.

The code immediately above moves your cursor to the bottom left (i.e. edge of chrome window) and presses the left mouse-key once, selecting the window without any side-effects. This deselects the omnibox. I use A+K (home row, baby!) simultaneously to do this, but you will probably want to choose your own.

share|improve this answer

You must log in to answer this question.

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