How can I use Windows API in C# to register a call back function to be called whenever key is pressed?
Asked
Active
Viewed 318 times
0
-
2WinForms, WebForms, MVC, WPF, Console or global hook? – Richard Jul 06 '10 at 09:04
-
More information please. e.g. do you want a global hook? – Dennis Jul 06 '10 at 09:07
1 Answers
3
A simple google search brings up this promising solution:
Processing Global Mouse and Keyboard Hooks in C#
and even a search here on StackOverflow brings you (beside many others) to: Global keyboard capture in C# application which leads to Low-Level Keyboard Hook in C#.
So where was the big problem in searching this on yourself?
Glorfindel
- 21,988
- 13
- 81
- 109
Oliver
- 43,366
- 8
- 94
- 151
-
Unfortunately, I have noticed that some users think it is easier to ask then find out for themselves. It is does not take much to do a Google search. I try to avoid answering some StackOverflow questions where the poster hasn't provided sufficient information (i.e., what have they tried to do). – Dennis Jul 06 '10 at 14:24