[This is preliminary documentation and is subject to change.]

The LowLevelKeyboardHook type exposes the following members.

Constructors

  NameDescription
Public methodLowLevelKeyboardHook()()()()
Default CTor
Public methodLowLevelKeyboardHook(Boolean)
CTor with possibility of immediate hook activation

Methods

  NameDescription
Protected methodCallNextHook
The CallNextHookEx function passes the hook information to the next hook procedure in the current hook chain. A hook procedure can call this function either before or after processing the hook information.
(Inherited from Win32Hook.)
Public methodDispose()()()()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from Win32Hook.)
Protected methodDispose(Boolean)
Implements Dispose()()()()
(Inherited from Win32Hook.)
Protected methodGetModuleHandle
Gets module handle pased to hMod parameter of SetWindowsHookEx Win32 API function
(Overrides Win32Hook..::..GetModuleHandle()()()().)
Protected methodHookProc
Application-defined or library-defined callback function used with the SetWindowsHookEx function. The system calls this function every time a new keyboard input event is about to be posted into a thread input queue. The keyboard input can come from the local keyboard driver or from calls to the keybd_event function. If the input comes from a call to keybd_event, the input was "injected". However, the WH_KEYBOARD_LL hook is not injected into another process. Instead, the context switches back to the process that installed the hook and it is called in its original context. Then the context switches back to the application that generated the event.
(Overrides Win32Hook..::..HookProc(Int32, IntPtr, IntPtr).)
Protected methodOnKeyEvent
Called when low-level keyboard hok is processed, raises the KeyEvent event
Public methodRegisterAsyncHook
Registers a low-level keyboard hook on curent thread. The thread will be exited when hook is unregistered.
(Inherited from Win32Hook.)
Public methodRegisterHook
Registers a low-level keyboard hook, so keyboard events are obtained by this class.
(Inherited from Win32Hook.)
Public methodUnregisterHook
Unregisters registered hook for this instance
(Inherited from Win32Hook.)

Properties

  NameDescription
Protected propertyHandledHookType
If overriden in derived class gets type of hook represented by derived class
(Overrides Win32Hook..::..HandledHookType.)
Protected propertyHookHandle
Gets handle of current hook if it is registered
(Inherited from Win32Hook.)
Public propertyIsAsync
Gets value indicating if hook events occur on different thread than hook was registered.
(Inherited from Win32Hook.)
Public propertyIsDisposed
Gets value indicating if this instance was already disposed
(Inherited from Win32Hook.)
Public propertyRegistered
Gets value indicating if hook is registered for this instance
(Inherited from Win32Hook.)

Events

  NameDescription
Public eventDisposed
Raised when object is disposed
(Inherited from Win32Hook.)
Public eventKeyEvent
Raised when class processes low-level keyboard hook callback

See Also