Bug 1016179 - [Keyboard] Correct Promise usage and some API changes