views:

133

answers:

1

Is it possible to set the virtual key state / mouse button state for all programs on a computer without triggering the associated events at the same time (like setting the left mouse button to be currently pressed without sending a mouse down event). Could this be achieved by setting up a fake keyboard or mouse driver for a fake keyboard or mouse that when queried as to the current state of a key would reply giving an answer of your choice or by any other means?

Edit: This has to affect programs that I do not have the code for running in other threads ect...

A: 

Well, I don't have a complete answer for you but...

The Win32 function SetKeyboard State() changes the state of the keyboard for the thread that called it.

I know this does not affect the entire system, but if you only need the keyboard state changed for applications you are developing, then this could be called by each program, reading in the array passed to it from a temporary file on the harddrive.

Otherwise... don't know of anything else offhand...

DeadHead
Not the answer I was after but I think it is the best I am going to get at this point.
Ross