As i understand it you want to run M1 when that is selected and M2 when that is selected. In that case, create a virtual tag: "SelectedMotor", set it to 1 when pressing M1, and 2 when pressing M2. Then duplicate the buttons, one set for M1 and one set for M2, and then hide/show them (or the container they are in) depending on the value of "SelectedMotor" (using a css selector)
... View more