Volume buttons on arcade control panel

Hello. I have an arcade cabinet build with xarcade diy controls and the latest version of retropie. I'm trying to figure a way to control volume using individual volume up and volume down buttons on the control panel without having to press a hot key with it.

I've tried to set it up in retro arch, but it only functions if I use it as with a hot key. My goal is to make the cabinet as user friendly as possible so anyone will to be able to come up and easily know how to use it.

Any help on how I can set this up would be greatly appreciated!

FYI I'm very inexperienced with all of this. I've learned what I can on my own in the last couple of weeks.

@cif140
I've set this up using the buttons on a logitec s-150 usb sound card+amp+speakers. To the pi, it registers as two devices a sound card, and a HID keyboard.
Anyways, I used triggerhappy (or its deamon: thd) to listen to specific keypresses (it has a mode to just show the presses it detects, so you can find out easily depending on your HW).
This then triggers one of three scripts for volume up, down or mute toggle.
These scripts first perform the alsa command, then play a sound to reflect the current sound volume.

This all starts at system startup, and is completely independent from RetroArch.

I can post the scripts if you're interested, and when I'm back at a proper computer.