-1

I have Logitech G604 mouse I want to Scroll with G6 and G5 button with different Scroll Speed is it possible LUA script. if yes then how I search in G-series Lua API but haven't find anything related. Please help. Thanks

Egor Skriptunoff
  • 23,359
  • 2
  • 34
  • 64
Ahmed
  • 1
  • 1
  • `I want to Scroll with G6 and G5 button with different Scroll Speed` - Do you mean G5+Wheel = speed 1, G6+Wheel = speed 2 ? Or do you mean G5 = scroll up, G6 = scroll down? – Egor Skriptunoff Feb 12 '22 at 00:46
  • Thanks a lot for answer, I mean different then normal mouse wheel for example g5 and g6 act like slow up/down Scroll while holding down. and i can control the speed via script Actually I will use it to zoom in and zoom out in 3d application. – Ahmed Feb 12 '22 at 01:11

1 Answers1

0

Yes, you can invoke MoveMouseWheel(120) and MoveMouseWheel(-120) to simulate scroll in both directions.

Try this:

function OnEvent(event, arg)
   if event == "MOUSE_BUTTON_PRESSED" and arg == 5 then
      repeat
         MoveMouseWheel(120)
         Sleep(50)
      until not IsMouseButtonPressed(5)
   end
end

Mouse button 5 acts as Scroll Up.

Egor Skriptunoff
  • 23,359
  • 2
  • 34
  • 64