Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否有一些 Windows 函数GetAsyncKeyState()的 Linux 模拟?或者可能存在一些返回的异步函数 - 键盘缓冲区是否为空?
谢谢。
这里的关键问题是:对于哪个抽象?X 窗口、ncurses 或 stdio?Linux 不像 Windows 那样简单和单一。
对于 stdio(普通的旧标准输入/标准输出文本程序)fgetc_unlocked可以解决问题。
fgetc_unlocked