glutGetModifiers

returns the modifier key state when certain callbacks were generated.

Signature

glutGetModifiers( )-> int
glutGetModifiers( ) -> <class 'ctypes.c_int'>
glutGetModifiers(  ) -> c_int

Description

glutGetModifiers returns the modifier key state at the time the input event for a keyboard, special, or mouse callback is generated. This routine may only be called while a keyboard, special, or mouse callback is being handled. The window system is permitted to intercept window system defined modifier key strokes or mouse buttons, in which case, no GLUT callback will be generated. This interception will be independent of use of glutGetModifiers .
The bitmask components of the returned integer value are:
GLUT_ACTIVE_SHIFT
Set if the Shift modifier or Caps Lock is active.
GLUT_ACTIVE_CTRL
Set if the Ctrl modifier is active.
GLUT_ACTIVE_ALT
Set if the Alt modifier is active.

See Also

glutSpecialFunc glutKeyboardFunc glutMouseFunc

Sample Code References

The following code samples have been found which appear to reference the functions described here. Take care that the code may be old, broken or not even use PyOpenGL.

glutGetModifiers
OpenGLContext OpenGLContext/events/glutevents.py Lines: 15, 18, 23, 24, 28
{LGPL} PyUI2 renderers/openglGlut.py Lines: 120
{LGPL} PyUI2 system/glutdevice.py Lines: 135
{LGPL} PyMT pymt/ui/window/win_glut.py Lines: 18, 130