key up event, how?

Hi, can anyone tell me how to manage the Key_up event? iam using the glutKeyboardFunc(&keyPressed); to control they down event but i have no idea how to make the up.

Thanks for any help
=)

glutKeyboardUpFunc

There is not function for keystate other then pressed.
Just one of the limitation of using glut, you may need to look at using something like SDL instead of GLUT.

Originally posted by hellox:
[b]Hi, can anyone tell me how to manage the Key_up event? iam using the glutKeyboardFunc(&keyPressed); to control they down event but i have no idea how to make the up.

Thanks for any help
=)[/b]

nexusone:
I think you need to update your GLUT files and your documentation files.

glutKeyboardUpFunc does exist, and should be valid for his use. I tested it and it does work - held down a key for a while… let it go… glutKeyboardUpFunc callback function sprang into action. This is in version GLUT 3.7 header

#if (GLUT_API_VERSION >= 4 | | GLUT_XLIB_IMPLEMENTATION >= 13)//defined as 3 and 15 respectively
GLUTAPI void APIENTRY glutKeyboardUpFunc(void (GLUTCALLBACK *func)(unsigned char key, int x, int y));
GLUTAPI void APIENTRY glutSpecialUpFunc(void (GLUTCALLBACK *func)(int key, int x, int y));
GLUTAPI void APIENTRY glutJoystickFunc(void (GLUTCALLBACK *func)(unsigned int buttonMask, int x, int y, int z), int pollInterval);
#endif

[This message has been edited by shinpaughp (edited 04-20-2003).]

Thanks to all =D