BartC said:I'm not teaching anything. I suggested to the OP that getch() might be
another approach to his/her task, and to search for a Linux version if
necessary to try it out.
Sorry, I meant a generic you not you in particular. I was merely
commenting on how this could be a more useful resource.