How do I change what CTRL+ENTER does in IE?


When using IE, CTRL+ENTER is a very useful shortcut.  It puts ‘http://www’ before the text in the address bar and ‘.com’ at the end.  So if I want to visit ‘http://www.microsoft.com’ all I have to do is type ALT+D, microsoft, CTRL+ENTER.  But what if I want to change what CTRL+ENTER does?  Is that possible?  Of course it is!  To change it:

1.  Create the following registry key:  HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Toolbar\QuickComplete.
2.  Create the following registry value in the key above:    QuickComplete    REG_SZ    http://www.%s.whatever
3.  Whatever is in the address bar will be inserted where the ‘%s‘ is. This example would complete ‘microsoft’ to ‘http://www.microsoft.whatever’. 
4.  Please note that the QuickComplete string is currently limited to 64 characters. 

I have heard rumor that we got the extension wrong in Sweden (.sv instead of .se).   This should let you change it.

Comments (23)

  1. mos says:

    Snazzy. I’m using the Whidbey beta, so I visit the msdn website for help more than I press ‘F1’ nowadays (here’s to hoping the help links get cleared up next beta). By making the msdn help search URL be my quick complete, I will save myself a whole three keypresses!

    http://search.microsoft.com/search/results.aspx?qu=%s&View=msdn&st=b&c=0&s=1&swc=0

  2. The rumour is true! Thanks for this tip!

    Btw, why is the TLD hardcoded? Why isn’t the TLD picked based on my language setting in IE..?

  3. Ram says:

    Cool. Thanks for sharing this info.

    Just out of curiosity, I typed "%d%s%s" as the QuickComplete string and the results were interesting! I don’t know if it indicates a security hole but you may want to get it checked out.

  4. jeffdav says:

    Jesper-

    I am not sure what the decision making process was. This is some very old code, and the original author is no longer on the IE team. My guess is to avoid having a lookup table. It is much easier to just put the string in the resource dll and let the localization team localize it.

    More info was dug up at lunch: SV is the language code for Sweden, SE is the country code. So it is obvious why this got localized wrong– the localization team is always thinking about language codes.

    SV is the country code for El Salvadore, according to Raymond.

  5. Niclas says:

    Please fix the .sv to .se in a patch. We was waiting for a fix with Xp sp1, and sp2…

    Regards /Niclas

  6. Marty Garins says:

    Excellent tip Jeff.

    You might want to discuss the cool feature in IE when working with this reg key

    HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerSearchUrl

    I personally use this quite a bit.

  7. John Waller says:

    Excellent tip!

    Now what if I *want* to keep CTRL + ENTER = "http://www.<domain&gt;.com"

    PLUS have another shortcut for "http://www.<domain&gt;.com.au"

    Can this be done with another Registry edit?

  8. jeffdav says:

    John-

    This only works with CTRL+ENTER. Like I said, this code is pretty old. 🙂

  9. Raymond Chen says:

    John, you can use SearchUrl and create a keyword.

    au domain -> http://www.domain.com.au

    for example.

  10. John Waller says:

    >>John, you can use SearchUrl and create a keyword.

    Thanks for the tip, Raymond.

  11. David Candy says:

    http://www.mvps.org/serenitymacros/ie5.html will tell you how to make AutoScan work for Austrian domains. It isn’t very useful since it was nobbled in IE5 and stupid AutoSearch, which I have never used (and will close the window even if it finds something), took precedence.

    I WILL NOT USE MSN ANYTHING. I will not accept redirection, or hijacking as some call it, to a site I have no relationship with and don’t want one.

    I use this site to work out what country is what

    http://www.theodora.com/country_digraphs.html

  12. David Candy says:

    In IE4 there was a registry key (I forget where) near where the AutoScan keys are whose name and template suggested it was for this. But changing it seemed to do nothing. When was this key introduced.

  13. jeffdav says:

    David-

    I remember seeing those too… I’ll try to remember to track them down and see what’s up. I am not sure when it was introduced. I can only go so far back in the source logs. It’s been there since at least IE5.5.

    -j

  14. MikeH says:

    Here is a fix.. IE will not connect to a web page without manually typing http://

    Using Regedit, have a look at this key:

    HKEY_LOCAL_MACHINESoftwareMicrosoftWindowsCurrentVersionURL

    The correct settings should be as follows:

    [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionURLDefaultPrefix]

    Default ="http://&quot;

    Sub-key:

    [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionURLPrefixes]

    "ftp"="ftp://&quot;

    "gopher"="gopher://&quot;

    "home"="http://&quot;

    "mosaic"="http://&quot;

    "www"="http://&quot;

    Hope it helps,

    Mike