newbie: Can I intercept specific keystrokes?

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

Guest

Is there a way to trigger an event when an individual key is pressed, as well
as with key combinations and function keys? I want to trigger an event when
the SHIFT key is pressed. I also want this to happen whether the form has or
doesn't have the focus.
 
Carol said:
Is there a way to trigger an event when an individual key
is pressed, as well as with key combinations and function
keys? I want to trigger an event when the SHIFT key is
pressed. I also want this to happen whether the form has or
doesn't have the focus

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