如何检测击键是否由keybd_event或SendInput模拟? [英] How to detect if keystroke was emulated by keybd_event or SendInput?
本文介绍了如何检测击键是否由keybd_event或SendInput模拟?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在处理 WM_KEYDOWN 消息,无论是来自实际键盘的击键,还是来自模拟的调用 SendInput 或
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?
推荐答案
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.
这篇关于如何检测击键是否由keybd_event或SendInput模拟?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文