How do I put a mousemove or a keypress event on the code that doesn't have to be focus on specific controls so that I can invoke the event no matters when I am and which controls I focus on ?

How do I keep track the position of my mouse on the screen in code like the x,y coordinates ?