Browse Source

Refactored keydown/up/press events to use event vs. Action<T>

Charlie Kindel 5 năm trước cách đây
mục cha
commit
04807df358
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      Terminal.Gui/Core.cs

+ 5 - 0
Terminal.Gui/Core.cs

@@ -1075,6 +1075,11 @@ namespace Terminal.Gui {
 			public KeyEvent KeyEvent { get; set; }
 		}
 
+		public class KeyEventEventArgs : EventArgs {
+			public KeyEventEventArgs(KeyEvent ke) => KeyEvent = ke;
+			public KeyEvent KeyEvent { get; set; }
+		}
+
 		/// <summary>
 		/// Invoked when a character key is pressed and occurs after the key up event.
 		/// </summary>