I'm attempting to make a Lua script with Logitechs API that will detect when I hold the dpi shift button on my mouse and then simulate a keypress.
However, I cant find the right function to tell if that button is pressed or not. Any ideas or recommendations to improve this program would be nice.
Here is my first attempt at a hold program:
function OnEvent(G_PRESSED, G5)
Sleep(500)
if IsMouseButtonPressed(5) then
MoveMouseTo(0,0)
end
end
"DPI shift" action can be assigned to any physical mouse button.
So, I don't know which button you are talking about.
Assuming you want to simulate key "A" press when mouse button 5 ("Forward") is pressed: