Get the direction of the mouse movement