Keyboard hooks 
Author Message
 Keyboard hooks

Hello list... (sorry for possible english mistakes)

I programmed a BHO to link our special keyboard
(140 keys) with a DCR training program embedded
in a web page. I send hooked keystrokes to the movie
through director's IDispatch interface. Everything is
working well. (Except one thing you may guess)

Director movies only recognize standard keyboards
strokes... But when an 'A' is pressed.. my object tell
directors : "An 'A' is pressed" and the operating system
tells director that an 'a' is pressed... with special keys
that directors don't undestand this works well. So director
receive 2 messages othewise.

I think it is not recommanded to break the message
chain by not calling CallNextHookEx in the keyboard
proc. So how can I prevent the OS by sending strokes
to the DCR movie ?

It will be helpful to do that also because when the user will
press a special key on our custom keyboard (That it used
to be F1 on a standard keyboard) the exlporer help won't
appear...

Thank you !

Mike



Mon, 25 Apr 2005 23:39:59 GMT  
 Keyboard hooks


Fri, 19 Jun 1992 00:00:00 GMT  
 Keyboard hooks
I have an in-proc dual COM server that connects
to IE (a BHO in other words). I install a keyboard
hook if the page contains a certain DCR (Director
movie). Because we have a special keyboard with 140+
keys and director is unable to detect all keys. The DCR
movie is like a training program with examples on how to
use the keyboard. So I talk directly to the DCR movie
with my object to tell it wich key was pressed with
the IDispatch interface retreived from IHTMLElement.

I don't want the keystrokes to be processed once my app
sended the keys to director... how can I do that ? (Like
breaking the hook chain... can I do that ?)

Mike



Tue, 26 Apr 2005 00:44:54 GMT  
 Keyboard hooks


Fri, 19 Jun 1992 00:00:00 GMT  
 Keyboard hooks
Since I get no feedback I'll make it
as simple as I can.. .

If I install a keyboard
hook on IE .. . Can I intercept keys so that
they won't reach IE ? I want to know that
the F1 key is pressed with my hook but
after that I don't want to IE process this
key....

Is it possible ?



Quote:
> Hello list... (sorry for possible english mistakes)

> I programmed a BHO to link our special keyboard
> (140 keys) with a DCR training program embedded
> in a web page. I send hooked keystrokes to the movie
> through director's IDispatch interface. Everything is
> working well. (Except one thing you may guess)

> Director movies only recognize standard keyboards
> strokes... But when an 'A' is pressed.. my object tell
> directors : "An 'A' is pressed" and the operating system
> tells director that an 'a' is pressed... with special keys
> that directors don't undestand this works well. So director
> receive 2 messages othewise.

> I think it is not recommanded to break the message
> chain by not calling CallNextHookEx in the keyboard
> proc. So how can I prevent the OS by sending strokes
> to the DCR movie ?

> It will be helpful to do that also because when the user will
> press a special key on our custom keyboard (That it used
> to be F1 on a standard keyboard) the exlporer help won't
> appear...

> Thank you !

> Mike



Tue, 26 Apr 2005 02:06:15 GMT  
 Keyboard hooks
Mike, I'm responding only because no one else has answered your question
yet. Having worked with Journal hooks a few years back, I'm pretty sure what
you have suggested can be done.... it's really why keyboard hooks are made
available in the first place.

I'll defer to others who may have more direct experience than me.



Tue, 26 Apr 2005 06:59:03 GMT  
 Keyboard hooks
Mr. Mike and Mr. Brain, forgive me if I am wrong. To my
knowledge, container has to delegate the key-stroke to the
control. In your case, IE (BHO) will handle the key stroke
and will delegate to the respective control. so when we
press the key, the container will process the key and we
cannot stop from that.

Regs
Venkat

Quote:
>-----Original Message-----
>Mike, I'm responding only because no one else has

answered your question
Quote:
>yet. Having worked with Journal hooks a few years back,

I'm pretty sure what
Quote:
>you have suggested can be done.... it's really why

keyboard hooks are made
Quote:
>available in the first place.

>I'll defer to others who may have more direct experience
than me.

>.



Tue, 26 Apr 2005 12:23:48 GMT  
 Keyboard hooks
Thank you both very much for providing
me some feedbacks !

While looking for an answer, I saw on a
dev. site something like :

(The guy use two hooks; a keyboard hook
and a message hook...)

In the message hook he is doing something
like :

[...]
  MSG *msg = (MSG*)lParam;
[...]
  // For now do not display characters for
  // any keys with extended bit set
  if (msg->message == WM_CHAR){
    if(extended)
      msg->message = WM_NULL;
  }
[...]

I think this example delegate the key to the chain
(like M. Venkatachalam said) but sets it to null
before... maybe I'll try it that way.

I'll keep you informed and thanks again for your
replies

Mike


Quote:
> Mr. Mike and Mr. Brain, forgive me if I am wrong. To my
> knowledge, container has to delegate the key-stroke to the
> control. In your case, IE (BHO) will handle the key stroke
> and will delegate to the respective control. so when we
> press the key, the container will process the key and we
> cannot stop from that.

> Regs
> Venkat

> >-----Original Message-----
> >Mike, I'm responding only because no one else has
> answered your question
> >yet. Having worked with Journal hooks a few years back,
> I'm pretty sure what
> >you have suggested can be done.... it's really why
> keyboard hooks are made
> >available in the first place.

> >I'll defer to others who may have more direct experience
> than me.

> >.



Tue, 26 Apr 2005 22:08:43 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Creating system wide keyboard Hooks with c#

2. Keyboard Hook

3. My keyboard hook gets called twice.

4. Need Help On Win32 (Keyboard) Hooks

5. Keyboard hook problem

6. Help with ToAscii function and keyboard hook

7. Interesting behavior of keyboard hook function.

8. keyboard hook question

9. Keyboard Hook

10. PB with modeless app and global DLL keyboard hook

11. Keyboard hook, was:GetProcAddress..

12. Global Keyboard Hook Problem

 

 
Powered by phpBB® Forum Software