Keyboard inputs

Can anyone suggest a method to gain keyboard inputs from multiple keys fast. The only method i have seen is switch/case statements which is only allowing 1 key at a time and to me seems a very poor method of input.

Any help is appreciated!

Thanks Chris

You think you are talking about the glut library keyboard input, another option is to look at the SDL library over glut it has more advance keyboard routines.

Originally posted by deadweight89:
[b]Can anyone suggest a method to gain keyboard inputs from multiple keys fast. The only method i have seen is switch/case statements which is only allowing 1 key at a time and to me seems a very poor method of input.

Any help is appreciated!

Thanks Chris [/b]

You can also keep track of the state of the keys you care about, and just set the state with the key up/down callbacks. Then you can easily test for multiple key presses.

Alternatively, you could use functions that can check the state of particular keys instead of relying on the callback functions at all. For instance in Windows, you could use GetAsyncKeyState()