View Full Version : glut and keyboard
07-05-2001, 01: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, 01: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, 11: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, 11: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.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.