#include<bits/stdc++.h> #include<windows.h> int main() { while(1) { if(GetAsyncKeyState(VK_SPACE)) { mouse_event(MOUSEEVENTF_LEFTDOWN|MOUSEEVENTF_LEFTUP,0,0,0,0); } Sleep(1); } return 0;