I'm trying to make a simple square move, but before I get ahead of myself I need to be sure I understand what keys are built into Glut.
I'm aware of the following keys:
GLUT_KEY_F1, GLUT_KEY_F2, ..., GLUT_KEY_F12
- F1 through F12 keysGLUT_KEY_PAGE_UP, GLUT_KEY_PAGE_DOWN
- Page Up and Page Down keysGLUT_KEY_HOME, GLUT_KEY_END
- Home and End keysGLUT_KEY_LEFT, GLUT_KEY_RIGHT, GLUT_KEY_UP, GLUT_KEY_DOWN
- Arrow
keysGLUT_KEY_INSERT
- Insert keyBut are there any more? eg, for all keys on a keyboard and mouse?
glut
divides key in keyboard by glutSpecialFunc
w/c takes special keys such as F1,F2..., NUMPADS, etc. while glutKeyboardFunc
takes all keys that can be represented by a character like the alphabets, numbers, ESC (27 in 'ASCII'), ENTER (32 in 'ASCII'), etc.
in summary, glutKeyboardFunc
take char
parameters that can be represented without using any '\' (backslash, like '\t', '\n') before any character the rest are handled by glutSpecialFunc