Hi folks,

Story: 
we had caught hardware key events in shell.js and prevent it to be sent to user 
app(mozbrowser iframe) but only send alternative mozChromeEvent to system app 
only.[1]

But we'd like the user app is able to catch the events! [2]

This is an old issue from long time ago,
and yesterday I tried to make a quick workaround patch to broadcast those 
events via system message (and tells systems app do not launch the app acquires 
hardware button events), but @:fabrice thinks this is a hack ;)

So if we're going to use DOM3 KeyboardEvents [3], we have some problems needs 
to resolve:
* Gonk is mapping volumeup key/volumedown key to pageup/pagedown now.
  With this we couldn't tell user app to use |evt.key = 
KeyboardEvent.DOM_VK_PAGE_UP| instead of DOM_VK_VOLUME_UP.
@:mwu, any idea about this? This issue shall fall under gonk if I'm not wrong.

* What if the user app do |preventDefault()| ?
  Shall we allow this usage for volumeup/volumedown, even for home and sleep 
button?
  Could we 'prevent' the preventDefault() call in this case?
@:smaug, could you please offer some opinion?

* Gecko has a whitelist of events could pass the mozbrowser iframe. [3] But now 
if there's a non-mozbrowser iframe falls under a mozbrowser iframe, the events 
couldn't pass to the parent frame. This needs some fix.

Any help is appreciated, thanks!!
--
[1] See https://bugzilla.mozilla.org/show_bug.cgi?id=762362.
[2] See https://bugzilla.mozilla.org/show_bug.cgi?id=820706.
[3] See https://bugzilla.mozilla.org/show_bug.cgi?id=842927.
[4] See https://bugzilla.mozilla.org/show_bug.cgi?id=757486. 
--
Alive C. Kuo, Front-end Engineer, FirefoxOS, MoCo. Taiwan, Taipei office.
al...@mozilla.com




_______________________________________________
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to