4

我正在 Mac 上开发一个 GLUT 程序。Mac 似乎以一种有趣的方式通过 GLUT 传递修饰符。glutGetModifiers() 不会捕获 Alt 和控制键,而是将它们转换为按钮 int。glutGetModifiers() 或按钮 int 似乎都没有捕获命令键。此外,它不会显示为我的 glutKeyboardFunc(...) 中的键。

有什么方法可以捕获/检测 GLUT 中的命令(苹果)键?

4

2 回答 2

2
于 2013-08-06T13:59:51.717 回答
0

While the Carbon solution is better in some cases, one may also directly patch and replace the GLUT framework on mac os x to support the command key. This patch catches the command key and defines a respective modifier mask GLUT_ACTIVE_COMMAND.

于 2013-10-24T12:45:22.313 回答