c++inputkeyboardglut

OpenGL / Glut Buttons and Keys


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:

But are there any more? eg, for all keys on a keyboard and mouse?


Solution

  • 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