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.
Is there any way to detect if a key is being held down while inside of the glutMouseFunc?
是的。存储当前按下的键的全局可访问列表。然后在 MouseFunc 中阅读该列表。
注意鼠标回调已经获得了控制键状态(shift/alt/ctrl),所以一般不需要这样做。