Logitech Gaming Software F13-F24 enabler (Unused keys to trigger AHK actions)

Post gaming related scripts
User avatar
evilC
Posts: 3599
Joined: 27 Feb 2014, 12:30

Logitech Gaming Software F13-F24 enabler (Unused keys to trigger AHK actions)

20 Nov 2017, 17:10

Just figured this out...
You know if you want to use your logitech device (eg Mouse or G13) with AutoHotkey, you need to map your device to a key, which autohotkey then responds to, but you need to work out which keys are not going to interfere, or use modifiers (which causes more problems).
I have the solution!
I worked out how to add keys F13-F24 (Yes, they really do exist as keys, but are basically unused these days) to Logitech Gaming software.
You have AutoHotkey SEND these keys as LGS is in it's bind screen, and then it adds it to the profile and you can have your device send them.
However, you cannot just do like `F1::F24` as LGS just responds to F1, so... you can add a delay.

F1::
Sleep 2000
Send {F24}
return

Bingo.
Unfortunately though, it appears adding F24 as a key to one profile does not make it available in another - adding it to lots of profiles will get laborious, so I wrote a script to do it.

Code: [Select all] [Expand] [Download] (Untitled.ahk)GeSHi © Codebox Plus



Open a profile in LGS, position the mouse cursor over the + by "Commands" on the left and hit F1.
It Sends F13, and then waits for you to click OK.
It remembers where you clicked OK, then adds the other 11 bindings automatically

Image

So now you can just do *F24::GoSub, DoSomethingInteresting in your AHK scripts and trigger it with buttons on your device, safe in the knowledge that it should not interfere with anything, and totally independently of the state of any modifiers if desired.
User avatar
Nextron
Posts: 1064
Joined: 01 Oct 2013, 08:23
Location: Netherlands OS: Win7 x64 AHK: Unicode x32

Re: Logitech Gaming Software F13-F24 enabler (Unused keys to trigger AHK actions)

20 Nov 2017, 18:20

Saved! It's always a nuisance to assign those keys in LGS, but so rewarding having them available in AHK.
(Great presentation too)
The more I know:
The more I know,
I know nothing.
Acecool
Posts: 36
Joined: 10 Jan 2016, 18:25
Facebook: Acecool
Google: Acecool
GitHub: Acecool
Contact:

Re: Logitech Gaming Software F13-F24 enabler (Unused keys to trigger AHK actions)

03 Dec 2017, 02:05

Cheers, but you don't need to add it to more than one profile... After you add it to one, you can simply ctrl / shift click the F keys in the box on the left-hand side and drag / drop them on the profile at the top-right. They'll be copied to each profile you drag them to.

I wrote a simple script to replace shift + f1 through f12 as f13 through f24 but the software kept picking up on it so this is nice. I did have to change the sleep though because it was moving quicker than the Logitech Software...
-Josh 'Acecool' Moser
I teach various programming languages, game programming, etc... I am also taking on programming jobs as my health allows.

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 7 guests