Hi,
I'm embedding Moz into a Qt application on Windows, and I'm having trouble setting up key accelerators. When a control belonging to my application has the focus, all my accelerators work. (I have Ctrl+N for 'New...' etc...) - However, when my Moz window has the focus I don't get any key events to any of my application windows. They are all eaten before they get there.
Is there any way to change this behaviour so that my application's window will recieve key events when Mozilla has the focus, or do I need to implement all of my accelerators inside mozilla as well as in my application?
You need to add event listeners to the Mozilla window. Bug 259127 has some information about how wxWindows was doing it (and doing it badly using non-frozen interfaces). Basically, you need to get the "window" object from your mozilla embedding widget, QI it to nsIDOMEventTarget and call AddEventListener for keypress events, and perhaps other events. Please make sure that you behave nicely when web content tries to override your shortcuts keys. You can either capture the event early to prevent web content from overriding, or check the defaultPrevented property if you get the event during the normal bubbling phase.
--BDS _______________________________________________ mozilla-embedding mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-embedding
