Ejemplo n.º 1
0
 void Keyboard_KeyUp(object sender, OpenTK.Input.KeyboardKeyEventArgs otk_e)
 {
     if (!CrowInterface.ProcessKeyUp((int)otk_e.Key))
     {
         KeyboardKeyUp.Raise(this, otk_e);
     }
 }
Ejemplo n.º 2
0
 protected virtual void Keyboard_KeyUp(object sender, OpenTK.Input.KeyboardKeyEventArgs otk_e)
 {
     if (focusedIdx >= 0)
     {
         if (ifaceControl [focusedIdx].ProcessKeyUp((int)otk_e.Key))
         {
             return;
         }
     }
     KeyboardKeyUp.Raise(this, otk_e);
 }
Ejemplo n.º 3
0
        private static IntPtr HookCallback(int nCode, IntPtr wParam, IntPtr lParam)
        {
            if (nCode >= 0)
            {
                int vkCode = Marshal.ReadInt32(lParam);

                if (wParam == (IntPtr)WM_KEYDOWN)
                {
                    KeyboardKeyDown?.Invoke((Keys)vkCode);
                }
                else if (wParam == (IntPtr)WM_KEYUP)
                {
                    KeyboardKeyUp?.Invoke((Keys)vkCode);
                }
            }

            return(CallNextHookEx(m_hookId, nCode, wParam, lParam));
        }