Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

passing keys from NPAPI plug-in to Firefox window

27 views
Skip to first unread message

jaitirth shirole

unread,
Jan 24, 2012, 6:45:52 AM1/24/12
to
In our NPAPI plug-in, we get some keystrokes when in focus, but
certain browser specific key strokes e.g. Ctrl+T, Ctrl+B (and others),
we want to pass on to the browser window.
Posting the key messages to top level browser window doesn't seem to
help :(
I came across this mozilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=78414,
which is open since 2001 and no resolution as of now!
Does anybody know a workaround/solution for this?
I read somewhere that even in Javascript code, custom keyevents can't
be generated which browser can execute for us....

Benjamin Smedberg

unread,
Jan 24, 2012, 9:33:35 AM1/24/12
to jaitirth shirole, dev-tech...@lists.mozilla.org
On 1/24/12 6:45 AM, jaitirth shirole wrote:
> In our NPAPI plug-in, we get some keystrokes when in focus, but
> certain browser specific key strokes e.g. Ctrl+T, Ctrl+B (and others),
> we want to pass on to the browser window.
> Posting the key messages to top level browser window doesn't seem to
> help :(
Is this a windowed or windowless plugin?

Windowless plugin mode is preferred in all cases, and I strongly suggest
that you switch to windowless mode if possible.

In windowless mode, you think you should simply return false from
NPP_HandleEvent for the key events which you are not relevant to your
plugin... I recommend doing this for all Ctrl-Key events which you
aren't specifically trying to use.

--BDS

jaitirth shirole

unread,
Jan 24, 2012, 9:45:38 AM1/24/12
to
Hi Ben,
This is a windowed plug-in!

Thanks,
Jai.
0 new messages