-
May 24th, 2010, 03:50 AM
#1
Low level Keyboard hook and keyboard synthesizes
Hi gurus,
my problem is related to keyboard event synthesis on an application which uses low level keyboard hooking.
application A uses LL hook to capture the function keys and posts messages to some windows when 'LLKHF_UP' is detected. It works fine when we press the function keys on keyboard.
our application B ( is a kind of remote control app ) synthesizes the keyboard events using keybd_event function ( A and B runs in same machine )
It seems that when using keybd_event, the hooked application never gets LLKHF_UP flag, instead it gets 'LLKHF_INJECTED' ( it is logical ). but why didn't it get the up event? [ up flag is set on the keybd_event fn ]
I tried it with the windows virtual keyboard, which also displays the same behavior.
Now is there ANY way to simulate the up flag in app A ?
Please put some thoughts
Thanks
-
May 26th, 2010, 01:44 AM
#2
Re: Low level Keyboard hook and keyboard synthesizes
-
May 26th, 2010, 07:15 AM
#3
Re: Low level Keyboard hook and keyboard synthesizes
you need to generate the upkey events yourself via the keybd_event call.
if you only generate down keys, you're only going to see injected down keys as well.
See the dwFlags member in keybd_event() (http://msdn.microsoft.com/en-us/library/aa928103.aspx)
-
May 26th, 2010, 10:24 PM
#4
Re: Low level Keyboard hook and keyboard synthesizes
Thanks for the reply
The up key event is generated, but is not captured by the hooked app. only down event is captured.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|