Simulate keyboard input in C#

后端 未结 8 2154
逝去的感伤
逝去的感伤 2020-12-02 12:47

I need to know how to simulate keyboard input for keys W, S, A, D.

I\'ve used SendKeys with no avai

8条回答
  •  一个人的身影
    2020-12-02 13:06

    You can use SendKeys.Send("");
    Example:

    SendKeys.Send("{ENTER}");

    Source: https://docs.microsoft.com/en-us/dotnet/framework/winforms/how-to-simulate-mouse-and-keyboard-events-in-code

提交回复
热议问题