how can you read how much the mouse moves on the x and y axis?

and then, how do you position the mouse back to the center?

(for fps specifically)