Input (Continued)
This event is triggered whenever one of the standard keyboard keys is pressed.
glutKeyboardFunc(keyboardCB); /* register keyboard callback */ void keyboard(unsigned char key, int x, int y);
where key is the ASCII code of the pressed key; and x, y are the coordinates of the mouse cursor at the time of the event.
This event is triggered whenever one of the special keyboard keys is pressed.
glutSpecialFunc(specialCB); /* register special callback */ void specialCB(int key, int x, int y);
where key is one of the following macro values (defined in glut.h):
GLUT_KEY_LEFT | Left arrow | GLUT_KEY_F1 | F1 function key |
GLUT_KEY_UP | Up arrow | GLUT_KEY_F2 | F2 function key |
GLUT_KEY_RIGHT | Right arrow | GLUT_KEY_F3 | F3 function key |
GLUT_KEY_DOWN | Down arrow | GLUT_KEY_F4 | F4 function key |
GLUT_KEY_PAGE_UP | Page up | GLUT_KEY_F5 | F5 function key |
GLUT_KEY_PAGE_DOWN | Page down | GLUT_KEY_F6 | F6 function key |
GLUT_KEY_HOME | Home | GLUT_KEY_F7 | F7 function key |
GLUT_KEY_END | End | GLUT_KEY_F8 | F8 function key |
GLUT_KEY_INSERT | Insert | GLUT_KEY_F9 | F9 function key |
GLUT_KEY_F10 | F10 function key | ||
GLUT_KEY_F11 | F11 function key | ||
GLUT_KEY_F12 | F12 function key |
and x, y are the coordinates of the mouse cursor at the time of the event.
On to texture mapping...
Back to input (mouse)...
Back to the 13.016 overview...