View Full Version : Keyboard funcs

03-23-2004, 06:51 AM
how can i handle two keys being pressed at the same time?

03-23-2004, 07:34 AM
for some reason, I think your question is more complex.

you can do something like:

// ...

if (pressed(first_key) && pressed(second_key) )
// handle this event

// ...

03-23-2004, 08:15 AM
Ok, as i know it, to handle keyboard events with opengl you do something like this...


void keyboard(unsigned char key, int w, int h)


doing it this way, i cant press and hold two keys at the same time, it will only be acting as if i only pressed one key(the last one i pressed and not both)