Reputation: 1835
I have been googling FOREVER and I cannot figure out how to invoke keyboard events in C#. Can anyone help me please?
I am using an emulator for a game and I need to trigger keyboard events in my code. I am using WPF in Visual Studio
Upvotes: 3
Views: 866
Reputation: 100331
You can use AutoIt3. After the install go to your project references and add:
\Program Files\AutoIt3\AutoItX\AutoItX3.dll
Then you can use its functions. The method to send keyboard keys is Send
AutoItX3Lib.IAutoItX3 a = new AutoItX3Lib.AutoItX3();
a.Send("{NUMPAD1}");
Related
Upvotes: 1