How do I send mouse and keyboard events to another process?

Issue

Let’s assume that we’ve got 2 windows processes ,

Process A is the sender, and Process B is the receiver.

Process B is running a classic Win32 API events loop

How do I generate and send mouse and keyboard events from process A to B ?

Solution

Basically via SendMessage or PostMessage. If you want to simulate input events for the whole operating system, then SendInput might be interesting.

Answered By – Michael

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published