C# Класс MouseKeyboardActivityMonitor.KeyboardHookListener

This class monitors all keyboard activities and provides appropriate events.
Наследование: BaseHookListener
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
KeyboardHookListener ( MouseKeyboardActivityMonitor.WinApi.Hooker hooker ) : System

Initializes a new instance of KeyboardHookListener.

Hooks are not active after instantiation. You need to use either BaseHookListener.Enabled property or call BaseHookListener.Start method.

Защищенные методы

Метод Описание
Dispose ( bool isDisposing ) : void

Method to be used from Dispose and finalizer. Override this method to release subclass sepcific references.

GetHookId ( ) : int

Returns the correct hook id to be used for HookNativeMethods.SetWindowsHookEx call.

ProcessCallback ( int wParam, IntPtr lParam ) : bool

This method processes the data from the hook and initiates event firing.

Приватные методы

Метод Описание
InvokeKeyDown ( KeyEventArgsExt e ) : void
InvokeKeyPress ( KeyPressEventArgsExt e ) : void
InvokeKeyPress ( int wParam, IntPtr lParam ) : void
InvokeKeyUp ( KeyEventArgsExt e ) : void

Описание методов

Dispose() защищенный Метод

Method to be used from Dispose and finalizer. Override this method to release subclass sepcific references.
protected Dispose ( bool isDisposing ) : void
isDisposing bool
Результат void

GetHookId() защищенный Метод

Returns the correct hook id to be used for HookNativeMethods.SetWindowsHookEx call.
protected GetHookId ( ) : int
Результат int

KeyboardHookListener() публичный Метод

Initializes a new instance of KeyboardHookListener.
Hooks are not active after instantiation. You need to use either BaseHookListener.Enabled property or call BaseHookListener.Start method.
public KeyboardHookListener ( MouseKeyboardActivityMonitor.WinApi.Hooker hooker ) : System
hooker MouseKeyboardActivityMonitor.WinApi.Hooker Depending on this parameter the listener hooks either application or global keyboard events.
Результат System

ProcessCallback() защищенный Метод

This method processes the data from the hook and initiates event firing.
protected ProcessCallback ( int wParam, IntPtr lParam ) : bool
wParam int The first Windows Messages parameter.
lParam System.IntPtr The second Windows Messages parameter.
Результат bool