Midi controller toggle pedal on/off

i setup my melo audio midi commander (foot controller) with modep, and mapped the buttons to the on/off of the pedal. however, it only goes from off to on with no way to turn it off. is there a fix for this or is it stuck. im extremely new to linux and midi

I just learned this myself. There are two types of midi switches: Momentary and Toggle.

I wonder if your Melo is a Momentary switch and cannot turn it off. There may be a way to reprogram your Melo switch to be a Toggle type of switch, if that is the case.

I had this issue with my Behringer FCB1010 Footswitch and had to buy a special chip to let the pedals be easily reprogrammed.