Handle touch events.