My keyboard at work doesn't have easy to use media controls, so I made my own. This simple one button jar works similar how Apple headphones work, one tap for play/pause, double tap for next track, triple tap for previous track and long press for stop. The code is written in Arduino and runs on Teensy-LC microcontroller. I used a Seimitsu PS 14 GN 30mm Arcade Button and it feels really nice to control my music with this simple gadget. As a case, I used a small jam jar for quirky appearance. The jar is made out of glass so the electronics can be seen from the outside.
The simple code can be found in GitHub.