I have the following examples in c++, the first works as expected the second does not. I also note that the Windows System keyboard has the same problem. Anybody know why or a work around/better way of doing this?
keybd_event(VK_LWIN,0x5b,0 , 0); /* Windows Key Press */
keybd_event(VkKeyScan('l'), 0, 0, 0); /* L key Press */
keybd_event(VkKeyScan('l'), 0, KEYEVENTF_KEYUP,0); /* L key Release */
keybd_event(VK_LWIN,0x5b,KEYEVENTF_KEYUP,0); /* Windows Key Release */
This one fails:
keybd_event(VK_CONTROL,0x11,0 , 0); /* Control Key Press */
keybd_event(VK_MENU,0xb8, 0, 0); /* Alt Press */
keybd_event(VK_DELETE,0x2e, 0, 0); /* Del Press */
keybd_event(VK_DELETE,0x2e, KEYEVENTF_KEYUP,0); /* Del Release */
keybd_event(VK_MENU,0xb8, KEYEVENTF_KEYUP,0); /* Alt Release */
keybd_event(VK_CONTROL,0x11,KEYEVENTF_KEYUP,0); /* Control Key Release */