WebAPI/InputMethod API with hardware keyboard: Difference between revisions

Line 29: Line 29:
# External API
# External API
## Register/unregister a listener to handle the key events in keyboard app
## Register/unregister a listener to handle the key events in keyboard app
### '''mozInputMethod.inputContext.addEventListener('keydown', function handler() {});'''
### '''mozInputMethod.inputcontext.addEventListener('keydown', function handler() {});'''
### '''mozInputMethod.inputContext.removeEventListener('keydown', handler);'''
### '''mozInputMethod.inputcontext.removeEventListener('keydown', handler);'''
### These events are non-bubbles and cancellable
### The events "keydown" and "keyup" are identical to the one that the input field expects to receive
### The events "keydown" and "keyup" are identical to the one that the input field expects to receive
### No "keypress" since there's no use case
### No "keypress" since there's no use case
Confirmed users
133

edits