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.
我正在用 ncurses 和 C 编写一个小乒乓克隆。我需要找到一种方法来设置键盘重复延迟,以使玩家更容易移动球拍,否则他们会卡住按下向下键并等待大约 50 毫秒直到钥匙开始重复。
我检查了 ncurses 手册页和文档,我似乎找不到任何关于更改键盘重复延迟的参考,而且程序 kbdrate 也不适合我使用,因为问游戏会有点奇怪以root身份运行。
谢谢,伊曼纽尔
如何捕获 keydown 并反复检查以查看密钥是否已启动?