I guess I'm not following what you mean by the same 'logic'..
Maybe YOUR project has special needs here?
But in general.. once you have the base code (handling) stuff down.. the only you need to do is add non-blocking animations/functions to build your library of 'special lighting effects' for your project. (All cycled by a button press)