Question
I use OpenGL+GLUT for simple application, but I can't handle a "Tab" key press. Does anybody knows how to handle pressing of Tab key ?
thanx
P.S.:Mac OS 10.5.6, GCC 4.0
Solution
void processNormalKeys(unsigned char key, int x, int y){
if ((int)key == 9) {
//tab pressed
....
}
....
}
....
int main(int argc, char ** argv) {
....
glutKeyboardFunc(processNormalKeys);
....
}
Solution
I believe hitting tab triggers the normal keyboard callback with a key value of 9 (ASCII for tab).
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow