Jean Lalonde > 2025-07-29 09:27
Xavier > 2025-08-01 04:10
~RButton:: ;; double right click to show ECLM
doublerightclick:
if (A_PriorHotkey != "~RButton" or A_TimeSincePriorHotkey > 300)
{
KeyWait, rbutton, u ;; Too much time between presses, so this isn't a double-press.
Return
}
else
{
sleep 40
;; ↑↑↑ this small pause might not be necessary per-say, but I found it helpful to for the underlying program to see the first right-click which triggers a native context menu in most apps. without this pause I would be getting both right click menus showing over top of each other about half the time. harmless but annoying cause you have to click around to close both menus then double-right click again.
SendInput, {alt down}{alt up}
;; ↑↑↑ this clears\cancels the native from the 1st right-click. there likely could be another way overriding this using a windows "OnMessage()" that I'm not aware of. I've found it reliably enough for my own menu. not all apps respond to sending alt to close a menu, the windows desktop menu is a problematic one to work around.
Gosub CMenu
;; ↑↑↑ build my own menu dynamic menu items
sleep 20
;; ↑↑↑ another tiny pause to make sure the {alt-down-up} has been successfully sent, again found this help so you'd not have 2 competing context menus at once. depending on the app and how fast dynamic menu items are built, on different systems these sleep times may need to be adjusted a bit, took me while to find the sweet spot
menu, c, show
;; ↑↑↑ finally show the menu. ;; in qaps case replace this with..., Run, %QAPm% ShowMenuLaunch
}
ReturnJean Lalonde > 2025-08-01 09:46
Jean Lalonde > 2026-02-10 17:26
Xavier > 2026-02-10 23:02
~RButton:: ;; double right click to show ECLM
doublerightclick:
if (A_PriorHotkey != "~rbutton" or A_TimeSincePriorHotkey > 300)
{
KeyWait, rbutton ; Too much time between presses, so this isn't a double-press.
return
}
else
{
sleep 81 ;; wait for active program to see a right click
Sendinput {alt down}{alt up} ; OR ; send {esc} ;; this send alt||esc is ment to clear the active programs context menu, I've found the alt down|up combo to work best, sometimes sending {esc} will GUIEscape windows you don't want to close, etc.
; gosub cmenu ;; building the menu label:
sleep 20 ;; another short pause to make sure the above Send, {alt} has cleared the first context menu
; ShowMUM("c") ;; my own func to show a menu under my pointer. its Menu, C, Show {with mosusegetpos ~ %x%,%y% added}
Run, %qapm% ShowMenuLaunch
}
return
N1ck > 2026-02-11 07:50
~RButton::
PressCount++
SetTimer, DoublePress, -250
Return
DoublePress:
If (PressCount = 2)
{
Send {Alt}
Run, "C:\Program Files\Quick Access Popup\QAPmessenger.exe" ShowMenuNavigate
}
PressCount := 0
ReturnJean Lalonde > 2026-02-11 09:48
Xavier > 2026-02-11 09:57
(2026-02-11 07:50)N1ck Wrote: A script to perform a double right-click action without a normal right-click menu popping up is technically possible, but there's a trade-off with that script variation, being the normal right-click button's drag functionality will no longer work.
#ifwinactive ahk_class Notepad++
rbutton:: ;; if NP++, replace context menu with ECLM
replacenpppcontext:
if MouseIsOver("ahk_exe notepad++.exe") && (Control = "Scintilla1") || (Control = "Scintilla2") || (Control = "Scintilla3") || (Control = "Scintilla4")
{
KeyWait, RButton, T0.5 ; Wait for the button to be released, with a 500ms delay
gosub cmenu ; Show custom menu
menu, c, show
}
else
sendinput, {rbutton}
return
#ifwinactiveJean Lalonde > 2026-02-16 17:06
Xavier > 2026-02-16 19:06
Xavier > 2026-02-17 10:08
;---------------------------------------------------------------------------
insert3actionskey:
InputBox, keyname,,Enter the KeyName you want to add 3 actions to...
if errorlevel
return
; backupclipboard()
sleep 100
clipboard := ""
sleep 40
clipboard =
(
$%keyname%:: ;; 3key, COMMENT
; WinGetTitle, winTitle, A
; WinGetClass, winClass, A
KeyWait %keyname%, T0.15
if ErrorLevel ;; %keyname%::Long\Hold Press
{
Return
}
else
{
KeyWait %keyname%, D T0.15
if ErrorLevel ;; %keyname%::One Press
{
SendInput, {%keyname%}
}
else ;; %keyname%::Double Press
{
Return
}
}
KeyWait %keyname%
Return
)
sleep 200
sendinput, ^v
; sleep 300
; restoreclipboard()
sleep 800
return
;---------------------------------------------------------------------------$F1:: ;; 3key, COMMENT
; WinGetTitle, winTitle, A
; WinGetClass, winClass, A ;; uncomment these if you want to use certain window attrbs
KeyWait F1, T0.15
if ErrorLevel ;; F1::Long\Hold Press
{
Return
}
else
{
KeyWait F1, D T0.15
if ErrorLevel ;; F1::One Press
{
SendInput, {F1} ;; this sends the original key input. i recommend leaving this. it can be overridden by placing If Winactive("your window") { with a Return } above it
}
else ;; F1::Double Press
{
Return
}
}
KeyWait F1
Return$F8:: ;; multi key, qap, flow luncher, open
KeyWait F8, T0.15
if ErrorLevel ;; F8::long press
{
gosub QAPLiveMenu ;; open my QAP\IF Menu for the active App
}
else
{
KeyWait F8, D T0.15
if ErrorLevel ;; F8::One Press
{
if WinActive("ahk_exe Typora.exe")
{
sendinput, ^{/}
return
}
if Winactive("ahk_class dopus.lister")
{
run, %dopusrt% /acmd Set VIEWPANE=Toggle
return
}
sendinput, {F8} ;; F8::One Press
}
else ;; F8::Double Press
{
if Winactive("ahk_class dopus.lister")
{
send, ^h
return
}
; sendinput, !{space} ; f8::Double Press, show flow
sendinput, #`` ;; F8::Double Press, show listary menu
}
}
KeyWait F8
return