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);
}
There's the snippet. It takes in input correctly, but despite the FlushConsoleInputBuffer() line, it still echo's. What am I missing here?