So I have a keyboard hook that I have implemeted into my c# app. I need to
Quote:
not allow any hotkey actions to be performed when my app is opened. I can
capture the key events and handle them if I want to. The only problem is
that I have fields that require input. Do I have to programmatically add the
characters to the input fields when I am handling the event. I don't want
these keys sent to the system. But only to my program.
So what you're saying is:
1. You've managed to trap all keyboard activity so that when I press a
hotkey (like the "Play button"), Windows does not act on it...
2. When you trap the keypresses this way, the keyboard doesn't work at all,
and so you can't use your program normally.
I'm actually working on a similar issue. I'm writing a media player app that
has to trap the Play/Pause button, the FF buton, and the Rew button, among
other things. What I actually did was grab the Windows message handler and
manually handle the keypresses I'm looking for. The ones I don't care about,
I'm going ahead and passing.
I don't have the source code here right now, but I can send it to you. Drop
me an e-mail at wilsontp <atgmail <dotcom. I'll send you the function I
use to trap the media keys.