Note that pointer.pos means “wherever the mouse pointer is”, so if you move the pointer (for example, to click on a previous entry in the Listener to avoid having to retype the whole thing) then you’ll get a different result.
pointer.pos