Add basic handling for moving the mouse in the x or y direction.