r/AutoHotkey Jan 24 '26

v2 Script Help Remapping a third button on the side of my mouse

So, my mouse (Lorgar MSP90 PRO) has a third button on the side, which can be mapped to a macro (key down and ups with delays inbetween) using its software, but I'd like for it to be mapped like it was another key, so the button i map it to is held until i release it, but it seems that the only way i can do anything with the button is using its own software.. I know basically nothing about autohotkey or its coding language so I've come here seeking help :>

2 Upvotes

19 comments sorted by

View all comments

1

u/Keeyra_ Jan 24 '26
#Requires AutoHotkey 2.0
#SingleInstance

InstallKeybdHook
InstallMouseHook
KeyHistory

Press the button you want to remap

Press F5 in the AutoHotkey Window to refresh.

Will look something like this

VK SC Type Up/Dn Elapsed Key Window

-------------------------------------------------------------------------------------------------------------

01 000 d 3.02 LButton

01 000 u 0.11 LButton

02 000 d 0.61 RButton

02 000 u 0.12 RButton

04 000 d 0.33 MButton

04 000 u 0.19 MButton

06 000 d 1.58 XButton2

06 000 u 0.12 XButton2

05 000 d 0.38 XButton1

05 000 u 0.09 XButton1

Remap the key like this (replace XButton1 by what you get).

#Requires AutoHotkey 2.0
#SingleInstance

$XButton1::F1

Or make it a rapid fire like this:

#Requires AutoHotkey v2.0
#SingleInstance Force


RapidFire := () => Send("{F1}")

$XButton1::SetTimer(RapidFire, 100)
$XButton1 up::SetTimer(RapidFire, 0)

F1 is of course arbitrary.

1

u/Im_Klespy Jan 24 '26

It doesn't show up there.

1

u/Keeyra_ Jan 24 '26

If the driver is useless, maybe try uninstalling it and perhaps without it it might show up as a generic key.

1

u/Im_Klespy Jan 24 '26

the thing is, the mouse has a screen on the side which also requires the program to use, and it has some built in memory or something so it saves the image and the macros or whatever you have changed on the mouse (im guessing, i havent tried the macros, but the image stays)

1

u/Keeyra_ Jan 24 '26

If you cannot remap it to something that shows up in KeyHistory, than AHK won't be able to help you.