public static Task <IKeyEventArgs> UpAsync(this ISequence sequence, int timeout = 8888, string description = "", string stateTree = KeyStateTrees.Default) { var command = new KeyEventAsync(); var trigger = sequence.Up(command.OnEvent, null, description, stateTree); return(command.WaitAsync(timeout)); }
public static Task <IKeyEventArgs> UpAsync(this ISequenceUnit sequenceUnit, int timeout = -1, string description = "", string stateTree = KeyStateTrees.Default) { var combination = sequenceUnit.ToCombination(); var command = new KeyEventAsync(); var trigger = Keyboard.Up(combination, stateTree); CommandManager.Add(trigger, command.OnEvent, null, description); return(command.WaitAsync(timeout)); }