I have a Windows Form (C#) with a button on it. I'm trying to make it so when I click on the button it will wait for a key to be pressed by the user. Then save whatever key they pressed to a var.
My research led me to ReadKey() which is almost what I need, but not for the console. I can't find any simple solution for this.
private void Point1_Click(object sender, EventArgs e) {
Point1.Text = "Press key...";
//Wait for any keyboard key to be pressed.
//Save user input to:
string userInput;
Point1.Text = "Success!";
}