i found this article http://brebru.com/asciicodes.html
but the F12 or F10 or ANY F button on keyboard no working
you know im making an EXIT button in OpenGL it work with 27 on ESC but i need have exit game on F12 and the ASCII code for it doesn't work... :/ you doesn't know someone what is wrong ?
Are you using GLUT? If that's the case, you can use glutSpecialFunc to detect the F keys.
1 2 3 4 5 6 7
//example of a function you might pass to glutSpecialFunc
void specialKeyDown(int key, int x, int y){
if (key == GLUT_KEY_F12){
printf("F12 key detected");
exit(0);
}
}
Register the callback with glutSpecialFunc before entering the loop.