Permalink
Browse files

Enabled KeyDown and KeyUp events in NativeWindow.

  • Loading branch information...
1 parent e2404d2 commit 38532804ec3c0613004d2c1116836148d1853b6a @azeno azeno committed Nov 22, 2013
Showing with 16 additions and 0 deletions.
  1. +16 −0 Source/OpenTK/NativeWindow.cs
@@ -999,12 +999,24 @@ private void OnClosedInternal(object sender, EventArgs e)
#endregion
+ #region OnKeyDownInternal
+
+ private void OnKeyDownInternal(object sender, KeyboardKeyEventArgs e) { OnKeyDown(e); }
+
+ #endregion
+
#region OnKeyPressInternal
private void OnKeyPressInternal(object sender, KeyPressEventArgs e) { OnKeyPress(e); }
#endregion
+ #region OnKeyUpInternal
+
+ private void OnKeyUpInternal(object sender, KeyboardKeyEventArgs e) { OnKeyUp(e); }
+
+ #endregion
+
#region OnMouseEnterInternal
private void OnMouseEnterInternal(object sender, EventArgs e) { OnMouseEnter(e); }
@@ -1074,7 +1086,9 @@ private bool Events
implementation.Disposed += OnDisposedInternal;
implementation.FocusedChanged += OnFocusedChangedInternal;
implementation.IconChanged += OnIconChangedInternal;
+ implementation.KeyDown += OnKeyDownInternal;
implementation.KeyPress += OnKeyPressInternal;
+ implementation.KeyUp += OnKeyUpInternal;
implementation.MouseEnter += OnMouseEnterInternal;
implementation.MouseLeave += OnMouseLeaveInternal;
implementation.Move += OnMoveInternal;
@@ -1092,7 +1106,9 @@ private bool Events
implementation.Disposed -= OnDisposedInternal;
implementation.FocusedChanged -= OnFocusedChangedInternal;
implementation.IconChanged -= OnIconChangedInternal;
+ implementation.KeyDown -= OnKeyDownInternal;
implementation.KeyPress -= OnKeyPressInternal;
+ implementation.KeyUp -= OnKeyUpInternal;
implementation.MouseEnter -= OnMouseEnterInternal;
implementation.MouseLeave -= OnMouseLeaveInternal;
implementation.Move -= OnMoveInternal;

0 comments on commit 3853280

Please sign in to comment.