Skip to content

Instantly share code, notes, and snippets.

@justarandomgeek
Created September 13, 2016 18:19
Show Gist options
  • Save justarandomgeek/eea581ab9feb566c72d50e8e68811bdc to your computer and use it in GitHub Desktop.
Save justarandomgeek/eea581ab9feb566c72d50e8e68811bdc to your computer and use it in GitHub Desktop.
function OnEvent(event, arg, family)
if family == "lhc" then
if event == "G_PRESSED" or event == "G_RELEASED" then
if arg > 12 and arg < 25 then
if event == "G_PRESSED" then
PressKey("f"..arg)
else
ReleaseKey("f"..arg)
end
end
local mkey = GetMKeyState("lhc")
OutputLogMessage("event = %s,M= %i, arg = %s\n", event, mkey, arg);
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment