Skip to content

Instantly share code, notes, and snippets.

@poemdexter
Created March 15, 2012 04:17
Show Gist options
  • Save poemdexter/2041837 to your computer and use it in GitHub Desktop.
Save poemdexter/2041837 to your computer and use it in GitHub Desktop.
G110 keyboard script to make the colors flicker
function OnEvent(event, arg)
if (event == "M_PRESSED" and arg == 3) then
for i=0,100,1 do
color( 255, 0 , 0 )
color( 0 , 255, 0 )
color( 0 , 0 , 255)
color( 255, 0 , 0 )
color( 0 , 255, 0 )
color( 0 , 0 , 255)
color( 255, 0 , 0 )
color( 0 , 255, 0 )
color( 0 , 0 , 255)
color( 255, 0 , 0 )
color( 0 , 255, 0 )
color( 0 , 0 , 255)
color( 255, 0 , 0 )
color( 0 , 255, 0 )
color( 0 , 0 , 255)
color( 255, 0 , 0 )
color( 0 , 255, 0 )
color( 0 , 0 , 255)
color( 255, 0 , 0 )
color( 0 , 255, 0 )
color( 0 , 0 , 255)
end
end
end
function color(r, g, b, speed)
SetBacklightColor(r,g,b,"kb");
Sleep(50)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment