Switch MouseDown MouseUp

Hi OpenHabians,

I try to setup a switch in the habpanel which should send a value or doing something as mouse is down and another value or thing when mouse is up again.

So for example if I press the Button or Switch a command with value 1 should bei sent and stay until I release the mouse. Then it should reset to 0.

Thank you guys in advance!