Reputation: 1
Hello ppl,
My question concern about LUA and bind mousewheel "scroll" :
I am looking to bind any key on my mousewheel "scroll" up or down with LUA on my logitech g pro wireless,
I have success, there are long time ago with Autohotkey, or succes with another mouse like roccat because it include to bind mousewheel scroll up and down in roccat software.
But in Logitech Sotfware Ghub we cant rebind mousewheel up or down, we can only bind the button of the middle scroll wheel,
I dont want use Autohotkey or another tiers software iam sorry, i just want use LUA on the g pro wireless.
I hve succes to bind "N" key on the middle button of the scroll wheel ..... but no with mouse wheel scroll
Some try without sucess
"First no success, only middle button success"
EnablePrimaryMouseButtonEvents(true);
function OnEvent(event, arg)
if event == "MOUSE_BUTTON_PRESSED" and arg == 3 then
PressKey("N")
end
if event == "MOUSE_BUTTON_RELEASED" and arg == 3 then
ReleaseKey("N")
end
end
"Second try no sucess, only middle button success"
EnablePrimaryMouseButtonEvents(true);
function OnEvent(event, arg)
while IsMouseButtonPressed(2) do
Sleep(11)
repeat
PressKey("N")
until not IsMouseButtonPressed(2)
ReleaseKey("N")
Sleep(11)
end
end
I have found some code on internet but i dont know how input all research, i have try all possibility but no succes, I'm so disappointed ....
Here are my five finds
This very important finds but i want without CTRL keybind, only with MouseWheelUp or down
Button binding, LCTRL + mouse wheel rolled up
bindKey_LCtrl_MouseWheelUp1 = function()
PressKey(0x1d)
Sleep(50)
MoveMouseWheel(1)
Sleep(50)
ReleaseKey(0x1d)
end
And now last four finds
MouseWheelDown1 ?
MoveMouseWheel(3) ?
EnableMouseWheel(true) ?
OnMouseWheel ?
To finish
Excuse me about my long post but anyone can complete my code please ? i work on this like my first post like 3-4 month but I'm at the end of my knowledge.
Thanks per advance if possible
Upvotes: 0
Views: 5690
Reputation: 28964
The Logitech G-Series Lua API does not support handling scrollwheel input. You can only simulate scrollwheel movement.
You'll need to use another software.
I haven't tested it, but XMouseButtonControl should allow stuff like that. I've seen a screenshot that maps scrollwheel up and down to certain actions. It even comes with application profiles so just give it a try.
Upvotes: 0