read data from keyboard and mouse