7

One thing I like about Google Desktop is you can configure it so that when you press Ctrl,Ctrl, it will bring up a dialog that looks like this:

Input box widget

The dialog will have focus and I can type in there, press enter, and then it will open a new tab in my default browser using the contents of the text box.

For instance; this allows me to type
Ctrl,Ctrl, foo, Enter
and it will open up this url: https://www.google.com/#q=foo

Is there a way to do this in Windows? Failing that, is there a tool that will work like this?

Oliver Salzburg
  • 89,072
  • 65
  • 269
  • 311

5 Answers5

6

It's possible to do this with a script for AutoHotkey (Windows automation software). Just open notepad, paste the code below and save it with the .ahk file extension. I could only test it on Windows 7 though. But it opens the search URL on a new tab as expected. The search dialog box looks like this:

this

global MySearch
Gui, Margin, 9, 10
Gui, Font, s12
Gui, Add, Edit, vMySearch w400 -WantReturn
Gui, Font, c999999 s7
Gui, Add, Text, Y+3, Press <ctrl> twice to hide/show.

GuiEscape: Gui, Hide

#ifWinActive Google Search NumpadEnter:: Enter:: submitSearch() return #IfWinActive

Ctrl:: KeyWait, Ctrl KeyWait, Ctrl, D, T0.12 if ErrorLevel = 0 { if WinActive("Google Search") Gui, Hide else Gui, Show,, Google Search } return

submitSearch(){ Gui, Submit searchURL := "https://www.google.com/search?q=" . urlEncode(MySearch) Run, %searchURL% GuiControl,, MySearch }

urlEncode(url){ VarSetCapacity(Var,StrPut(url,"UTF-8"),0),StrPut(url,&Var,"UTF-8") While Code:=NumGet(Var,A_Index-1,"UChar") Res.=(Chr:=Chr(Code))~="[0-9A-Za-z]"?Chr:Format("%{:02X}",Code) return,Res
}

2

What you could do is create a keyboard shortcut (without using any software!) to launch Chrome. Once you do that, you can hit the shortcut and when Chrome opens, it shows up with its address bar highlighted. Just type and hit enter.

Basically your exact use-case, except no middle-man (just type directly into the browser).

I don't think ctrl+ctrl, specifically, is possible (due to left/right ctrls not being distinguished and just being control keys).


Should the link die you can create a keyboard shortcut (without third party software) by;

  • creating an ordinary shortcut (type chrome into your start menu, rightclick on the icon -> copy, then rightclick in some folder -> Paste shortcut)
  • go into the properties of the shortcut (rightclick -> properties), under the Shortcut tab there should be a Shortcut key field.
  • type a key combination and hit Ok. That's it (the shortcut file will need to exist for the keyboard shortcut to continue to work)

As a further note, it turns out the result in the startmenu search for chrome is a shortcut, so you can skip the first step and just go into the properties of the menu item to add the Key shortcut field.

Hashbrown
  • 3,338
  • 4
  • 39
  • 51
1

It's possible to do something similar to this (among other things) with the Open Source software Launchy.

By default the shortcut to open the bar is Alt + Space (You can change this but I don't think ctrl, ctrl is possible...)

To google search you would type "google" TAB "foo" ENTER.

dahston
  • 31
1

Try FluentSearch - it does exactly that: you press Ctrl + Alt then start typing.

(Later Edit) You can even customize the hotkey to be Ctrl + Ctrl: enter image description here

marin
  • 111
0

I wrote a version in Python using Tkinter:

https://gist.github.com/marczellm/9bb3a39c14fdf5a28c47ff132307aff6

marczellm
  • 511