private void Form1_KeyDown(object sender, KeyEventArgs e) { try { switch (e.KeyCode.ToString()) { case "A": if (TimerT.Enabled) { a.Control(1); } break; case "D": if (TimerT.Enabled) { a.Control(2); } break; case "S": if (TimerT.Enabled) { a.Control(3); } break; case "P": TimerT.Enabled = !TimerT.Enabled; break; case "Space": a.Move(); break; default: break; } } catch { } }