0
SetConsoleMode(InputH,ENABLE_PROCESSED_INPUT|ENABLE_MOUSE_INPUT);
	while(1)
	{
		ReadConsoleInput(InputH,&InputRecord,1,&InputEvents);
		if(InputRecord.Key_Event)
		{
			if(InputRecord.Key_Code == VK_RIGHT) cout<<"You pressed right. Yay!"<<endl;
		}
	FlushConsoleInputBuffer(InputH);		
	}


FlushConsoleInputBuffer() is used to prevent input from echoing, correct? If so, that command isn't doing it's job, I still get echo, and I can't figure out why. Any suggestions?

I reposted this because it looks like my text on the other post was made too small.

2
Contributors
2
Replies
3
Views
12 Years
Discussion Span
Last Post by SquirrelProdigy
0

>FlushConsoleInputBuffer() is used to prevent input from echoing, correct?
No.

>I reposted this because it looks like my text on the other post was made too small.
It looked fine to me, maybe you just reposted with an annoying font size because everyone was ignoring you.

0

It looked fine to me, maybe you just reposted with an annoying font size because everyone was ignoring you.

Sorry. Geez. But tell me, please, how I could go about fixing my echo problem. I've read a few tutorials, and in their input loops, they use FlushConsoleInputBuffer() after an input is read to keep from echoing, but that's not working. So I don't know what to do.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.