瀏覽代碼

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

Charlie Kindel 5 年之前
父節點
當前提交
09a06080ec
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      Terminal.Gui/Core.cs

+ 5 - 0
Terminal.Gui/Core.cs

@@ -1070,6 +1070,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>