private static INPUT[] BuildInputInModifierFrame(ModifierExtractor modifiers, Action<InputBuilder> action) { var builder = new InputBuilder(); foreach (Keys modifier in modifiers.AsEnumerable()) builder.AddKeyDown(modifier); action(builder); foreach (Keys modifier in modifiers.AsEnumerable()) builder.AddKeyUp(modifier); return builder.BuildArray(); }
public void KeyPress(Keys key) { var modifiers = new ModifierExtractor(key); foreach (Keys modifier in modifiers.AsEnumerable()) { KeyDown(modifier); } ActualKeyPress(key); foreach (Keys modifier in modifiers.AsEnumerable()) { KeyUp(modifier); } }
private static INPUT[] BuildInputInModifierFrame(ModifierExtractor modifiers, Action <InputBuilder> action) { var builder = new InputBuilder(); foreach (Keys modifier in modifiers.AsEnumerable()) { builder.AddKeyDown(modifier); } action(builder); foreach (Keys modifier in modifiers.AsEnumerable()) { builder.AddKeyUp(modifier); } return(builder.BuildArray()); }