KeyEventEventArgs.cs 784 B

123456789101112131415161718192021222324
  1. using System;
  2. namespace Terminal.Gui {
  3. /// <summary>
  4. /// Defines the event arguments for <see cref="KeyEvent"/>
  5. /// </summary>
  6. public class KeyEventEventArgs : EventArgs {
  7. /// <summary>
  8. /// Constructs.
  9. /// </summary>
  10. /// <param name="ke"></param>
  11. public KeyEventEventArgs (KeyEvent ke) => KeyEvent = ke;
  12. /// <summary>
  13. /// The <see cref="KeyEvent"/> for the event.
  14. /// </summary>
  15. public KeyEvent KeyEvent { get; set; }
  16. /// <summary>
  17. /// Indicates if the current Key event has already been processed and the driver should stop notifying any other event subscriber.
  18. /// Its important to set this value to true specially when updating any View's layout from inside the subscriber method.
  19. /// </summary>
  20. public bool Handled { get; set; } = false;
  21. }
  22. }