Since the last couple of days, I was quite troubled by the double-clicking issue of my mouse (Logitech G502 Hero)
Today, I came across a solution for this through a simple code which is posted on Reddit. I simply copy pasted it into my Logitech G Hub app and like magic, the issue is gone.
So, I wanted to share the procedure here for anyone who is facing the issue. This might even work for other branded mouse in through their respective apps (I don't know )
Procedure:
1. Open Logitech G Hub app. Goto Manage profile in the dropdown as in the image.
2. In profiles, select the Scripting icon.
3. Rename the script to anything as required (I named it left click). Paste the code as in the image. Save and Run under Script dropdown. 90% job done.
Script:
After all this is done, disable your left click like mine was disabled in the first image.
(IF THIS IS NOT DONE THEN EVERY LEFT CLICK WILL REGISTER AS TWO CLICKS. ONE FROM CODE AND ONE DEFAULT)
Note:
Never change the active LUA script (image 3). Since the left click is disabled, once the active script is changed, your left click stops working.
Either the script is to be made active again (image 3) or Default is to be selected for the left click to work again.
But how to do all this if the left click is not working?
Press windows Key. search for 'Mouse settings'. Change the primary mouse button to Right by using down arrow.
Now either select the script back or enable the left key. Reselect the primary mouse button to Left from mouse settings.
ENJOY.
Let me know if this is working. (Its working for me )
Today, I came across a solution for this through a simple code which is posted on Reddit. I simply copy pasted it into my Logitech G Hub app and like magic, the issue is gone.
So, I wanted to share the procedure here for anyone who is facing the issue. This might even work for other branded mouse in through their respective apps (I don't know )
Procedure:
1. Open Logitech G Hub app. Goto Manage profile in the dropdown as in the image.
2. In profiles, select the Scripting icon.
3. Rename the script to anything as required (I named it left click). Paste the code as in the image. Save and Run under Script dropdown. 90% job done.
Script:
EnablePrimaryMouseButtonEvents(true);
lastInstance = 0;
debounceTime = 5; -- debounce time in ms
buttonID = 1; -- 1 is primary mouse button, 2 is secondary, 3 scroll
function OnEvent(event, arg)
if event == "MOUSE_BUTTON_PRESSED" and arg == buttonID then
if(GetRunningTime() - lastInstance) >= debounceTime then
PressMouseButton(buttonID);
OutputLogMessage(" - Pressing button\n");
else
OutputLogMessage(" ! Too fast!\n");
end
elseif event == "MOUSE_BUTTON_RELEASED" and arg == buttonID then
ReleaseMouseButton(buttonID);
OutputLogMessage(" - Releasing button\n");
lastInstance = GetRunningTime();
else
OutputLogMessage("Booooring!\n") -- some button we don't care about
end
end
After all this is done, disable your left click like mine was disabled in the first image.
(IF THIS IS NOT DONE THEN EVERY LEFT CLICK WILL REGISTER AS TWO CLICKS. ONE FROM CODE AND ONE DEFAULT)
Note:
Never change the active LUA script (image 3). Since the left click is disabled, once the active script is changed, your left click stops working.
Either the script is to be made active again (image 3) or Default is to be selected for the left click to work again.
But how to do all this if the left click is not working?
Press windows Key. search for 'Mouse settings'. Change the primary mouse button to Right by using down arrow.
Now either select the script back or enable the left key. Reselect the primary mouse button to Left from mouse settings.
ENJOY.
Let me know if this is working. (Its working for me )