I’ve always used this LUA script on Logitech Gaming software by using a G502 mouse, I had to change my old mouse and I bought a new version “G502x” which is not recognized by LGS so I had to install GHub to make the mouse useful, but the script is not working with GHub, any changes I can apply to the code so it works properly now? Or… is there a configuration I have to add to the GHub to get it worked? thanks.
TIMEOUT = 900
function OnEvent(event, arg, family)
if event == "MOUSE_BUTTON_PRESSED" and arg == 5 then
if GetRunningTime() - (timestamp or 0) >= TIMEOUT then index = 0 end
index = (index or 0) + 1
if index > 3 then index = 1 end
if index == 1 then
PressKey("e")
elseif index == 2 then
PressKey("w")
elseif index == 3 then
PressKey("Num1")
end
timestamp = GetRunningTime()
elseif event == "MOUSE_BUTTON_RELEASED" and arg == 5 then
if index == 1 then
ReleaseKey("e")
elseif index == 2 then
ReleaseKey("w")
elseif index == 3 then
ReleaseKey("Num1")
end
end
end