How do you center the mouse cursor?

There are a few questions about this and no answers. You could instead set up a ray trace from the centre of the camera and create hit events instead of click events