keybd_event(VK_LWIN, MapVirtualKey(VK_LWIN, 0), 0, 0); // WIN key down
keybd_event(byte('R'), MapVirtualKey(byte('R'), 0), 0, 0); // R key down
keybd_event(byte('R'), MapVirtualKey(byte('R'), 0), KEYEVENTF_KEYUP, 0); // R key up
keybd_event(VK_LWIN, MapVirtualKey(VK_LWIN,0), KEYEVENTF_KEYUP, 0); //WINkey up