| View previous topic :: View next topic |
| Author |
Message |
sxizo Guest
|
Posted: Mon Oct 08, 2007 6:25 pm Post subject: Vista Explorer - Backspace for parent folder (as in XP) |
|
|
Sorry if this has been posted before - I couldn't find it easily...
When browsing folders in Explorer, in Vista, the BackSpace key is used for going back to the last selected folder, while in previous versions of Windows it was used for going Up One Level.
I created this script for performing an Alt+Up when Backspace is pressed (this is the key combination now for going to the parent folder).
I had some trouble with the editing mode (when renaming a file for example), but I overcame it by checking the Caret position, which is always 4 when browsing...
Here is the script...
| Code: | #IfWinActive, ahk_class CabinetWClass
BS::
{
if (A_CaretX == 4)
{
Send {Alt Down}{Up}{Alt Up}
}
else
{
Send {BS}
}
}
|
|
|
| Back to top |
|
 |
tagaste Guest
|
Posted: Fri Oct 12, 2007 12:04 am Post subject: |
|
|
This is a great idea: the new, technically more consistent (compare IE) behavior of the backspace key in Explorer windows is one of my biggest little pet peeves about Vista (or rather, the switch to Vista). I should probably get over it but without an up-folder button too, it's just too much for my old-fashioned self.
Problem is, the Caret check doesn't work for me. A_CaretX is never 4 when I'm browsing folders. Looking more closely (via the sample script on the help page where the A_Caret variables are explained), it looks like the X value is always 168 for me, not 4.
Oh, I see: it's because you don't have a navigation pane open -- although when I close mine, I get an X value of 8.
Perhaps there are more reliable hacks? Testing for contents of Clipboard after copying? |
|
| Back to top |
|
 |
enj0y Guest
|
Posted: Fri Oct 19, 2007 9:51 am Post subject: |
|
|
Hello,
in order to make it work on my system i had to change the "if" condition to:
| Code: |
if (A_CaretX == 8 or A_CaretX == 493)
|
the 8 is required if the DirectoryTree on the left side of the explorer is focused and the 493 is used if the File/DirectoryListing on the right is focused.
Thanks a million for the Tool and Script, the "backspace" behaviour of the Vista explorer was really annoying me!
Greetings! |
|
| Back to top |
|
 |
Gav_ Guest
|
|
| Back to top |
|
 |
Guest
|
Posted: Fri Sep 18, 2009 2:55 pm Post subject: QTTabBar is the way to go! |
|
|
Install QTTabBar,
Log off & on again to enable in Explorer.
In Explorer, right-click on the menu area and tick "QT Tab Bar" and "QT Tab Standard Button"
Right-Click On QTTabBar and choose Options
Goto Misc Tab
Check"XP-compatible BS Key(Vista)
Nice
Tabbed explorer browsing is a bonus. |
|
| Back to top |
|
 |
hypsilon Guest
|
Posted: Sun Oct 18, 2009 2:56 pm Post subject: |
|
|
Thanks for the code, if you want to enable it in windows 7 the values change as follows:
| Code: |
#IfWinActive, ahk_class CabinetWClass
BS::
{
if (A_CaretX == 149 or A_CaretX == 5)
{
Send {Alt Down}{Up}{Alt Up}
}
else
{
Send {BS}
}
}
|
|
|
| Back to top |
|
 |
fragman
Joined: 13 Oct 2009 Posts: 1194
|
Posted: Mon Oct 19, 2009 6:35 pm Post subject: |
|
|
This will also do, it's a bit more advanced but works for me:
| Code: | Backspace::
;make sure no renaming in process and we are actually in list or in tree
ControlGet renamestatus,Visible,,Edit1,A
ControlGetFocus focussed, A
if(renamestatus!=1&&(focussed="DirectUIHWND3"||focussed=SysTreeView321))
{
SendInput {Alt Down}{Up}{Alt Up}
return
}else{
Send {Backspace}
return
} |
|
|
| Back to top |
|
 |
noobie Guest
|
Posted: Thu Nov 19, 2009 10:42 pm Post subject: where to put this code |
|
|
hi guys,
i liked your fix, i have the same annoyance.
could you please tell me where to put this script so it will work for all windows? |
|
| Back to top |
|
 |
Khanbaba Guest
|
Posted: Tue Feb 23, 2010 11:57 am Post subject: The fix not working for me |
|
|
I have installed Autohotkey software. I have pasted the code into a .ahk script file. But even after that the backspace key does not seem to work like alt+up.
In the same .ahk script file, I have defined one other hotkey as well (Win+Z) to open www.gmail.com in default web browser. This hotkey (to open gmail) is working but not the previous one (to override Alt+up by baskbpace key)
Please help me to to fix it. I am using Windows 7 ultimate. |
|
| Back to top |
|
 |
fragman
Joined: 13 Oct 2009 Posts: 1194
|
Posted: Tue Feb 23, 2010 10:45 pm Post subject: |
|
|
Did you try my code?
I have (similar) code that does the same and works for Win7 in the program I'm working on. |
|
| Back to top |
|
 |
Khanbaba Guest
|
Posted: Wed Feb 24, 2010 12:54 am Post subject: Resolved issue of configuring Backspace key for Windows 7 |
|
|
Thanks Fragman,
But I tried your code as well. It did work except for the fact the backspace key lost its function as a key to delete one character to the left when used in case of other applications in stead of Windows Explorer.
Then I tried to combine your code with the first line of that posted by "sxizo" and then it worked for me perfectly.
So the complete code that I used is below and it is working for me in windows 7:
#IfWinActive, ahk_class CabinetWClass
Backspace::
;make sure no renaming in process and we are actually in list or in tree
ControlGet renamestatus,Visible,,Edit1,A
ControlGetFocus focussed, A
if(renamestatus!=1&&(focussed="DirectUIHWND3"||focussed=SysTreeView321))
{
SendInput {Alt Down}{Up}{Alt Up}
return
}else{
Send {Backspace}
return
}
with the above code I am able to use the backspace key to explore the up folder, while at the same time to delete one character to left in case of renaming folders or in any application other than windows explorer.
Thanks you all guys. |
|
| Back to top |
|
 |
kidmar
Joined: 04 Oct 2007 Posts: 69
|
Posted: Sun May 22, 2011 6:48 pm Post subject: |
|
|
Sorry for opening this post again, but I found an error and did some improvements to the code:
| Code: | FunBackspaceExplorer()
{
If WinActive, ahk_class CabinetWClass
{
ControlGetFocus focussed, A
; Return true only if current control isn't an edit control
if (NOT InStr(focussed, "Edit"))
Return 1
}
return 0
}
#If FunBackspaceExplorer()
Backspace::
SendInput !{Up}
#IfWinActive |
The error was that SysTreeView321 was not quoted, so backspace functionality was activated only if focus was on main control.
I've moved the code that cheks if current window is correct to a funcion so that the backspace hotkey exists only if all conditions are met.
Now it simply checks if the current control isn't an edit one (Edit1 is active while renaming an item, Edit2 is active when typing the path in the bar, and maybe there are more of them so I did the InStr() thing) so that backspace functionality is enabled whatever the current cotrol is.
I've only checked this on Win7, but it should be ok in Vista too. |
|
| Back to top |
|
 |
johnsondanielj Guest
|
Posted: Tue Jun 07, 2011 5:26 pm Post subject: Re: Resolved issue of configuring Backspace key for Windows |
|
|
+1 for Khanbaba's script on windows 7, except I had to quote "SysTreeView321":
| Code: | #IfWinActive, ahk_class CabinetWClass
Backspace::
;make sure no renaming in process and we are actually in list or in tree
ControlGet renamestatus,Visible,,Edit1,A
ControlGetFocus focussed, A
if(renamestatus!=1&&(focussed="DirectUIHWND3"||focussed="SysTreeView321"))
{
SendInput {Alt Down}{Up}{Alt Up}
return
}else{
Send {Backspace}
return
} |
|
|
| Back to top |
|
 |
|