Actually as I was giving up I just found this
thread where I found a solution:
on my plugin
ondown="set(dragging,true); dragRot();"
onup="set(dragging,false);"
<action name="dragRot">
if(dragging,
trace(mouse.x,' ',mouse.y);
delayedcall(0,dragRot());
);
</action>
I can use that to set the rotation.