I have a simple console app written in C#. I want to be able to detect arrow key presses, so I can allow the user to steer. How do I detect keydown/keyup events with a con
bool keyWasPressed = false;
if (consolekey.avalable)
{
keyvar = console.readkey(true);
keyWasPressed = true;
}
if(keyWasPressed)
{
//enter you code here using keyvar
}
else
{
//the commands that happen if you don't press anything
}