View Full Version : Keyboard: how can i read the buffer of the keyboard ?

03-01-2001, 06:44 AM
With the glut, it is possible to switch with the ASCII values of the keyboard.
But when someone uses two keys in same time, the return value it is the second key. In return, the buffer keyboard contains ONE value of the TWO key.
I think exist a windows function to read buffer but I don't know this?
Thanks for helping...

03-01-2001, 03:59 PM
If two keys are pressed are both reported to glut in normal cases but many keyboards has limitations so not all combinations can be detected. Here is an example of using glut with DirectInput but I do not think that is the solution: http://sites.netscape.net/ptrpck/glut23.zip

03-02-2001, 04:46 AM
The best 'non-Glut' way GetAsynchKeyState(). Maybe you could substitute.

03-02-2001, 08:13 AM
Another option is to use the SDL (http://www.libsdl.org) library. It has great cross-platform wrappers for keyboards, mice, joysticks, OpenGL, CD-ROMs, etc etc.

Check it out.