I’m a completely noob at Lua. I’ve been playing around with it in g-hub for a Logitech mouse and I figured out how to make it notice if shift is held down while the script is run, but I’m pretty far off from figuring out how to make holding shift change the buttons on the mouse to different values. Lik eI want mouse button 4 to go from “mouse button 4” to “1.” Any help would be greatly appreciated
<code>function OnEvent(event, arg)
if IsMouseButtonPressed(2) and IsModifierPressed("lshift") then
PressKey("2")
OutputLogMessage("Held")
end
if not IsModifierPressed("lshift") then
OutputLogMessage("NOT Held")
end
end
</code>
<code>function OnEvent(event, arg)
if IsMouseButtonPressed(2) and IsModifierPressed("lshift") then
PressKey("2")
OutputLogMessage("Held")
end
if not IsModifierPressed("lshift") then
OutputLogMessage("NOT Held")
end
end
</code>
function OnEvent(event, arg)
if IsMouseButtonPressed(2) and IsModifierPressed("lshift") then
PressKey("2")
OutputLogMessage("Held")
end
if not IsModifierPressed("lshift") then
OutputLogMessage("NOT Held")
end
end
New contributor
Orionox is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.