add input class to handle keyboard and pointer events