Support Ukraine

Controlling Microsoft Flight Simulator 2020 with the SendInput API

If you try to control Microsoft Flight Simulator 2020 with the SendInput API, you may find that the key presses do not register. This is because they must have a non-zero duration. Insert a delay between the key down and the KEYEVENTF_KEYUP event. The same goes for mouse clicks - there must be a delay between MOUSEEVENTF_LEFTDOWN and MOUSEEVENTF_LEFTUP.

For the exact delay, note that a fast typist will do 10 presses per second (an average typist managing about 3-4), and professional gamers can do 10-12 mouse clicks per second (with average gamers capable of 6-7)[a], so delivering the input events with 100 ms delay between them would be approximately pro-level human equivalent.