Hello everyone, my question is how to send some key's to any application from application that is running in background? Let's say that I made shortcut to LEFT ARROW key which is ALT+S, and than I want whenever I'm in any application and when I press ALT+S that background application response that shortcut and send to currently opened program LEFT ARROW key. Here is a code that I made in Embarcadero c++ 2010 to simulate arrow left when pressing alt+s every 200 milisecond's:
void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
bool bBothPressed = GetAsyncKeyState(VK_MENU) && GetAsyncKeyState(0x53);
if(bBothPressed){
// ShowMessage("control!");
keybd_event(VK_LEFT, 0, 0, 0);
}
}
... and this work fine for my application, but what I want to know is how to include that code for global scope (any application), not just for this application.