need help for reading two keyboard inputs
I have the following code and was wandering if someone could help me in telling me how i could make the program read 2 inputs such as: 87 and 68 ('w' and 'd') instead of reading just one input at a time. In otherwords.. how could i get into the: if (check == 68) code area.
Code:
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
int num = e.KeyValue;
string w = Convert.ToString(num);
label1.Text = w;
switch (num)
{
case 87:
while (num == 87)
{
label4.Text = "check 1";
int check = e.KeyValue;
if (check == 68)
{
label4.Text = "Works";
}
else
{
break;
}
}
}
}