Adjusted mouse parser to handle negative coordinates.