protected virtual void OnKeyUp(KeyboardEventArgs e) { if (KeyUp != null) KeyUp(this, e); }
public static void _OnSpecialUp(int key, int x, int y) { Window w = null; if (mvarLastFullscreenWindow != null) { w = mvarLastFullscreenWindow; } else { int handle = Internal.FreeGLUT.Methods.glutGetWindow(); w = handleWindows[handle]; } int modifiers = Internal.FreeGLUT.Methods.glutGetModifiers(); KeyboardKey keys = GetSpecialKeyboardKey(key); KeyboardModifierKey modifierKeys = KeyboardModifierKey.None; KeyboardEventArgs e = new KeyboardEventArgs(keys, modifierKeys); w.OnKeyUp(e); }
protected virtual void OnKeyDown(KeyboardEventArgs e) { if (KeyDown != null) KeyDown(this, e); }
public static void _OnSpecial(int key, int x, int y) { Window w = null; if (mvarLastFullscreenWindow != null) { w = mvarLastFullscreenWindow; } else { int handle = Internal.FreeGLUT.Methods.glutGetWindow(); w = handleWindows[handle]; } int modifiers = Internal.FreeGLUT.Methods.glutGetModifiers(); KeyboardKey keys = GetSpecialKeyboardKey(key); KeyboardModifierKey modifierKeys = (KeyboardModifierKey)modifiers; KeyboardEventArgs e = new KeyboardEventArgs(keys, modifierKeys); w.OnKeyDown(e); foreach (Control ctl in w.Controls) { ctl.OnKeyDown(e); } }