- Unbind your macro from RMB. Bind standard "Secondary click" to RMB.
- Set the script:
function OnEvent(event, arg)
if event == "PROFILE_ACTIVATED" then
EnablePrimaryMouseButtonEvents(true)
elseif event == "MOUSE_BUTTON_PRESSED" and arg == 2 and IsKeyLockOn"capslock" then -- RMB pressed
Sleep(50)
PressKey"lshift"
repeat
MoveMouseRelative(0,-1)
Sleep(10)
until not IsMouseButtonPressed(3) -- RMB released
ReleaseKey"lshift"
end
end
Script #2
Create a "spare LMB" button.
For example, if you don't use button#8, bind "Primary click" to Button#8.
If something goes wrong and your LMB stops working, you can use button#8 instead of LMB.
Set script
function OnEvent(event, arg)
if event == "PROFILE_ACTIVATED" then
EnablePrimaryMouseButtonEvents(true)
elseif event == "MOUSE_BUTTON_PRESSED" and arg == 1 then -- LMB pressed
if IsKeyLockOn"capslock" then
if IsModifierPressed"shift" then
-- Mouse movement when SHIFT is pressed
for i = 1, 4 do -- 4 steps. Each step is 30ms delay and 5 pixels movement. Total is 20 pixels
MoveMouseRelative(0,-5)
Sleep(30)
end
else
-- Mouse movement when SHIFT is NOT pressed
for i = 1, 4 do -- 4 steps. Each step is 30ms delay and 5 pixels movement. Total is 20 pixels
MoveMouseRelative(0,-5)
Sleep(30)
end
end
end
PressMouseButton(1)
elseif event == "MOUSE_BUTTON_RELEASED" and arg == 1 then -- LMB released
ReleaseMouseButton(1)
end
end
- Unbind "Primary click" from LMB (it will look like white circle with black inside).