gyurisc
gyurisc

Reputation: 11522

How can I generate system wide events on Windows?

I would like to know how I can generate system wide events programatically on Windows. I am thinking of generating system wide events such as key presses, touch events and mouse clicks mainly.

Is it possible to generate these events with an user mode application or I need to write drivers for this? Any samples or links would be usefull.

Upvotes: 0

Views: 599

Answers (2)

Hans Passant
Hans Passant

Reputation: 942518

Use SendInput().

Upvotes: 2

steinar
steinar

Reputation: 9673

(What programming language are you using?) It's possible in regular applications. What you need are "hooks" which are supported by the Win32 API. Here is an article on hooking in C#. Some are using the EasyHook library.

EDIT:

Here is the help on this topic in the Win32 API itself.

Upvotes: 1

Related Questions