Friday, 30 March 2012

How to Make Backspace in Windows 7 or Vista Explorer Go Up like XP Did ?

One of the biggest annoyances for those going straight from XP to Windows 7 is that the backspace key no longer moves you Up a folder like it used to—now it moves you Back in the folder browsing history.
If you’ve used the key a couple of times, you might think I’m wrong—but you can easily test it out by going into one subfolder, then hitting Back, then going into another subfolder and hitting Back, then going into a third subfolder and hitting Back twice. You’ll end up in the previous subfolder.
If you want to go Up a folder in either Windows 7 or Vista, you can use the Alt+Up shortcut key, which will always go to the parent folder.
The Awesome AutoHotkey Fix
Now that we know the shortcut key that actually works in Windows 7, we can use a small script to make it work the way we really want it to. With AutoHotkey installed, create a new script with New –> AutoHotkey Script, and then paste in the following:
#IfWinActive, ahk_class CabinetWClass
   ControlGet renamestatus,Visible,,Edit1,A
   ControlGetFocus focussed, A
    SendInput {Alt Down}{Up}{Alt Up}
      Send {Backspace}
How Does This Work?
Ordinarily you can simply re-map the key with a Backspace::!{Up} type of deal, but since the backspace key is useful in the search box, location bar, and when you’re renaming files, you can’t just do a simple mapping—instead you have to check to see which control is active before sending the alternate Alt+Up key combination.
The first line with the #IfWinActive tells AHK to only activate this shortcut key override if Windows Explorer is the active window, which helps fix any possible conflicts in other applications.
The ControlGet and ControlGetFocus lines do the actual work of checking the status of the controls, and then depending on whether they are focused or you are in the process of renaming a file, it either sends the alternate Alt+Up or just sends the regular Backspace key.
Download a Pre-Made Application to Make Backspace Work like XP
Since the majority of you probably aren’t familiar with AutoHotkey, and don’t have any interest in how the scripts work, I’ve put together a customized version of the script as a tiny little executable that will run in the background.
It doesn’t take a ton of memory, as you can see in the screenshot.
To install HTGBack, just download, extract, and then create a shortcut in the shell:startup folder:
Double-click on the executable, and your Backspace key should start working like it used to in XP. Note that we only tested this on Windows 7, but assume it will work for Vista as well.