From 8819fddff54d549fe56577c9ae92bd8a57d7beaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Sat, 26 Dec 2020 15:38:23 +0100 Subject: doubleclick, explorer: Simplify DoubleClick function Also invoke Edit2 action when Shift is held. --- tt.programs.explorer.ahk | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'tt.programs.explorer.ahk') 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 -- cgit v1.2.3