make capturing mouse optional