Productivity
Brought to you by

Get Firefox's Ctrl+K Shortcut In Internet Explorer

Most modern browsers implement the Ctrl+K shortcut key for quickly focusing the built-in browser search box—and now you can use the same shortcut in Internet Explorer as well.

After reading about how to implement the Ctrl+L shortcut key in IE, reader Mike took it on himself to improve that script and add a number of other shortcut keys, including Ctrl+K to focus the search box, and Ctrl+Shift+Enter to automatically append “.org” to the end of anything typed into the address bar.

To use his script for yourself, create a new AutoHotkey script or add the following to your existing script:

#IfWinActive – Windows Internet Explorer ahk_class IEFrame
^k::Send ^e
^l::Send !d
^+Enter::
AutoTrim Off ; Retain any leading and trailing whitespace on the clipboard.
ClipboardOld = %ClipboardAll%
Clipboard = ; Must start off blank for detection to work.
Send {Ctrl Down}ac{Ctrl up}
ClipWait 1
if ErrorLevel ; ClipWait timed out.
return
ClipboardNew = %Clipboard%
StringReplace, ClipboardNew, ClipboardNew, .com, .org
IfNotInString, ClipboardNew, .org
ClipboardNew := ClipboardNew . “.org”
Send %ClipboardNew%{Enter}
Clipboard = %ClipboardOld%
return

This script listens for the Firefox-style shortcut keys, and then sends the Internet Explorer-specific keys to the window instead, so you can switch between Firefox and IE without constantly hitting the wrong keys by mistake. Great job, Mike!

For more Windows shortcut goodness, check out how to make Win+E open the folder of your choice, learn how to use Caps Lock for hand-friendly navigation, and see how Taskbar Overlord tweaks the Windows 7 taskbar. Brand new to AutoHotKey and its time-saving ways? Peek at our beginner’s guide to learn how to add this script, or write your own.

Comments are taking an Easter break and will be back shortly.