How to mouse input coordinates in the update function.

hello ,

I know we can recieve mouse input coordinates in onMouseDown(event){}

But what if I want to use it in the update function ,since I want to repeat some action. Thankyou.