0

I'm trying to send a key stroke to Windows operating system in a C# console application. I have found this post that sends a keystroke to a an application like notepad.

How can I send the key stroke to the main windows process ?

Rick
  • 55
  • 1
  • 12
  • 1
    _the main windows process_ meaning what?? – TaW Oct 28 '19 at 14:31
  • Possible duplicate of [C# using Sendkey function to send a key to another application](https://stackoverflow.com/questions/15292175/c-sharp-using-sendkey-function-to-send-a-key-to-another-application) – Franck Oct 28 '19 at 14:32
  • @TaW I meant the Operating System Process that handles input/output – Rick Oct 28 '19 at 14:40
  • @Franck I refereed to this link in my question. – Rick Oct 28 '19 at 14:41
  • 1
    _the Operating System Process_ which would be what?? You can only send keys to an application that actually takes focus, ie has a UI. – TaW Oct 28 '19 at 14:57
  • Possible duplicate of [Simulate keyboard input in C#](https://stackoverflow.com/questions/20482338/simulate-keyboard-input-in-c-sharp) –  Oct 28 '19 at 15:14
  • "the Operating System Process that handles input/output". That would be the kernel. It's easy to send keys to the kernel. Plug a keyboard in and press the keys. – Sam Axe Oct 28 '19 at 16:58

0 Answers0