Originally Posted by
NightNinja654
Ok I am still new to C++, I have tried googlieng but I can't really find it because there is no real good way of stating the question. Anyways, lets say you have a program (like a bhop script) where if you hold spacebar it spams it, but only whenever you are not pressing any other keys. I can't find out a way to let me press other keys (like A-D to strafe) while spamming the spacebar with the keybd_event hack. If someone could help me that would be appreciated!
Also this is basically the code I am talking about where CS:GO / your computer doesn't recognize any other keys being pressed while holding spacebar
#include <iostream>
#include <windows.h>
#include <conio.h>
#include <stdlib.h>
#include <stdio.h>
int main()
{
while (1)
{
if (GetAsyncKeyState(VK_SPACE) & 0x8000)
{
keybd_event(VK_SPACE, 0x39, NULL, NULL);
Sleep(3);
keybd_event(VK_SPACE, 0x39, KEYEVENTF_KEYUP, NULL);
Sleep(3);
}
}
}