Search code examples
c#.netcapturekeystrokes

Raw input or global hook to capture keystrokes?


I have an application that captures keystrokes. But i have read a little bit about win7 problems that if the hook dont respond in a couple of seconds, the hook is terminated. And because of that some think Raw input is better. But i really dont know the difference about these 2.

What are the difference between them? Can u capture shift/alt/ctrl presses in raw input?

Thank you!


Solution

  • I had the same problem in the past with global keyboard hooks which were getting unregistered. Adjusting the following value in the registry solved the problem:

    [HKEY_CURRENT_USER\Control Panel\Desktop]
    "LowLevelHooksTimeout"=dword:00002710