WebAPI/BrowserAPI/KeyboardEvent: Difference between revisions

Jump to navigation Jump to search
Line 334: Line 334:
In patch of https://bugzilla.mozilla.org/show_bug.cgi?id=989198, Gina will keep both mozChromeEvents and new KeyboardEvents dispatching at the same time. But we only need to listen to one of them in Gaia.
In patch of https://bugzilla.mozilla.org/show_bug.cgi?id=989198, Gina will keep both mozChromeEvents and new KeyboardEvents dispatching at the same time. But we only need to listen to one of them in Gaia.


==== Part 1 ====
==== Part 1 - Switch to new keyboard event ====
The state objects in hardware_buttons.js and software_button_manager.js all have dependency on low level input event names listed above.
The state objects in hardware_buttons.js and software_button_manager.js all have dependency on low level input event names listed above.
In this part, we stop listening to 'mozChromeEvent' and start listening to 'mozbrowserbeforekeydown' and mozbrowserbeforekeyup' event, and do a translation in handleEvent of hardware_buttons.js.
In this part, we stop listening to 'mozChromeEvent' and start listening to 'mozbrowserbeforekeydown', 'mozbrowserbeforekeyup', 'keydown', and 'keyup' event, and do a translation in handleEvent of hardware_buttons.js.


Translations are as follows:
Translations are as follows:
[[File:Mozbrowserkeyxxx translate.png|800px|frameless|center]]
[[File:Mozbrowserkeyxxx translate.png|800px|frameless|center]]
In this part, all events need to `preventDefault()`. Because we have not implement customization yet.


==== Part 2 ====
==== Part 2 ====
Confirmed users
23

edits

Navigation menu