I’m using the OpenGL/Glut library. In the handleKeyPress function, I attempted to display the key that was pressed. To my surprise, the cout is only triggered when the exit key is pressed. So how can I find the number that corresponds to the key? Anyone have a chart?
void handleKeyPress(unsigned char key, int mouseX, int mouseY) {
cout << "key: " << key << endl;
switch (key) {
// escape
case 27:
exit(0);
break;
}
}