Pass mouse event to the customAction function