I am linux user and would like to use these 'keyboard_event' functions, but the header for these functions is 'windows.h' and linux doesn't have any 'windows.h', so can anyone support some alternative header for these functions, or alternative way to simulate key press for linux ?
#include <iostream>
using namespace std;
int main() {
keybd_event(VK_CONTROL,0x9d,0 , 0); //pressing CTRL
keybd_event(VkKeyScan(‘R’),0x93,0 , 0); //pressing 'R'
keybd_event(VkKeyScan(‘R’),0x93,KEYEVENTF_KEYUP,0); //releasing 'R'
keybd_event(VK_CONTROL,0x9d,KEYEVENTF_KEYUP,0); /* releasing CTRL */
return;
}