Control volume on external amp

Hi,

I would like to send commands to an external amp throw gpio to control volume. I know how to listen for events but pushState only gives volume level, not which button was pressed. So, as I use a digi+ pro, volume control is always 0 or 100 (no mixer support). I always get volume: 100 in pushState data (or 0 if mute) but I can not see if pressed button was volup or voldown although I get an event when pressing one or the other button. How could I get this information ?