Exemplo n.º 1
0
 private void OnKeyboardHooked(KeyboardHookedEventArgs e)
 {
     if (this.KeyStatusChanged != null)
     {
         this.KeyStatusChanged(this, e);
     }
 }
Exemplo n.º 2
0
 private int CallNextHook(int code, KeyboardMessage message, ref KEYBOARDSTATE state)
 {
     if (code >= 0)
     {
         KeyboardHookedEventArgs e = new KeyboardHookedEventArgs(message, ref state);
         OnKeyboardHooked(e);
         if (e.Cancel)
         {
             return(-1);
         }
     }
     return(NativeMethod.CallNextHookEx(IntPtr.Zero, code, message, ref state));
 }