Comment 444 for bug 263435

Revision history for this message
In , S-mocking (s-mocking) wrote :

(In reply to comment #431)
> (In reply to comment #429)
> > Is there any reason the browser can't display an alert or menu bar informing
> > the user that a plugin would like to commandeer some key bindings (and which
> > ones preferably), and let the user decide whether to do that (the default being
> > to deny)?
>
> Yes there is, if you have an average of 10 flash ads on a page, it would spam
> you to death with those alerts for each and every page you visit.

Agree.

> (In reply to comment #426)
> > This way we wouldn't have to agree on exact list of reserved keys:
>
> We do not have to agree at all -- browser itself already has a list of reserved
> keys, and browser addins should also be able to register additional reserved
> keys.
>
> The idea with plugin deciding what keys to handle is retarded. It should be
> exactly the opposite -- plugin is a GUEST, browser is a HOST. You do not let
> guests to do whatever they want in your house.

It's going to break most apps if we filter *all* keys which can be handled by the browser and don't pass them to the plugin, since this includes page up/dn, Esc (think closing a fullscreen flash video), the arrow keys, etc. Taking a look at http://support.mozilla.com/en-US/kb/keyboard%20shortcuts we have a couple of categories:

* Navigation applies to the current tab
* Current Page, Editing and Search apply to the current page
* Windows & Tabs applies to the whole browser or the current window
* Tools are for accessing certain cross-window/tab browser functionality
* Miscellaneous' scope varies

What I would like is that at least the Windows&Tabs and Tools keys are filtered since those are used to do stuff that is completely out of the scope of the plugin or the page it is displayed on. Perhaps it would be wise to not filter the function keys. The rest can be handled by NPAPI:AdvancedKeyhandling.