Trapping keypresses outside of application

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

I have written a small application that runs from the system tray. I need
to be able to identify when a user has pressed certain key combinations in
any aplication and then respond to them in my app. I have looked into system
wide hooking but it seems very complicated and I have read that this can only
be done using a C# dll. Can anyone help with this or at least point me in
the right direction ?

Thanks,
Matt.
 
Hi,
You might want to look at this one:
http://www.codeproject.com/csharp/GlobalSystemHook.asp

Hi all,

I have written a small application that runs from the system tray. I need
to be able to identify when a user has pressed certain key combinations in
any aplication and then respond to them in my app. I have looked into
system
wide hooking but it seems very complicated and I have read that this can
only
be done using a C# dll. Can anyone help with this or at least point me in
the right direction ?

Thanks,
Matt.
 
* "=?Utf-8?B?TWF0dA==?= said:
I have written a small application that runs from the system tray. I need
to be able to identify when a user has pressed certain key combinations in
any aplication and then respond to them in my app.

You'll need a keyboard hook to capture these keystrokes system-wide:

Article on keyboard hooks:

<URL:http://www.developer.com/net/net/article.php/11087_2193301_1/>

Documentation on hooks:

<URL:http://msdn.microsoft.com/library/en-us/dnwui/html/msdn_hooks32.asp>
<URL:http://msdn.microsoft.com/library/en-us/winui/winui/windowsuserinterface/windowing/hooks.asp>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top