1UNTITLED LOCAL UNTITLED
2
4 glutKeyboardFunc — Sets the Keyboard callback for the current window.
5
7 OpenGLUT - input
8
10 #include <openglut.h>
11
12 void
13 glutKeyboardFunc(void( * callback )( unsigned char key, int x, int y ));
14
16 callback Client function for keyboard event.
17
19 This callback registration allows you to handle traditional ASCII key‐
20 board input. A general rule of thumb is that if a key has a common ASCII
21 code, then OpenGLUT assigns that code to the key and calls the Keyboard
22 callback with the ASCII code in the key parameter. For other keys,
23 you must use glutSpecialFunc(). Not all keys can be reported by OpenG‐
24 LUT.
25
26 As a convenience, the mouse coordinates, relative to your window, are
27 also returned.
28
29 This callback is bound to the current window .
30
32 This function is not very international-friendly.
33
34 Windows created via glutCreateMenuWindow() always cascade keyboard and
35 mouse events to their parent.
36
38 glutKeyboardUpFunc(3) glutSpecialFunc(3)
39
40
41
42
43 Epoch