author | lyra.lee <lyra.lee@amlogic.com> | 2011-07-07 18:24:36 (GMT) |
---|---|---|
committer | lyra.lee <lyra.lee@amlogic.com> | 2011-07-07 18:24:36 (GMT) |
commit | c5d479cab820bb9a80ef800c7e020c7955afc5e9 (patch) | |
tree | 98cf4b486dca22cdc3b316d8c76500175b42585f | |
parent | 467dcf5014b11777f031de5d35164fffb967911f (diff) | |
download | RemoteIME-c5d479cab820bb9a80ef800c7e020c7955afc5e9.zip RemoteIME-c5d479cab820bb9a80ef800c7e020c7955afc5e9.tar.gz RemoteIME-c5d479cab820bb9a80ef800c7e020c7955afc5e9.tar.bz2 |
not process ENTER as \n; clear key focus when soft keyboard dismiss
-rwxr-xr-x | src/com/amlogic/inputmethod/remote/EnglishInputProcessor.java | 4 | ||||
-rwxr-xr-x | src/com/amlogic/inputmethod/remote/RemoteIME.java | 11 | ||||
-rwxr-xr-x | src/com/amlogic/inputmethod/remote/SkbContainer.java | 2 |
3 files changed, 9 insertions, 8 deletions
diff --git a/src/com/amlogic/inputmethod/remote/EnglishInputProcessor.java b/src/com/amlogic/inputmethod/remote/EnglishInputProcessor.java index 642fc32..bcb7c36 100755 --- a/src/com/amlogic/inputmethod/remote/EnglishInputProcessor.java +++ b/src/com/amlogic/inputmethod/remote/EnglishInputProcessor.java @@ -63,8 +63,8 @@ public class EnglishInputProcessor { if (realAction) { inputContext.deleteSurroundingText(1, 0); } - } else if (KeyEvent.KEYCODE_ENTER == keyCode) { - insert = "\n"; + /* } else if (KeyEvent.KEYCODE_ENTER == keyCode) { + insert = "\n";*/ } else if (KeyEvent.KEYCODE_SPACE == keyCode) { insert = " "; } else { diff --git a/src/com/amlogic/inputmethod/remote/RemoteIME.java b/src/com/amlogic/inputmethod/remote/RemoteIME.java index b14c8e0..74d8dfd 100755 --- a/src/com/amlogic/inputmethod/remote/RemoteIME.java +++ b/src/com/amlogic/inputmethod/remote/RemoteIME.java @@ -274,7 +274,7 @@ public class RemoteIME extends InputMethodService { return false; } - if (mSkbContainer!=null && mSkbContainer.hasFocus()) { + if (mSkbContainer!=null && mSkbContainer.hasFocus() && isInputViewShown()) { Log.d(TAG, "processKeys: processChooseSoftKeys"); if (processChooseSoftKeys(keyCode, realAction)) return true; @@ -401,6 +401,7 @@ public class RemoteIME extends InputMethodService { // Back key is used to dismiss all popup UI in a soft keyboard. if (keyCode == KeyEvent.KEYCODE_BACK) { if (isInputViewShown()) { + mSkbContainer.clearKeyFocus(); if (mSkbContainer.handleBack(realAction)) return true; } } @@ -459,11 +460,11 @@ public class RemoteIME extends InputMethodService { } return true; } - if (keyCode == KeyEvent.KEYCODE_ENTER) { + /* if (keyCode == KeyEvent.KEYCODE_ENTER) { if (!realAction) return true; sendKeyChar('\n'); return true; - } + }*/ if (keyCode == KeyEvent.KEYCODE_SPACE) { if (!realAction) return true; sendKeyChar(' '); @@ -491,10 +492,10 @@ public class RemoteIME extends InputMethodService { getCurrentInputConnection().deleteSurroundingText(1, 0); } return true; - } else if (keyCode == KeyEvent.KEYCODE_ENTER) { + /* } else if (keyCode == KeyEvent.KEYCODE_ENTER) { if (!realAction) return true; sendKeyChar('\n'); - return true; + return true;*/ } else if (keyCode == KeyEvent.KEYCODE_ALT_LEFT || keyCode == KeyEvent.KEYCODE_ALT_RIGHT || keyCode == KeyEvent.KEYCODE_SHIFT_LEFT diff --git a/src/com/amlogic/inputmethod/remote/SkbContainer.java b/src/com/amlogic/inputmethod/remote/SkbContainer.java index e06b350..b10e7ec 100755 --- a/src/com/amlogic/inputmethod/remote/SkbContainer.java +++ b/src/com/amlogic/inputmethod/remote/SkbContainer.java @@ -404,7 +404,7 @@ public class SkbContainer extends RelativeLayout implements OnTouchListener { public boolean handleBack(boolean realAction) { if (mPopupSkbShow) { if (!realAction) return true; - + dismissPopupSkb(); mDiscardEvent = true; return true; |