View Full Version : Release key event in GLUT
11-01-2000, 10:25 PM
Could somebody point out to me how to
listen to release key event in GLUT.
I thought it was possible in 3.7, but can;t find it.
Thanks a lot
11-02-2000, 07:12 AM
glutKeyboardUpFunc(). Works just like glutKeyboardFunc(). It's in the header but wasn't documented anywhere last time I looked.
Isn't this in the FAQ? It should be, it's come up on this board several times before.
11-02-2000, 03:33 PM
you may also use it for the special keys with:
void glutSpecialUpFunc(void (*func)(int key,int x, int y));
furthermore you may want to ignore key repeats, in GLUT there are these two functions:
int glutSetKeyRepeat(int repeatMode);
int glutIgnoreKeyRepeat(int repeatMode);
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.
11-02-2000, 06:58 PM
Thanks to you all guys.
It was VERY helpful!
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.