On Wednesday, October 16, 2013 5:17:13 AM UTC+2, [email protected] wrote:
> Hi,
> 
> 
> 
> We are developing a mechanism to send event from nsAppShell to JS. (The event 
> is hardware keyboard plug in and plug out).
> 
> 
> 
> We follow this way: nsAppShell notifys event to hal/Hal.cpp, then Hal will 
> notify event to HardwareKeyboardManager. We added HardwareKeyboardManager to 
> dom folder with following files:
> 
> gecko/dom/hardwarekeyboard/HardwareKeyboardManager.h
> 
> gecko/dom/hardwarekeyboard/HardwareKeyboardManager.cpp
> 
> gecko/dom/hardwarekeyboard/Types.h
> 
> gecko/dom/hardwarekeyboard/nsIDOMHardwareKeyboardManager.idl
> 
> gecko/dom/hardwarekeyboard/nsINavigatorHardwareKeyboardManager.idl
> 
> 
> 
> By this, we added new object(hardwareKeyboardManager) to navigator.
> 
> 
> 
> At the end, we can use navigator.hardwareKeyboardManager on JavaScript to get 
> current state of hardware keyboard. At HardwareKeyboardManager, we also 
> received the event from Hal.cpp through observer.
> 
> 
> 
> However, we always got crash when we DispatchTrustedEvent in 
> HardwareKeyboardManager.cpp, (on JS we added listener 
> navigator.hardwareKeyboardManager.addEventListener(...);
> 
> 
> 
> I need your help here. What is the cause of this crash and how to solve it?
> 
> 
> 
> Many thanks.
> 
> Tung.

Could you guys chip in the discussion here: 
https://wiki.mozilla.org/User:Timdream/InputMethod_API_with_hardware_keyboard 
so we don't do the same work twice :-)
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to