Keyboard Help

I have GLUT, and I like GLUT except for the fact its keyboard routines are CRAP. You can only read a single key press at a time. Now, is there a way I can read more than 1 keypress at a time with DirectInput or something similar but still keep the rest of my GLUT structure (initialisation).

Try Nehe’s Tutorials - Lesson 23 .
Or send me an email: (please try nehe first)



Yeah, I’ve also been very unimpressed with
glut’s keyboard handling (not being able
to chord keypresses). Is there a particular reason why this can’t be done (if it actually is complete impossible, I don’t know)? The source is available for many implementations (mesa’s)…

scott olsson

GLUT can detect both if a key is pressed and then it is released so it is not hard to handle multiple keys. Save the states in some variables.

Thanks! That is exactly what I needed to know! I can see why by default it wont read more than a single key press at a time…