Search code examples
c#visual-studiosendkeys

Page down SendKeys not working C#


So a piece of my code is:

SendKeys.SendWait("{PGDN}");

This code is sending the number 3 to the program I'm using. The Page Down button, above the arrows on my keyboard is necessary for a program and it has a function... This key has a different function than the Page Down button on the keypad.

Is anyone aware of a way around having SendKeys.SendWait(...) send the Page Down button on the keyboard, rather than the "3" on the numpad?


Solution

  • So my conclusion was quite simple. Using the InputSimulator as TyCobb recommended, I was able to properly simulate virtual key codes, and everything was smooth.