TolikPylypchuk / SharpHook

SharpHook provides a cross-platform global keyboard and mouse hook, event simulation, and text entry simulation for .NET
https://sharphook.tolik.io
MIT License
347 stars 32 forks source link

Support for KBDLLHOOKSTRUCT information data #76

Closed eyaldar closed 10 months ago

eyaldar commented 10 months ago

Hi,

Is the library support the keyboard information about the source of the key press, i.e this information? https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-kbdllhookstruct

TolikPylypchuk commented 10 months ago

Hi! Thanks for asking!

SharpHook supports most of the information provided in KBDLLHOOKSTRUCT in its keyboard events:

If you need information on the source of the key press as in whether it's injected or real, then you have the IsEventSimulated property. If you want to know the source of the key press as in the keyboard on which it was actually pressed, then this information is not available unfortunately.