I recently got a programmable MacroPad from Adafruid and have been having fun messing with it.
I doubt that this'll be useful to anyone without modification, but I think my code is readable enough for people to modify with some ease.
It's not production ready but here it is nonetheless.
I recommend reading up on CircuitPython before messing with anything.