avoid reading keyboard too often since system calls really harm performance