Button Mouse Event Again

Hello @stevebaer,

I dont now if I can say that my function is the same of “draw preview geometry”.

I whant make script that move one obj, and snap all vertices to all other objs vertices on the document,
the snap is not just for mouse point, at same time the snap was to have a offset tickness from the other
objs.

I alreday have the script running, snaping to all vertices with offset distance:

Now I need breack the loop on mouse clic to place the obj, and I need to , acess to keyboad keys during
the while loop to , ex: rotate the selected obj or some other funcions.

This is what I trying make:

My loop is continually looking for the vertices to snap, I can not interrupt the loop, if is interrupt whit “pause”
or something else, stop to compare vertives in the document.