I have this script:
~LButton & RButton::
Click Middle
Return
Supposedly when I press LButton
and RButton
together, they'll work as the MButton
. This does work but it sends the LButton
as well. If I remove the ~
from the hotkey prefix, LButton
stops working altogether.
I've tried various ways to try and make it work.
This does not work:
#If GetKeyState("LButton", "P")
RButton::
Click Middle
Return
This doesn't work either:
middleclicktrigger := False
LButton & RButton::
middleclicktrigger := True
Click Middle
middleclicktrigger := False
Return
~LButton::
If (middleclicktrigger) {
BlockInput, Mouse
}
Return
This supposedly works but I encountered a problem where I cannot hold and drag the LButton
with normal usage. It works fine with simple left clicking but I need it to work as a normal left mouse button when it's not being used along with the right mouse button in a hotkey combination:
middleclicktrigger := False
LButton & RButton::
middleclicktrigger := True
Click Middle
middleclicktrigger := False
Return
LButton::
IF (!middleclicktrigger) {
Click down
}
Return
LButton up::
IF (!middleclicktrigger) {
Click up
}
Return