public KeyboardHook(bool supressKeyPress)
 {
     this.disposed        = false;
     this.supressKeyPress = supressKeyPress;
     this.HookAllKeys     = false;
     khp = new keyboardHookCallback(OnHookCallback);
 }
 public void Dispose()
 {
     if (!this.disposed)
     {
         this.Unhook();
         this.khp   = null;
         this.hHook = IntPtr.Zero;
         this.hookedKeys.Clear();
         this.hookedKeys = null;
         this.disposed   = true;
     }
 }
 static extern IntPtr SetWindowsHookEx(int idHook, keyboardHookCallback callback, IntPtr hInstance, uint threadId);