Leap motion as mouse control?

Hello, is it possible to pass make leap motion as mouse control?
I need it to generate on click and on released events. Currently on begin overlap and on end overlap events are not able to achieve needed effect. I can get what I want on begin overlap, but end overlap just crashes the runtime