@@ -1892,6 +1892,13 @@ boolean doMovementKey(int keyCode, KeyEvent event, int count) {
18921892 * {@link KeyEvent#FLAG_KEEP_TOUCH_MODE KeyEvent.FLAG_KEEP_TOUCH_MODE}, so
18931893 * that they don't impact the current touch mode of the UI.
18941894 *
1895+ * <p>Note that it's discouraged to send such key events in normal operation;
1896+ * this is mainly for use with {@link android.text.InputType#TYPE_NULL} type
1897+ * text fields, or for non-rich input methods. A reasonably capable software
1898+ * input method should use the
1899+ * {@link android.view.inputmethod.InputConnection#commitText} family of methods
1900+ * to send text to an application, rather than sending key events.</p>
1901+ *
18951902 * @param keyEventCode The raw key code to send, as defined by
18961903 * {@link KeyEvent}.
18971904 */
@@ -1949,7 +1956,11 @@ public boolean sendDefaultEditorAction(boolean fromEnterKey) {
19491956 * {@link InputConnection#commitText InputConnection.commitText()} with
19501957 * the character; some, however, may be handled different. In particular,
19511958 * the enter character ('\n') will either be delivered as an action code
1952- * or a raw key event, as appropriate.
1959+ * or a raw key event, as appropriate. Consider this as a convenience
1960+ * method for IMEs that do not have a full implementation of actions; a
1961+ * fully complying IME will decide of the right action for each event and
1962+ * will likely never call this method except maybe to handle events coming
1963+ * from an actual hardware keyboard.
19531964 *
19541965 * @param charCode The UTF-16 character code to send.
19551966 */
0 commit comments