Name

glutIgnoreKeyRepeat - determines if auto repeat keystrokes
are reported to the current window

Python Specification

glutIgnoreKeyRepeat
	glutIgnoreKeyRepeat() -> None

C Specification

void glutIgnoreKeyRepeat(int ignore);

Parameters

ignore    Non-zero indicates auto repeat keystrokes should
          not  be  reported  by  the  keyboard and special
          callbacks;  zero  indicates  that  auto   repeat
          keystrokes will be reported.

Description

glutIgnoreKeyRepeat  determines  if auto repeat keystrokes
are reported to  the  current  window.   The  ignore  auto
repeat  state  of  a  window  can  be queried with glutDe-
viceGet(GLUT_DEVICE_IGNORE_KEY_REPEAT).

Ignoring auto repeated keystrokes  is  generally  done  in
conjunction with using the glutKeyboardUpFunc and glutSpe-
cialUpFunc callbacks to repeat key releases.   If  you  do
not ignore auto repeated keystrokes, your GLUT application
will experience repeated release/press  callbacks.   Games
using  the  keyboard  will  typically  want  to ignore key
repeat.

Glut Implementation Notes For X11

X11 sends KeyPress events repeatedly when the window  sys-
tem's  global auto repeat is enabled.  glutIgnoreKeyRepeat
can prevent these  auto  repeated  keystrokes  from  being
reported  as  keyboard  or special callbacks, but there is
still some minimal overhead by the X server to continually
stream KeyPress events to the GLUT application.  The glut-
SetKeyRepeat routine can be used to actually  disable  the
global  sending  of  auto  repeated KeyPress events.  Note
that glutSetKeyRepeat affects  the  global  window  system
auto  repeat  state  so  other  applications will not auto
repeat if you disable auto repeat globally  through  glut-
SetKeyRepeat.

See Also

glutSetKeyRepeat,     glutDeviceGet,     glutKeyboardFunc,
glutKeyboardUpFunc, glutSpecialFunc, glutSpecialUpFunc

Author

Mark J. Kilgard (mjk@nvidia.com)

:: Documentation :: References :: GLUT ::
:: Index (n/a) ::