add support for both keyboard and touch events