Skip to content

Instantly share code, notes, and snippets.

@EinPinsel
Last active May 4, 2017 15:52
Show Gist options
  • Save EinPinsel/24e2bd3a2cc36b5065a5412a584bfde0 to your computer and use it in GitHub Desktop.
Save EinPinsel/24e2bd3a2cc36b5065a5412a584bfde0 to your computer and use it in GitHub Desktop.
Make F13-F18 available on a G-Series Keyboard (Apply in Profile->Scripting)
function GToFNKey(keyName)
return "F" .. (keyName + 12)
end
function OnEvent(event, arg)
if event == "G_PRESSED" then
local key = GToFNKey(arg)
PressKey(key)
end
if event == "G_RELEASED" then
local key = GToFNKey(arg)
ReleaseKey(key)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment