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 中创建一个基于控制台的应用程序,该应用程序接受单独的键输入,但也读取组合键。例如,当用户同时按下S键和F键时,我希望它运行一些功能。是否有类似 getch() 的多键组合功能?
谢谢!
没有 ncurses 不提供类似的东西 - ncurses 来自一个输入可能只是通过串行端口作为直接连接的键盘的时代。
如果您需要知道是否同时按下了 2 个键,则需要访问较低级别的键盘。