Probably because you're not suppose to send the WM_KEYDOWN message, especially if the wParam and lParam parameters are incorrect. It should also be paired with the corresponding WM_KEYUP message. If you really wanted to send a keystroke, then why not use SendKeys or the APIs keybd_event or SendInput?