Confirmed users
133
edits
Luke-chang (talk | contribs) |
Luke-chang (talk | contribs) |
||
| 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. | ### '''mozInputMethod.inputcontext.addEventListener('keydown', function handler() {});''' | ||
### '''mozInputMethod. | ### '''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 | ||