Closed eyaldar closed 10 months ago
Hi! Thanks for asking!
SharpHook supports most of the information provided in KBDLLHOOKSTRUCT
in its keyboard events:
vkCode
- available in the KeyboardEventData.RawCode
field, although you should use KeyboardEventData.KeyCode
instead as it's the same on all platforms whereas RawCode
is platform-dependent.scanCode
- not available and you don't really need it unless you're doing some super low-level stuff.flags
- partially available:
LLKHF_EXTENDED
- not available.LLKHF_LOWER_IL_INJECTED
- not available.LLKHF_INJECTED
- available as part of the UioHookEvent.Reserved
field, or the HookEventArgs.IsEventSimulated
property.LLKHF_ALTDOWN
- available indirectly through the UioHookEvent.Mask
field.LLKHF_UP
- available implicitly based on the event type.time
- not available if you need Windows-specific message time, but the Unix timestamp is available in the UioHookEvent.Time
field or the HookEventArgs.EventTime
property.dwExtraInfo
- not available.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.
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