You need to create your own InputGesture
, by overriding the Matches
method.
Something like that:
public class MultiInputGesture : InputGesture
{
public MultiInputGesture()
{
Gestures = new InputGestureCollection();
}
public InputGestureCollection Gestures { get; private set; }
private int _currentMatchIndex = 0;
public override bool Matches(object targetElement, InputEventArgs inputEventArgs)
{
if (_currentMatchIndex < Gestures.Count)
{
if (Gestures[_currentMatchIndex].Matches(targetElement, inputEventArgs))
{
_currentMatchIndex++;
return (_currentMatchIndex == Gestures.Count);
}
}
_currentMatchIndex = 0;
return false;
}
}
It probably needs a little more than that, like ignoring certain events (e.g. KeyUp
events between KeyDown
events shouldn't reset _currentMatchIndex
), but you get the picture...