Simulating the keyboard and mouse?
I am programming in C++ DirectX 8.0 and I was woundering if there is a way to simulate keys and mouse movement and mouse clicking. I am wanting to be able to control my second computer without getting up and going over to the other computer. I know KEYDOWN shows that a key is down, but is there a way to tell the key to be pressed. I couldn't find much about this in msdn, but I wasn't sure what to look for. Thanks for any help.
i believe you will need to do more than send keydown message to the other computer.
first, you will need to write a simple network code(UDP will be the trick) to be able to send something over, then a program to receive on the other end. and finally the program will send the various keydown messages or mouse event to "second" computer
hope that this help
first, you will need to write a simple network code(UDP will be the trick) to be able to send something over, then a program to receive on the other end. and finally the program will send the various keydown messages or mouse event to "second" computer
hope that this help
I have already made the host and client, I just need to know how to simulate a keydown message, mouse click, and mouse position. Maybe I shouldn't have used the word just...
Also, I don't want to use someone eleses program. Hints I would like to know how to simulate keyboard, mouse, and mouse position commands. Thanks for the info though.
Under windows look up the functions keybd_event and mouse_event
Edit: Oops just saw that they suspended them under Win2000/WinNT/WinXP, use SendInput instead.
Edit: Oops just saw that they suspended them under Win2000/WinNT/WinXP, use SendInput instead.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement