New Picade Physical Volume buttons?

I’m interested in adding some physical volume buttons to my 2018 Picade. Adding the buttons is easy enough and I have no problems adding them to the hacker header on the Picade X HAT but what then… is there an easy way to make them control the volume (including when games are being played?).

Any suggestions welcome! Thanks!

I have absolutely no idea if it will work,but you could use the gpio-key dtoverlay and try these keycodes:

#define KEY_VOLUMEDOWN  114
#define KEY_VOLUMEUP    115

Documented here: https://github.com/raspberrypi/firmware/blob/2ecdfe7945c8e58b8b94fe142ee0df76fc3f2227/boot/overlays/README#L601-L619