Both Console.Read()
and Console.ReadKey()
seem to wait for a key to be pressed. How can I detect if anything was pressed without actually asking fo
You want to look into using Event Handlers. For using Windows forms the following should be helpful. Control.Keypress Event (System.Windows.Forms). For a good overview of Event Handlers in general, take a look at EventHandling in .NET using C#.
For a console application, you should look into the Console.CancelKeyPress Event
function.