gpt4 book ai didi

c - Linux 模拟 Windows GetAsyncKeyState()

转载 作者:IT王子 更新时间:2023-10-29 01:23:23 28 4
gpt4 key购买 nike

是否有一些类似 Linux 的 Windows 函数 GetAsyncKeyState() ?或者可能存在一些返回的异步函数 - 键盘缓冲区是否为空?

谢谢。

最佳答案

这里的关键问题是:针对哪个抽象? X windows、ncurses 还是 stdio? Linux 不像 Windows 那样简单和单一。

对于 stdio(普通的老式 stdin/stdout 文本程序)fgetc_unlocked 可以解决问题。

关于c - Linux 模拟 Windows GetAsyncKeyState(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7645058/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com