using glutKeyboardFunc w/ ungetc(..)

hi, i am using the glutKeyboardFunc keyboard input but i would also like to push messages to the keyboard buffer using an ungetc call like this:
ungetc(‘B’, stdin); to simulate a ‘B’ being pushed on the keyboard. this is not working though, does anyone have any insight into this? thanks in advance.

Why not make exactly the same thing that in your glutKeyboard func ???

@+
Cyclone

Or more simple, make a call to your glutKeyboard func with the goods arguments …

@+
Cyclone

the problem is that i am using multiple threads with the main thread running the glutMainLoop(). any of the worker threads would like to send a message to the main thread by doing an ungetc(), this way it is buffered (same way keyboard input is buffered) and the main thread can receive the keyboard input with my glutKeyboardFunc callback method. in short there are multiple threads. thanks