Make primitive mouse function