clear the key buffer ???

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

clear the key buffer ???

Post by Acki »

Hi,
is it possible to clear the key input buffer ???

I have a window (non Irrlicht) that handles some key inputs and a Irrlicht window.
If I press the tab key in the non Irrlicht window I activate the FPS camera mode and set the Irrlicht window as active (with API function).
The Irrlicht's event receiver acts to the tab key, too, and disables the FPS camera mode.
But if I switch from the non Irrlicht window to the Irrlicht window the tab key is still in the key buffer and so Irrlicht switches back immadiatly !!!!!

So I whant to clear the key buffer after switching to the Irrlicht window...

If it's not possible with Irrlicht, maybe there is another way, maybe with the windows API ???


thx, Acki

.
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
madinitaly
Posts: 92
Joined: Sat Nov 29, 2003 8:30 pm
Contact:

Post by madinitaly »

I'm not sure to understand your question, but try

Code: Select all

fflush (stdin);
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

No, that doesn't work... :cry:

But now I'm using a flag...
If I switch to Irrlicht, I set the flag to true and if the flag is trur, Irrlicht doesn't act on the tab key... ;)

CU, Acki
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Post Reply