glut key-down func?

Hello!

I’d like to use a held-down key as a modifier to a command. For example, in Maya, if you hold the alt key down the mouse buttons act as navigation tools regardless of what tool is selected. I know the glut keyboard func works to record what key was pressed, but is there a glut function that is recording what key is currently down? Or do I need to go to a more full-featured ui builder than glut?

Thanks for any help!

Hello,

If you only want to know if the shift, alt or ctrl key is held down, you can use glutGetModifiers() to query its state, when a keyboard or mouse callback function is entered.
helpful link

Thanks, Sumpfratte!

That’s just what I’m looking for.

Yeah, that’s something we’ve been thinking of
adding to OpenGLUT .
The ability to query keyboard state, as well
as receive keyboard events.

Cheers,

Nigel Stewart