Arduboy as a desktop switch / screen locker

A while ago I made a little program that turns the Arduboy into a remote control for locking my screen at switching between multiple desktops!

I never actually got around to posting the source code though. So here it is!

Nothing super complicated, just pretending to be a keyboard and sending shortcuts to the computer. I need to lock my computer at work whenever I leave it, so this was basically just to make that easier :slight_smile:

Also, the Arduboy has been running this program pretty much constantly for the past 2+ years? Iโ€™m not sure if any other Arduboy has been used that much, but happy to report itโ€™s still working great!

And donโ€™t worry, I bought another one so that I can still play Arduboy games while this one is stuck at work :grin:


This is cool, I love functional uses for the Arduboy! I used it to control a CNC machine one time! Nice.

You could scrap Keystate and simplify the code quite a bit if you updated the code to Arduboy2 and used the justPressed function.