문제

Is there some Linux analog of windows function GetAsyncKeyState() ? Or maybe there exists some asynchronous function which returns - Does keyboard buffer empty or not ?

Thanks.

도움이 되었습니까?

해결책

The key question here is: For which abstraction? X windows, ncurses or stdio? Linux isn't as simple and monolithic as Windows is.

For stdio (plain old stdin/stdout text program) fgetc_unlocked does the trick.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top