DAW undo history bloat with my custom 2d slider gui component

@JussiNeuralDSP how do I know that the user started or completed a given action, let’s say, on his Expression pedal? Or when blowing into a Breath Controller? On a GUI element is simple to get begin/end gestures, since it is part of the software, but how to do it on a physical device?