Added mouse input parsing