检测同时按下两个键的情况
我想在同时按下两个键时执行某些操作。
这对我不起作用。 不知道为什么。
if(GetAsyncKeyState(VK_F12) && GetAsyncKeyState(VK_F1))
{
MessageBoxA(0, "Injection is working!", "Succes!", MB_ICONINFORMATION | MB_OK);
}
我想知道如何实现当我同时按下两个键时执行代码。
I want to do something when two keys are pressed at the same time.
This is not working for me.
Don't know why.
if(GetAsyncKeyState(VK_F12) && GetAsyncKeyState(VK_F1))
{
MessageBoxA(0, "Injection is working!", "Succes!", MB_ICONINFORMATION | MB_OK);
}
I want to know how to achieve so that code is executed when I press two keys at the same time.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您如何知道按下按键时您的代码正在被调用?
为了使您的代码在消息泵中被称为“in ether:
How do you know your code is getting called at the time the keys are getting pressed?
For your code to be getting called your in ether:
许多键盘无法检测同时按下的多个键。检查不同的组合。
Many keyboards are unable to detect multiple keys pressed at once. Check different combination.