diff options
author | John Ankarström <john@ankarstrom.se> | 2020-12-26 15:38:23 +0100 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2020-12-26 15:38:23 +0100 |
commit | 8819fddff54d549fe56577c9ae92bd8a57d7beaa (patch) | |
tree | 0c0a2188acaed33e3b180ca4d2c50bea58e58c62 /tt.programs.explorer.ahk | |
parent | cb5563276258bb78741461e5f24bd24125576256 (diff) | |
download | ahk-8819fddff54d549fe56577c9ae92bd8a57d7beaa.tar.gz |
doubleclick, explorer: Simplify DoubleClick function
Also invoke Edit2 action when Shift is held.
Diffstat (limited to 'tt.programs.explorer.ahk')
-rw-r--r-- | tt.programs.explorer.ahk | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/tt.programs.explorer.ahk b/tt.programs.explorer.ahk index 7012451..20296c3 100644 --- a/tt.programs.explorer.ahk +++ b/tt.programs.explorer.ahk @@ -67,26 +67,29 @@ return #IfWinActive -LWin & LButton:: +*#LButton:: MouseGetPos,,, hwnd DllCall("SetForegroundWindow", "UInt", hwnd) -if (not DoubleClick()) ; see tt.doubleclick.ahk - return -if (not WinActive("ahk_group Explorer")) +if (not DoubleClick() or not WinActive("ahk_group Explorer")) ; see tt.doubleclick.ahk { SendInput, {Click} return } + ; fall through to next hotkey #IfWinActive ahk_group Explorer -#NumPadEnter:: -#Enter:: +*#NumPadEnter:: +*#Enter:: i := Explorer().Document.FocusedItem if (i.IsFolder) return -ShellApp.ShellExecute(i.path, "", "", "Edit", 1) +if (GetKeyState("Shift")) + ShellApp.ShellExecute(i.path, "", "", "Edit2", 1) +else + ShellApp.ShellExecute(i.path, "", "", "Edit", 1) +return return ; Directory navigation |