PDA

View Full Version : Release key keyboard event in GLUT?



Xelatihy
11-01-2000, 10:24 PM
Is there a way in glut 3.7
to listen to key release events?
If so, where is the documentation and
how can I disable key autorepeat?

Thanks

--X

Antonio
11-02-2000, 03:26 PM
Yes there is!
These are the four functions that maybe of interest to you.

int glutSetKeyRepeat(int repeatMode);
int glutIgnoreKeyRepeat(int repeatMode);
void glutKeyboardUpFunc(void (*func)(unsigned char key,int x,int y));
void glutSpecialUpFunc(void (*func)(int key,int x, int y));


My glut tutorial has a section that deals with this,
http://www.fatech.com/tech/opengl/glut/index.php3?7

Source code is also provided.

Antonio