I've been trying to make a small game in the Console Application within Visual Studio. I want detect when I let go of a key. Because now when i let go of the key it stays "true" until i hit any other key.
Here is my code,
while (true)
{
keyInfo = Console.ReadKey();
if(keyInfo.Key == ConsoleKey.RightArrow)
{
rightPressed = true;
} else
{
rightPressed = false;
}
}
Does someone have a solution?