Last active
November 29, 2023 06:23
-
-
Save ewauq/2702c6b2342517a0ec9206fa101d3d7c to your computer and use it in GitHub Desktop.
How to: Bind F13 to F24 keys on the G-keys (Logitech Gaming Keyboards)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- How to use this script: | |
-- 1. Install the Logitech Gaming Software: http://support.logitech.com/en_us/software/lgs | |
-- 2. Launch it, and right click on your profile (the gear icon) and then click on "Scripts". | |
-- 3. Add the following code into the Script window, save it, and close it. Enjoy. | |
-- Now G1 is bound to F13, G2 to G14, ... G12 to F24. | |
function OnEvent(event, arg) | |
-- OutputLogMessage("event = %s, arg = %s\n", event, arg) | |
fKey = { | |
[1] = 0x64, -- F13 | |
[2] = 0x65, -- F14 | |
[3] = 0x66, -- F15 | |
[4] = 0x67, -- F16 | |
[5] = 0x68, -- F17 | |
[6] = 0x69, -- F18 | |
[7] = 0x6A, -- F19 | |
[8] = 0x6B, -- F20 | |
[9] = 0x6C, -- F21 | |
[10] = 0x6D, -- F22 | |
[11] = 0x6E, -- F23 | |
[12] = 0x76 -- F24 | |
} | |
if (event == "G_PRESSED") then | |
PressKey(fKey[arg]) | |
end | |
if (event == "G_RELEASED") then | |
ReleaseKey(fKey[arg]) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It has improved a lot since my comment. Logitech Gaming Software (LGS) profiles are stored at
C:\Users\<name>\Appdata\Local\Logitech\Logitech Gaming Software\Profiles
.Logitech
folder fromAppData
to temporary location (Desktop for example).Logitech
folder back toAppData
.Note: Some devices are not supported in LGHUB and those device specific settings in profiles will not carry over.