Advertisement
Xyberviri

AutoRun Script for Logitec G series peripherals.

Jul 11th, 2015
385
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.68 KB | None | 0 0
  1. --This works on logitec G series devices, i use to have a G350 that i used this on but i moved this over to my G510
  2. toggleW = 0
  3. function OnEvent(event, arg, family)
  4.     family = family or ""
  5.     if family == "kb" and event == "G_PRESSED" and arg == 1 then
  6.         if toggleW == 0 then
  7.             toggleW = 1
  8.             PressKey("w")
  9.             OutputLCDMessage("Auto Run Enabled",5000)
  10.             OutputLCDMessage("Press G1 to disable",5000)
  11.             SetBacklightColor(255,0,0,"kb")
  12.         else
  13.             toggleW = 0
  14.             ReleaseKey("w")
  15.             OutputLCDMessage("Auto Run Disabled",5000)
  16.             SetBacklightColor(0,255,0, "kb")
  17.         end
  18.     end
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement