Is it possible to detect in my custom Win32 control, while processing WM_CHAR, or WM_KEYDOWN message, whether the keystroke came from the actual keyboard, or was emulated by a call to SendInput or keybd_event type function?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You could check if the LLKHF_INJECTED
flag is set in a low-level hook. I don't think you can tell just by looking at the LPARAM.