I'm working on a little part of my program, handling the input, basically I have this little code:
bool Done = false;
while (!Done)
{
ConsoleKeyInfo key = Console.ReadKey(true);
if (key.Key == ConsoleKey.Enter)
{
//Action
}
}
The main problem with this is that the code will handle the ReadKey even between actions.
So if you have a menu where you can press keys and then it would say "you pressed: x" if you press any buttons while it shows you this message, the ReadKey
already gets that new key.
So I want to block any further input until the user sees the menu again.