开发者

Linux analog to windows GetAsyncKeyState()

开发者 https://www.devze.com 2023-04-10 05:18 出处:网络
Is there some Linux analog of windows function GetAsyncKeyState() ? Or maybe there exists some asynchronous function which returns - Does keyboard buffer empty or no开发者_运维知识库t ?

Is there some Linux analog of windows function GetAsyncKeyState() ? Or maybe there exists some asynchronous function which returns - Does keyboard buffer empty or no开发者_运维知识库t ?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号