help
Root Question Message
bool loop = true;
while (loop)
{
//Loop Stuff
if (IsKeyDown(myKey))
{
loop = false;
}
}
while (loop)
{
//Loop Stuff
if (IsKeyDown(myKey))
{
break;
}
}
But they didn't work.
Also, saw this in StackOverflow:
while(!Console.KeyAvailable)
{
//do work
}
bool loop = true;
while (loop)
{
//Loop Stuff
if (Keyboard.IsKeyDown(Key.A))
{
loop = false;
}
}
system.windows.input.keyboard.iskeydown
?async void
has no proper context and I get the feeling it straight up loses it, causing your cancellation token to not properly cancel.Keyboard.IsKeyDown(Key.A)
ever reaches true, and see why it does not respond to it.