Send keys through SendInput in user32.dll

You aren’t setting the flags and scan fields, depending on the keystrokes desired, you will need to set these correctly to get the OS to recognize the keys correctly.

You might consider using the Input Simulator library, since it already does what you want and you don’t have to recreate the wheel. Just make sure to look through the forums as there are some good patches in there that need to be set, since the author abandoned the project in 2009. It’s a good library nonetheless.

Leave a Comment