/// <summary> /// Handle <see cref="KeyEventDto"/>s to <see cref="KeyCombination"/> /// </summary> public KeyCombination Handle(KeyEventDto e, Key removalKey = Key.Back) { if (e.IsDown(out var down)) { if (e.Key == removalKey) { Pop(); } else { Add(down); } return(this); } if (e.IsUp(out var up)) { TryEnd(up); return(this); } return(this); }
public static KeyEventDto Down(this Key @this) => KeyEventDto.Down(@this);
public static KeyEventDto Up(this Key @this) => KeyEventDto.Up(@this);