I just want to drop a note here about an app I just came across, that I've literally been searching for for years on Android. On old Windows Mobile when men were men we had Hbutton and AE Button Plus that would allow you to do button combinations on your phone to do various things. (Turn on Auto Brightness when you can't see the screen in the sun maybe?) These can also take place while the screen is off.
Anyways, in case there is any other poor souls searching for someone to keyword this just right , here it is.
The app is called QuickClick and here's a link to the playstore:
If you've got a better app that does this functionality feel free to post.