Skip to content

Instantly share code, notes, and snippets.

@forivall
Created July 21, 2015 06:28
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save forivall/3e223b27ff19c2fe4009 to your computer and use it in GitHub Desktop.
Save forivall/3e223b27ff19c2fe4009 to your computer and use it in GitHub Desktop.
Lua script for logitech gaming software to emulate F13-18 with G1-6
keymap = {
[1]="f13",
[2]="f14",
[3]="f15",
[4]="f16",
[5]="f17",
[6]="f18",
}
function OnEvent(event, gkey, family)
mkey = GetMKeyState()
if mkey == 3 then
key = keymap[gkey]
if event == "G_PRESSED" then
PressKey(key)
end
if event == "G_RELEASED" then
ReleaseKey(key)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment