How MouseKeyHook works and available data
vNextThe library attaches to Windows global hooks to track input and raises standard .NET events.
Standard events provide:
- Mouse coordinates
- Mouse buttons clicked
- Mouse drag actions
- Mouse wheel scrolls
- Key presses and releases
- Special key states
Extended arguments (MouseEventExtArgs and KeyEventExtArgs) provide additional capabilities:
- Input suppression: You can prevent an input from reaching other applications by setting
e.Handled = truewithin the event handler. - Timestamp: The exact time the event occurred.
- State detection:
IsMouseDown/Upfor mouse andIsKeyDown/Upfor keys.