In this section, we will introduce four new functions for processing keyboard input. The first function allows us to disable keyboard repeat. The function is prototype: int glusetkeyrepeat (INT repeatmode); parameter: repeatmode: Enable, disable, or restore Auto Repeat mode. Below are the possible values. The possible value of repeatmode is: glu_key_repeat_off: Disable auto repeat mode. Glu_key_repeat_on: Enable Auto Repeat mode. Glu_key_repeat_default: restores the auto repeat mode to the default state. Note that this function is global. That is, it will affect the repeat mode of all windows. It is not just our application. Therefore, when you use this function to disable the auto repeat mode, it is necessary to reset the auto repeat mode to the default mode at the end of the program. GLUT provides another simple function to disable keyboard repeat, which allows us to safely ignore keyboard repeat without affecting other programs. The function is prototype: int glutignorekeyrepeat (INT repeatmode); parameter: repeatmode: 0 is passed, Auto Repeat is enabled, and Auto Repeat is disabled if not 0. In some cases, when the key repeat occurs, function callback is not accepted. However, if you want to execute an action after a key is pressed, you need to know when the key will be released. GLUT provides two callback functions for function registration. Void glukeyboardupfunc (void (* func) (unsigned char key, int X, int y); void gluspecialupfunc (void (* func) (INT key, int X, int y); parameter: FUNC: name of the callback function. In the next section, we will provide a program, that is, the code in the previous section, to see how these functions work. (This chapter is difficult to translate. I don't know what to say, Khan. --| View the original text if necessary. Http://www.lighthouse3d.com/opengl/glut/index.php? 7. I don't think the original article is clearly written. Let's take a look at the example in the next section. Haha .)