【发布时间】:2016-09-05 05:25:27
【问题描述】:
我正在尝试为 Windows 的 OBS 编写插件,我需要处理按键事件,现在我看到 (1)two posts (2)where people 提到他们的防病毒软件捕获
#include <windows.h>
//...
if( GetAsyncKeyState( VK_UP ) & 0x8000 )
{
// the 'Up' arrow key is currently being held down
}
if( GetAsyncKeyState( 'A' ) & 0x8000 )
{
// the 'A' key is currently being held down
}
作为键盘记录器,有一个专门命名为的防病毒软件 - Kaspersky
这是真的吗,还有没有更多的杀毒程序在 GetAsyncKeyState 上触发,因为杀毒程序认为它是一个键盘记录器,如果是,有没有更好的方法来处理 c++ 中的按键事件?
【问题讨论】:
-
您是否测试过这些声明?它是免费下载和几行代码。大多数游戏/游戏引擎都使用此 API。
-
@RichardCritten 还没有,我正要为它创建一个测试dll