function OnEvent(event, arg)
OutputLogMessage("Event: "..event.." Arg: "..arg.."\n")
if IsMouseButtonPressed(5) then
repeat
if IsMouseButtonPressed(1) then
repeat
MoveMouseRelative(0, 3)
Sleep(8)
until not IsMouseButtonPressed(1)
end
until not IsMouseButtonPressed(5)
end
end
i would to change the MousebuttonPressed to a keyboard key how can i do that?
G HUB is unable to monitor usual keys (digits, letters, space) state: are they pressed/released.
The only keys G HUB can "see" are: Shift, Alt, Ctrl (selectable: left/right/any).
until not IsModifierPressed("lctrl") -- left ctrl
G HUB can also see LED status for NumLock, ScrollLock and CapsLock (for example, IsKeyLockOn("CapsLock")
.
G HUB can also handle press/release events of special G-keys and M-keys on a Logitech keyboard (G-keys are either left-side additional keys G1,G2,... or F1-F12 keys).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.