View Full Version : glut and keyboard
07-05-2001, 12:12 PM
I know that you can use
to check for the esc key, but what about the arrows, or shift keys.
Where can i find a list for this?
07-05-2001, 12:21 PM
use glutSpecialFunc which does the same thing as glutKeyboardFunc but for 'special' keys:
void specialFunc(int key, int x, int y)
case GLUT_KEY_UP: break;
case GLUT_KEY_F1: break;
case GLUT_KEY_PAGE_DOWN: break;
see glut.h for more info (also check glutSpecialUpFunc)
[This message has been edited by dUckmAnn (edited 07-05-2001).]
07-06-2001, 10:20 AM
do a search in the help files for "ascii character codes" or at m$ msdn site (i am sure there are more sites out there with this information).
it will show a chart of the various characters along with their ascii values.
07-06-2001, 10:22 PM
For the "special" keys, glut has predefined ascii codes. just go: case GLUT_KEY_UP:
instead of case whateverasciicode:
but this only works for the "special" keys.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.