Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

glutkeyboardfunc(3) [centos man page]

UNTITLED
LOCAL UNTITLED NAME
glutKeyboardFunc -- Sets the Keyboard callback for the current window. LIBRARY
OpenGLUT - input SYNOPSIS
#include <openglut.h> void glutKeyboardFunc(void( * callback )( unsigned char key, int x, int y )); PARAMETERS
callback Client function for keyboard event. DESCRIPTION
This callback registration allows you to handle traditional ASCII keyboard input. A general rule of thumb is that if a key has a common ASCII code, then OpenGLUT assigns that code to the key and calls the Keyboard callback with the ASCII code in the key parameter. For other keys, you must use glutSpecialFunc(). Not all keys can be reported by OpenGLUT. As a convenience, the mouse coordinates, relative to your window, are also returned. This callback is bound to the current window . CAVEATS
This function is not very international-friendly. Windows created via glutCreateMenuWindow() always cascade keyboard and mouse events to their parent. SEE ALSO
glutKeyboardUpFunc(3) glutSpecialFunc(3) Epoch

Check Out this Related Man Page

UNTITLED
LOCAL UNTITLED NAME
glutSpecialFunc -- Sets the Special callback for the current window LIBRARY
OpenGLUT - input SYNOPSIS
#include <openglut.h> void glutSpecialFunc(void( *callback )( int key, int x, int y )); PARAMETERS
callback Client function for keyboard event. DESCRIPTION
Registers a callback for OpenGLUT to call when the user presses "special" keys on the keyboard. The special callback handles some additional keys that are not covered under plain "keyboard" events. The key that is passed to the call- back is one of an enumerated set. The association to keys on your keyboard should be obvious. Their GLUT symbol names are: - GLUT_KEY_F1 - GLUT_KEY_F2 - GLUT_KEY_F3 - GLUT_KEY_F4 - GLUT_KEY_F5 - GLUT_KEY_F6 - GLUT_KEY_F7 - GLUT_KEY_F8 - GLUT_KEY_F9 - GLUT_KEY_F10 - GLUT_KEY_F11 - GLUT_KEY_F12 - GLUT_KEY_LEFT - GLUT_KEY_UP - GLUT_KEY_RIGHT - GLUT_KEY_DOWN - GLUT_KEY_PAGE_UP - GLUT_KEY_PAGE_DOWN - GLUT_KEY_HOME - GLUT_KEY_END - GLUT_KEY_INSERT To receive other keys, see glutKeyboardFunc(). This callback is bound to the current window . CAVEATS
Many keys are not included; nor is it possible to apply qualifiers such as the Shift or Ctrl key to these keys. Windows created via glutCreateMenuWindow() always cascade keyboard and mouse events to their parent. SEE ALSO
glutSpecialUpFunc(3) glutKeyboardFunc(3) Epoch
Man Page