Search code examples
c#keypress

Input Simulator Virtual Key Code RETURN acts as spacebar


I am using the InputSimulator package with c# and im trying to simulate the entry of the 'enter' key. When i do this instead of the enter key being pressed the spacebar is.

Alternating the keycodes.



                            .KeyPress(VirtualKeyCode.RETURN)

I expect it to press the enter key however it presses the spacebar.


Solution

  • Update: The program i was trying to submit the keys into was blocking the enter key. My solution of fixing this was to deselect the input and then reselect it and then use the enter key.