Code: Select all
click q ::
if last key was number 1 , do {q Up}{q Down}{Ctrl Up}1{Ctrl Down}
else if last key was number 2 , {q Up}{q Down}{Ctrl Up}2{Ctrl Down}
else q
end
Code: Select all
{q Up}{q Down}{Ctrl Up}1{Ctrl Down}
Code: Select all
click q ::
if last key was number 1 , do {q Up}{q Down}{Ctrl Up}1{Ctrl Down}
else if last key was number 2 , {q Up}{q Down}{Ctrl Up}2{Ctrl Down}
else q
end
Code: Select all
{q Up}{q Down}{Ctrl Up}1{Ctrl Down}
Code: Select all
#InstallKeybdHook
#InstallMouseHook
~*LButton::
~*RButton::
~*MButton::
~*XButton1::
~*XButton2::
~*WheelUp::
~*WheelDown::
~*WheelLeft::
~*WheelRight::
if !(A_PriorKey ~= "[LRMX]Button\d?|Wheel(Up|Down|Left|Right)")
lastKeyboardKey := A_PriorKey
return
q::
if !lastKeyboardKey
lastKeyboardKey := A_PriorKey
if (lastKeyboardKey ~= "[1-9]")
Send {q Up}{q Down}{Ctrl Up}%lastKeyboardKey%{Ctrl Down}
lastKeyboardKey := ""
Return
I will test this tonight. Thanks!swagfag wrote: ↑12 Dec 2018, 10:24either make sure no mouse hooks ever get installed, or else ud have to keep track of it urself:Code: Select all
#InstallKeybdHook #InstallMouseHook ~*LButton:: ~*RButton:: ~*MButton:: ~*XButton1:: ~*XButton2:: ~*WheelUp:: ~*WheelDown:: ~*WheelLeft:: ~*WheelRight:: if !(A_PriorKey ~= "[LRMX]Button\d?|Wheel(Up|Down|Left|Right)") lastKeyboardKey := A_PriorKey return q:: if !lastKeyboardKey lastKeyboardKey := A_PriorKey if (lastKeyboardKey ~= "[1-9]") Send {q Up}{q Down}{Ctrl Up}%lastKeyboardKey%{Ctrl Down} lastKeyboardKey := "" Return
It works like a charm!swagfag wrote: ↑12 Dec 2018, 10:24either make sure no mouse hooks ever get installed, or else ud have to keep track of it urself:Code: Select all
#InstallKeybdHook #InstallMouseHook ~*LButton:: ~*RButton:: ~*MButton:: ~*XButton1:: ~*XButton2:: ~*WheelUp:: ~*WheelDown:: ~*WheelLeft:: ~*WheelRight:: if !(A_PriorKey ~= "[LRMX]Button\d?|Wheel(Up|Down|Left|Right)") lastKeyboardKey := A_PriorKey return q:: if !lastKeyboardKey lastKeyboardKey := A_PriorKey if (lastKeyboardKey ~= "[1-9]") Send {q Up}{q Down}{Ctrl Up}%lastKeyboardKey%{Ctrl Down} lastKeyboardKey := "" Return
Users browsing this forum: dunnerca, Google [Bot] and 151 guests