Google Desktop's Ctrl,Ctrl feature on windows?

7

3

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?

Daniel Kaplan

Posted 2014-02-13T23:34:19.237

Reputation: 419

SoftwareRecs.SE now exists for questions like this. – Jon – 2016-09-25T06:38:34.083

1Your question is asking for a software recommendation which is off topic. – Sickest – 2014-02-13T23:46:52.023

@Sickest where's the appropriate place to ask? – Daniel Kaplan – 2014-02-13T23:49:36.187

not sure, i doubt anything like this exists anyway, so no point really. plus your question is way too broad, what exactly are you trying to search when you press cltr x2s? files or a web search? – Sickest – 2014-02-13T23:51:27.527

@Sickest web search, as in the example. – Daniel Kaplan – 2014-02-13T23:52:00.217

you could add an address bar to your taskbar. – Sickest – 2014-02-13T23:54:58.633

@Sickest what task bar? I'm not trying to go to a website, I want to do a google search. – Daniel Kaplan – 2014-02-13T23:57:31.700

That website does not exist on this network. – Ramhound – 2014-02-14T00:13:28.553

made edit that asks for a procedure to get it implemented in windows, instead of asking for software recomendations – Hashbrown – 2014-02-15T05:40:42.760

Answers

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/#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  
}

andromeda947

Posted 2014-02-13T23:34:19.237

Reputation: 364

+1: it works fine. Is it possible to get Google Search Autocomplete in a dropdown box?

– Andriy Tylychko – 2016-09-25T20:23:54.817

any idea why it opens empty google result when # symbol is used in search query? – Andriy Tylychko – 2016-09-25T22:30:08.127

1Autocomplete would be too complex for me right now. But I edited the script to fix the # issue. – andromeda947 – 2016-09-26T18:29:16.327

1I was looking for the same functionality from long time; your AutoHotKey script is serving the purpose without bells & Whistles. Thank you – Rap – 2018-09-05T05:53:01.053

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

Posted 2014-02-13T23:34:19.237

Reputation: 1 720

Did you use that feature? It's hard to explain how useful it is if you wasn't addicted to it. Unfortunately opening a new Chrome window is not an option. I used it very often, so this would lead to tons of opened chrome windows. It's bad as I usually try to group my tabs in different windows by some criteria. Plus other differences. – Andriy Tylychko – 2016-09-24T21:23:51.090

if you've already got chrome open and want the results as a new tab in a specific window then Ctrl+T is your friend – Hashbrown – 2016-09-25T05:36:01.223

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

Posted 2014-02-13T23:34:19.237

Reputation: 31

Exactly what my suggestion would've been. A short google search led me to believe Ctrl Ctrl isn't possible, but it also offered a solution: http://www.deanhouseholder.com/projects/launchy-ctrlctrl/

– TacoV – 2016-09-28T13:33:41.283

0

I wrote a version in Python using Tkinter:

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

marczellm

Posted 2014-02-13T23:34:19.237

Reputation: 521