-
-
Save ewauq/2702c6b2342517a0ec9206fa101d3d7c to your computer and use it in GitHub Desktop.
-- 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 |
Old Logitech Keyboard and software user and this worked great, thank you. I then used the binds themselves to update the labels in the software too.
Export the configuration file, add the following code, and then import it. And so on. You can add any buttons you like without affecting the original functions.
<macro guid="{F13_GUID}" color="4278246655" name="F13" hidden="false" original="true"> <keystroke xmlns="http://www.logitech.com/Cassandra/2010.1/Macros/Keystroke"> <key value="F13"/> </keystroke> </macro> <macro guid="{F14_GUID}" color="4278246655" name="F14" hidden="false" original="true"> <keystroke xmlns="http://www.logitech.com/Cassandra/2010.1/Macros/Keystroke"> <key value="F14"/> </keystroke> </macro> <macro guid="{F15_GUID}" color="4278246655" name="F15" hidden="false" original="true"> <keystroke xmlns="http://www.logitech.com/Cassandra/2010.1/Macros/Keystroke"> <key value="F15"/> </keystroke> </macro> <macro guid="{F16_GUID}" color="4278246655" name="F16" hidden="false" original="true"> <keystroke xmlns="http://www.logitech.com/Cassandra/2010.1/Macros/Keystroke"> <key value="F16"/> </keystroke> </macro> <macro guid="{F17_GUID}" color="4278246655" name="F17" hidden="false" original="true"> <keystroke xmlns="http://www.logitech.com/Cassandra/2010.1/Macros/Keystroke"> <key value="F17"/> </keystroke> </macro> <macro guid="{F18_GUID}" color="4278246655" name="F18" hidden="false" original="true"> <keystroke xmlns="http://www.logitech.com/Cassandra/2010.1/Macros/Keystroke"> <key value="F18"/> </keystroke> </macro> <macro guid="{F19_GUID}" color="4278246655" name="F19" hidden="false" original="true"> <keystroke xmlns="http://www.logitech.com/Cassandra/2010.1/Macros/Keystroke"> <key value="F19"/> </keystroke> </macro> <macro guid="{F20_GUID}" color="4278246655" name="F20" hidden="false" original="true"> <keystroke xmlns="http://www.logitech.com/Cassandra/2010.1/Macros/Keystroke"> <key value="F20"/> </keystroke> </macro> <macro guid="{F21_GUID}" color="4278246655" name="F21" hidden="false" original="true"> <keystroke xmlns="http://www.logitech.com/Cassandra/2010.1/Macros/Keystroke"> <key value="F21"/> </keystroke> </macro> <macro guid="{F22_GUID}" color="4278246655" name="F22" hidden="false" original="true"> <keystroke xmlns="http://www.logitech.com/Cassandra/2010.1/Macros/Keystroke"> <key value="F22"/> </keystroke> </macro> <macro guid="{F23_GUID}" color="4278246655" name="F23" hidden="false" original="true"> <keystroke xmlns="http://www.logitech.com/Cassandra/2010.1/Macros/Keystroke"> <key value="F23"/> </keystroke> </macro> <macro guid="{F24_GUID}" color="4278246655" name="F24" hidden="false" original="true"> <keystroke xmlns="http://www.logitech.com/Cassandra/2010.1/Macros/Keystroke"> <key value="F24"/> </keystroke> </macro>
This code won't work for mouse such as the G600. For those who want to implement this on a mouse, use the following new and greatly improved code: