key press

hello all…is there any way that GLUT can detect whether a key is depressed? i’m trying to do (in glut) what win32 does with the message
or whatever.
i need to detect the instant the key is down, and the instant it is let up.

GLUTAPI void GLUTAPIENTRY glutKeyboardFunc(void (GLUTCALLBACK *func)(unsigned char key, int x, int y));

GLUTAPI void GLUTAPIENTRY glutKeyboardUpFunc(void (GLUTCALLBACK *func)(unsigned char key, int x, int y));

rts, thanks… i haven’t seen the glutKeyboardUpFunc before listed. i even searched for it in the red book. no hits. where did you find out about it?

$ cd /usr/X11R6/include/GL
$ grep -i keyboard *.h

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.