WebAPI/BrowserAPI/KeyboardEvent: Difference between revisions

No edit summary
Line 318: Line 318:
Currently, shell.js filters all hardware key event and wraps them in mozChromeEvent and then dispatch to Gaia System app. In Gaia System app, hardware_buttons.js listens for these low-level `mozChromeEvents`, processes them and generates higher-level events to handle autorepeat on the volume key long presses on Home and Sleep, and the Home+Sleep key combination. Other system app modules should listen for the high-level button events generated by this module.
Currently, shell.js filters all hardware key event and wraps them in mozChromeEvent and then dispatch to Gaia System app. In Gaia System app, hardware_buttons.js listens for these low-level `mozChromeEvents`, processes them and generates higher-level events to handle autorepeat on the volume key long presses on Home and Sleep, and the Home+Sleep key combination. Other system app modules should listen for the high-level button events generated by this module.
[[File:Hardware buttons.png|800px|frameless|How hardware buttons handle in B2G currently]]
[[File:Hardware buttons.png|800px|frameless|How hardware buttons handle in B2G currently]]
The low level input events wrapped in mozChromeEvent are:
* home-button-press
* home-button-release
* sleep-button-press
* sleep-button-release
* volume-up-button-press
* volume-up-button-release
* volume-down-button-press
* volume-down-button-release


=== Plan of Change ===
=== Plan of Change ===
Confirmed users
23

edits