You should create a counter and increment it each time the key is pressed.
If you are talking about double or triple "clicking", you also need to set a Timer.
Each time the timer ends, you reset your counter.
Only thing left is to call the method you want depending on your counter value.
int MyKeyCounter = 0;
Timer CounterResetter = new Timer(1000);
CounterResetter.Elapsed += ResetCounter;
void OnKeyPressEvent(object sender, KeyPressEventArgs e)
{
if (e.Key == Key.Escape)
{
MyKeyCounter++;
if(!CounterResetter.Enabled)
CounterResetter.Start();
}
}
void ResetCounter(Object source, ElapsedEventArgs e)
{
if(MyKeyCounter == 1)
Method1();
else if (MyKeyCounter == 2)
Method2();
...
MyKeyCounter = 0;
}
Attach the event on the control you want and put the fields at the top.