Midi map for multi-function buttons (m-audio Oxygen 49 V)

On my m-audio Oxygen 49 version V there is a button labeled “DAW BUTTON MODE” that is supposed to change the function of the row of 8 buttons beneath the sliders. Here’s how it works in Abelton Live Lite and how i’m trying to make it work in Ardour (or mixbus):

Press “DAW BUTTON MODE” → buttons under sliders select corresponding track
Press again “DAW BUTTON MODE” → buttons record arm corresponding track
Press again “DAW BUTTON MODE” → buttons solo corresponding track
Press again “DAW BUTTON MODE” → buttons mute corresponding track

(pressing again cycles through the four options). This is nice because you can use one button to control four different functions, using the “DAW BUTTON MODE” button to select.

The problem is, pressing the “DAW BUTTON MODE” doesn’t change the midi message sent by the buttons beneath the sliders (according to the midi tracer window). Pressing “DAW BUTTON MODE” cycles through four different midi control messages (on channel 16) but does not change the midi control messages sent by the buttons (on channel 1).

I thought maybe you could assign the button function to a variable in the midi map file which is changed by the “DAW MODE BUTTON” but apparently that is not possible to do in xml (my knowledge of which is not much greater than zero). I have a midi map working where the “DAW MODE BUTTON” cycles between mixer, editor, recorder and cue pages but I would rather make the multifunction aspect of the buttons work. Is it possible to do?

Yeah, you can’t do this with a MIDI binding map. It requires code-level support to be able to know “oh, the DAW button was pressed, change our behavior when that other button is pressed”. Stupid design in my opinion.

Thank you, I appreciate your help.