synchronous keystroke reading from console application

前端 未结 3 1929
天命终不由人
天命终不由人 2021-01-29 03:01

I want to read every keystroke from a console application written in c under windows and linux immediately. Unfortunately the function gets(line) does only return a value, when

3条回答
  •  日久生厌
    2021-01-29 03:49

    You're probably looking for getch(). On Windows (at least VC++) it's declared in . On Linux it's part of curses.

提交回复
热议问题