I need to send a key stroke to some application. Now I use SendInput for that but it requires window to be foreground. I am going to use PostMessage/SendMessage for sending keystrokes but I heard there are some problems with them and they are not reliable. I would like to know what is wrong with PostMessage/SendMessage concerning KeyUp/KeyDown events.
A:
Use this library: Windows Input Simulator - no need to reinvent the wheels :)
Giorgi
2010-07-27 11:46:39