After some of the G HUB updates, this script stopped working. Why?
function OnEvent(event, arg)
if (event == "G_PRESSED" and arg == 1) then
PressAndReleaseKey("i")
end
end
In GHUB (unlike LGS) G_PRESSED
event is generated only for G-keys having modified bindings. The event is not generated for G-keys with disabled binding and for G-keys with standard binding.
In other words, you should modify the standard command assigned to G1 key.
If you want to preserve the original action (pressing of F1
key) for G1 key, you need to create new macro (something like: press F1
, wait, release F1
) and assign it to G1 key.