Bug 989198 - Part 1(v2): Define dictionary 'BeforeKeyEventDetail' and 'KeyEventDetail'.
Bug 989198 - Part 2: Implement HandleKeyEvent.
Bug 989198 - Part 3: Invoke HandleKeyEvent.
Bug 989198 - Part 4: Adapt shell.js to new events.