diff --git a/java/res/drawable-hdpi/btn_keyboard_key_light_popup_normal.9.png b/java/res/drawable-hdpi/btn_keyboard_key_light_popup_normal.9.png index 959c6d14a..66f83ebd3 100644 Binary files a/java/res/drawable-hdpi/btn_keyboard_key_light_popup_normal.9.png and b/java/res/drawable-hdpi/btn_keyboard_key_light_popup_normal.9.png differ diff --git a/java/res/drawable-hdpi/btn_keyboard_key_light_pressed.9.png b/java/res/drawable-hdpi/btn_keyboard_key_light_pressed.9.png index 597eb15b2..46c40a4cb 100644 Binary files a/java/res/drawable-hdpi/btn_keyboard_key_light_pressed.9.png and b/java/res/drawable-hdpi/btn_keyboard_key_light_pressed.9.png differ diff --git a/java/res/drawable-hdpi/cancel.png b/java/res/drawable-hdpi/cancel.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/candidate_feedback_background.9.png b/java/res/drawable-hdpi/candidate_feedback_background.9.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/caution.png b/java/res/drawable-hdpi/caution.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/dialog_bubble_step02.9.png b/java/res/drawable-hdpi/dialog_bubble_step02.9.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/dialog_bubble_step07.9.png b/java/res/drawable-hdpi/dialog_bubble_step07.9.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/ic_dialog_keyboard.png b/java/res/drawable-hdpi/ic_dialog_keyboard.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/ic_subtype_keyboard.png b/java/res/drawable-hdpi/ic_subtype_keyboard.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/keyboard_background.9.png b/java/res/drawable-hdpi/keyboard_background.9.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/keyboard_dark_background.9.png b/java/res/drawable-hdpi/keyboard_dark_background.9.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/keyboard_key_feedback_background.9.png b/java/res/drawable-hdpi/keyboard_key_feedback_background.9.png index 92b478854..dd0ce95c7 100644 Binary files a/java/res/drawable-hdpi/keyboard_key_feedback_background.9.png and b/java/res/drawable-hdpi/keyboard_key_feedback_background.9.png differ diff --git a/java/res/drawable-hdpi/keyboard_key_feedback_more_background.9.png b/java/res/drawable-hdpi/keyboard_key_feedback_more_background.9.png index cfeeefb22..e14f25c1a 100644 Binary files a/java/res/drawable-hdpi/keyboard_key_feedback_more_background.9.png and b/java/res/drawable-hdpi/keyboard_key_feedback_more_background.9.png differ diff --git a/java/res/drawable-hdpi/keyboard_suggest_strip.9.png b/java/res/drawable-hdpi/keyboard_suggest_strip.9.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/mic_slash.png b/java/res/drawable-hdpi/mic_slash.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/ok_cancel.png b/java/res/drawable-hdpi/ok_cancel.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/speak_now_level0.png b/java/res/drawable-hdpi/speak_now_level0.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/speak_now_level1.png b/java/res/drawable-hdpi/speak_now_level1.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/speak_now_level2.png b/java/res/drawable-hdpi/speak_now_level2.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/speak_now_level3.png b/java/res/drawable-hdpi/speak_now_level3.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/speak_now_level4.png b/java/res/drawable-hdpi/speak_now_level4.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/speak_now_level5.png b/java/res/drawable-hdpi/speak_now_level5.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/speak_now_level6.png b/java/res/drawable-hdpi/speak_now_level6.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/sym_keyboard_done.png b/java/res/drawable-hdpi/sym_keyboard_done.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/sym_keyboard_feedback_done.png b/java/res/drawable-hdpi/sym_keyboard_feedback_done.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/sym_keyboard_feedback_mic.png b/java/res/drawable-hdpi/sym_keyboard_feedback_mic.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/sym_keyboard_feedback_search.png b/java/res/drawable-hdpi/sym_keyboard_feedback_search.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/sym_keyboard_feedback_settings.png b/java/res/drawable-hdpi/sym_keyboard_feedback_settings.png old mode 100755 new mode 100644 index 7dee8984f..b72ec7bc0 Binary files a/java/res/drawable-hdpi/sym_keyboard_feedback_settings.png and b/java/res/drawable-hdpi/sym_keyboard_feedback_settings.png differ diff --git a/java/res/drawable-hdpi/sym_keyboard_feedback_shift.png b/java/res/drawable-hdpi/sym_keyboard_feedback_shift.png old mode 100755 new mode 100644 index 4484d0306..5f319f5c6 Binary files a/java/res/drawable-hdpi/sym_keyboard_feedback_shift.png and b/java/res/drawable-hdpi/sym_keyboard_feedback_shift.png differ diff --git a/java/res/drawable-hdpi/sym_keyboard_feedback_shift_locked.png b/java/res/drawable-hdpi/sym_keyboard_feedback_shift_locked.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/sym_keyboard_feedback_space.png b/java/res/drawable-hdpi/sym_keyboard_feedback_space.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/sym_keyboard_feedback_tab.png b/java/res/drawable-hdpi/sym_keyboard_feedback_tab.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/sym_keyboard_mic.png b/java/res/drawable-hdpi/sym_keyboard_mic.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/sym_keyboard_num0.png b/java/res/drawable-hdpi/sym_keyboard_num0.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/sym_keyboard_num1.png b/java/res/drawable-hdpi/sym_keyboard_num1.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/sym_keyboard_num2.png b/java/res/drawable-hdpi/sym_keyboard_num2.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/sym_keyboard_num3.png b/java/res/drawable-hdpi/sym_keyboard_num3.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/sym_keyboard_num4.png b/java/res/drawable-hdpi/sym_keyboard_num4.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/sym_keyboard_num5.png b/java/res/drawable-hdpi/sym_keyboard_num5.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/sym_keyboard_num6.png b/java/res/drawable-hdpi/sym_keyboard_num6.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/sym_keyboard_num7.png b/java/res/drawable-hdpi/sym_keyboard_num7.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/sym_keyboard_num8.png b/java/res/drawable-hdpi/sym_keyboard_num8.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/sym_keyboard_num9.png b/java/res/drawable-hdpi/sym_keyboard_num9.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/sym_keyboard_numalt.png b/java/res/drawable-hdpi/sym_keyboard_numalt.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/sym_keyboard_numpound.png b/java/res/drawable-hdpi/sym_keyboard_numpound.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/sym_keyboard_numstar.png b/java/res/drawable-hdpi/sym_keyboard_numstar.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/sym_keyboard_return.png b/java/res/drawable-hdpi/sym_keyboard_return.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/sym_keyboard_search.png b/java/res/drawable-hdpi/sym_keyboard_search.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/sym_keyboard_settings.png b/java/res/drawable-hdpi/sym_keyboard_settings.png old mode 100755 new mode 100644 index d57f7a43a..35d1ed6e6 Binary files a/java/res/drawable-hdpi/sym_keyboard_settings.png and b/java/res/drawable-hdpi/sym_keyboard_settings.png differ diff --git a/java/res/drawable-hdpi/sym_keyboard_shift.png b/java/res/drawable-hdpi/sym_keyboard_shift.png old mode 100755 new mode 100644 index 1a64dcce6..f433dca74 Binary files a/java/res/drawable-hdpi/sym_keyboard_shift.png and b/java/res/drawable-hdpi/sym_keyboard_shift.png differ diff --git a/java/res/drawable-hdpi/sym_keyboard_shift_locked.png b/java/res/drawable-hdpi/sym_keyboard_shift_locked.png old mode 100755 new mode 100644 index 807e97751..6cb5372bb Binary files a/java/res/drawable-hdpi/sym_keyboard_shift_locked.png and b/java/res/drawable-hdpi/sym_keyboard_shift_locked.png differ diff --git a/java/res/drawable-hdpi/sym_keyboard_space.png b/java/res/drawable-hdpi/sym_keyboard_space.png old mode 100755 new mode 100644 diff --git a/java/res/drawable-hdpi/sym_keyboard_space_led.9.png b/java/res/drawable-hdpi/sym_keyboard_space_led.9.png index af5c7d80f..2c6f4a925 100644 Binary files a/java/res/drawable-hdpi/sym_keyboard_space_led.9.png and b/java/res/drawable-hdpi/sym_keyboard_space_led.9.png differ diff --git a/java/res/drawable-hdpi/sym_keyboard_tab.png b/java/res/drawable-hdpi/sym_keyboard_tab.png old mode 100755 new mode 100644 diff --git a/java/res/values-cs/strings.xml b/java/res/values-cs/strings.xml index 877c2019a..e0fbc9b92 100644 --- a/java/res/values-cs/strings.xml +++ b/java/res/values-cs/strings.xml @@ -127,7 +127,6 @@ ".org" ".net" ".eu" - "Metoda zadávání dat" "Vstupní jazyky" "Jazyk můžete změnit posunutím prstu po mezerníku." "← Uložte slovo opětovným klepnutím" diff --git a/java/res/values-da/strings.xml b/java/res/values-da/strings.xml index 78941429c..0b0aff254 100644 --- a/java/res/values-da/strings.xml +++ b/java/res/values-da/strings.xml @@ -127,7 +127,6 @@ ".org" ".gov" ".edu" - "Inputmetode" "Inputsprog" "Træk fingeren på mellemrumstasten for at skifte sprog" "← Tast igen for at gemme" diff --git a/java/res/values-de/strings.xml b/java/res/values-de/strings.xml index dc3151df9..b0ae766f1 100644 --- a/java/res/values-de/strings.xml +++ b/java/res/values-de/strings.xml @@ -127,7 +127,6 @@ ".org" ".gov" ".edu" - "Eingabemethode" "Eingabesprachen" "Finger über die Leertaste bewegen, um die Eingabesprache zu wechseln" "← Zum Speichern erneut tippen" diff --git a/java/res/values-el/strings.xml b/java/res/values-el/strings.xml index de579586b..09a98f413 100644 --- a/java/res/values-el/strings.xml +++ b/java/res/values-el/strings.xml @@ -127,7 +127,6 @@ ".org" ".gov" ".edu" - "Μέθοδος εισόδου" "Γλώσσες εισόδου" "Σύρετε το δάχτυλο στο πλήκτρο διαστήματος για να αλλάξετε γλώσσα" "← Πατήστε ξανά για αποθήκευση" diff --git a/java/res/values-es-rUS/strings.xml b/java/res/values-es-rUS/strings.xml index 448feb7cd..effd5b9c2 100644 --- a/java/res/values-es-rUS/strings.xml +++ b/java/res/values-es-rUS/strings.xml @@ -127,7 +127,6 @@ ".org" ".gov" ".edu" - "Método de entrada" "Idiomas de entrada" "Deslizarse manualmente por la barra espaciadora para cambiar el idioma" "← Presionar nuevamente para guardar" diff --git a/java/res/values-es/strings.xml b/java/res/values-es/strings.xml index 09114757a..bc98bce92 100644 --- a/java/res/values-es/strings.xml +++ b/java/res/values-es/strings.xml @@ -127,7 +127,6 @@ ".org" ".gov" ".edu" - "Método de introducción de texto" "Idiomas" "Deslizar el dedo por la barra espaciadora para cambiar el idioma" "← Volver a tocar para guardar" diff --git a/java/res/values-fr/strings.xml b/java/res/values-fr/strings.xml index d2c7df852..a9f03e56e 100644 --- a/java/res/values-fr/strings.xml +++ b/java/res/values-fr/strings.xml @@ -127,7 +127,6 @@ ".org" ".gouv" ".edu" - "Mode de saisie" "Langues de saisie" "Faites glisser votre doigt sur la barre d\'espacement pour changer la langue." "← Appuyer de nouveau pour enregistrer" diff --git a/java/res/values-it/strings.xml b/java/res/values-it/strings.xml index 8acd65aed..2063488be 100644 --- a/java/res/values-it/strings.xml +++ b/java/res/values-it/strings.xml @@ -127,7 +127,6 @@ ".org" ".gov" ".edu" - "Metodo inserimento" "Lingue comandi" "Scorri il dito sulla barra spaziatrice per cambiare la lingua" "← Tocca di nuovo per salvare" diff --git a/java/res/values-ja/strings.xml b/java/res/values-ja/strings.xml index e3dbe23cb..e7d3bda7a 100644 --- a/java/res/values-ja/strings.xml +++ b/java/res/values-ja/strings.xml @@ -127,7 +127,6 @@ ".org" ".gov" ".edu" - "入力方法" "入力言語" "スペースバーで指をスライドさせて言語を変更する" "←保存するにはもう一度タップ" diff --git a/java/res/values-ko/strings.xml b/java/res/values-ko/strings.xml index 610f165dc..cf8d285e3 100644 --- a/java/res/values-ko/strings.xml +++ b/java/res/values-ko/strings.xml @@ -127,7 +127,6 @@ ".org" ".gov" ".edu" - "입력 방법" "입력 언어" "손가락을 스페이스바에서 미끄러지듯 움직여 언어 변경" "← 저장하려면 다시 누르세요." diff --git a/java/res/values-nb/strings.xml b/java/res/values-nb/strings.xml index 786ae242c..7d49c669c 100644 --- a/java/res/values-nb/strings.xml +++ b/java/res/values-nb/strings.xml @@ -127,7 +127,6 @@ ".net" ".org" ".info" - "Inndatametode" "Inndataspråk" "Dra fingeren på mellomromstasten for å endre språk" "← Trykk på nytt for å lagre" diff --git a/java/res/values-nl/strings.xml b/java/res/values-nl/strings.xml index ba8840201..d1cfd53ab 100644 --- a/java/res/values-nl/strings.xml +++ b/java/res/values-nl/strings.xml @@ -127,7 +127,6 @@ ".org" ".gov" ".edu" - "Invoermethode" "Invoertalen" "Schuif uw vinger over de spatiebalk om de taal te wijzigen" "← Tik nogmaals om op te slaan" diff --git a/java/res/values-pl/strings.xml b/java/res/values-pl/strings.xml index d4f31f737..cfdfcc69d 100644 --- a/java/res/values-pl/strings.xml +++ b/java/res/values-pl/strings.xml @@ -127,7 +127,6 @@ ".org" ".gov" ".edu" - "Metoda wprowadzania" "Języki wprowadzania" "Przesuń palcem po spacji, aby zmienić język" "← Dotknij ponownie, aby zapisać" diff --git a/java/res/values-pt-rPT/strings.xml b/java/res/values-pt-rPT/strings.xml index 8d27de9eb..f79ae8f41 100644 --- a/java/res/values-pt-rPT/strings.xml +++ b/java/res/values-pt-rPT/strings.xml @@ -127,7 +127,6 @@ ".org" ".gov" ".edu" - "Método de entrada" "Idiomas de entrada" "Deslize o dedo pela barra de espaço para alterar o idioma" "← Toque novamente para guardar" diff --git a/java/res/values-pt/strings.xml b/java/res/values-pt/strings.xml index 5a348ce31..5492da60c 100644 --- a/java/res/values-pt/strings.xml +++ b/java/res/values-pt/strings.xml @@ -127,7 +127,6 @@ ".org" ".gov" ".edu" - "Método de entrada" "Idiomas de entrada" "Deslize o dedo na barra de espaços para alterar o idioma" "← Toque novamente para salvar" diff --git a/java/res/values-rm/strings.xml b/java/res/values-rm/strings.xml index f30b41fa2..a93cd1f65 100644 --- a/java/res/values-rm/strings.xml +++ b/java/res/values-rm/strings.xml @@ -129,7 +129,6 @@ ".org" ".gov" ".edu" - "Metoda d\'endataziun" "Linguas da cumonds vocals" "Stritgar cun il det sur la tasta da vid per midar la lingua" "← Tippar danovamain per memorisar" diff --git a/java/res/values-ru/strings.xml b/java/res/values-ru/strings.xml index 99c576eb8..91d9edf17 100644 --- a/java/res/values-ru/strings.xml +++ b/java/res/values-ru/strings.xml @@ -127,7 +127,6 @@ ".org" ".gov" ".edu" - "Способ ввода" "Языки ввода" "Для изменения языка проведите пальцем по пробелу" "← Нажмите повторно, чтобы сохранить" diff --git a/java/res/values-sr/strings.xml b/java/res/values-sr/strings.xml index f706ebc3d..4da1c05b0 100644 --- a/java/res/values-sr/strings.xml +++ b/java/res/values-sr/strings.xml @@ -286,9 +286,6 @@ ".edu" - - Метод за унос - Језици за унос diff --git a/java/res/values-sv/strings.xml b/java/res/values-sv/strings.xml index 28faaa914..86f375f14 100644 --- a/java/res/values-sv/strings.xml +++ b/java/res/values-sv/strings.xml @@ -127,7 +127,6 @@ ".org" ".gov" ".edu" - "Indatametod" "Inmatningsspråk" "Dra med fingret på blanksteg om du vill ändra språk" "← Peka igen för att spara" diff --git a/java/res/values-tr/strings.xml b/java/res/values-tr/strings.xml index fee07338d..34438f7f6 100644 --- a/java/res/values-tr/strings.xml +++ b/java/res/values-tr/strings.xml @@ -127,7 +127,6 @@ ".org" ".gov" ".edu" - "Giriş yöntemi" "Giriş dilleri" "Dili değiştirmek için parmağınızı boşluk çubuğu üzerinde kaydırın" "← Kaydetmek için tekrar dokunun" diff --git a/java/res/values-zh-rCN/strings.xml b/java/res/values-zh-rCN/strings.xml index cbf287723..c04f2e02b 100644 --- a/java/res/values-zh-rCN/strings.xml +++ b/java/res/values-zh-rCN/strings.xml @@ -127,7 +127,6 @@ ".org" ".gov" ".edu" - "输入法" "输入语言" "在空格键上滑动手指可更改语言" "← 再次点按即可保存" diff --git a/java/res/values-zh-rTW/strings.xml b/java/res/values-zh-rTW/strings.xml index 78ede4ac3..54d93117e 100644 --- a/java/res/values-zh-rTW/strings.xml +++ b/java/res/values-zh-rTW/strings.xml @@ -127,7 +127,6 @@ ".org" ".gov" ".edu" - "輸入方式" "輸入語言" "以手指在空白鍵上滑動可變更語言" "← 再次輕按可儲存" diff --git a/java/res/values/strings.xml b/java/res/values/strings.xml index 771577018..bb90825de 100644 --- a/java/res/values/strings.xml +++ b/java/res/values/strings.xml @@ -22,6 +22,8 @@ Android keyboard 2 Android keyboard 2 settings + + Input options Vibrate on keypress @@ -318,9 +320,6 @@ ".edu" - - Input method - Select input method diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 335778980..7097844e2 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -150,8 +150,8 @@ public class LatinIME extends InputMethodService static final int KEYCODE_PERIOD = '.'; // Contextual menu positions - private static final int POS_SETTINGS = 0; - private static final int POS_METHOD = 1; + private static final int POS_METHOD = 0; + private static final int POS_SETTINGS = 1; //private LatinKeyboardView mInputView; private LinearLayout mCandidateViewContainer; @@ -1212,6 +1212,10 @@ public class LatinIME extends InputMethodService mEnteredText = text; } + public void onCancel() { + // User released a finger outside any key + } + private void handleBackspace() { if (VOICE_INSTALLED && mVoiceInputHighlighted) { mVoiceInput.incrementTextModificationDeleteCount( @@ -2449,7 +2453,7 @@ public class LatinIME extends InputMethodService CharSequence itemSettings = getString(R.string.english_ime_settings); CharSequence itemInputMethod = getString(R.string.selectInputMethod); builder.setItems(new CharSequence[] { - itemSettings, itemInputMethod}, + itemInputMethod, itemSettings}, new DialogInterface.OnClickListener() { public void onClick(DialogInterface di, int position) { @@ -2465,7 +2469,7 @@ public class LatinIME extends InputMethodService } } }); - builder.setTitle(mResources.getString(R.string.english_ime_name)); + builder.setTitle(mResources.getString(R.string.english_ime_input_options)); mOptionsDialog = builder.create(); Window window = mOptionsDialog.getWindow(); WindowManager.LayoutParams lp = window.getAttributes(); diff --git a/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java b/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java index a0366c273..8f1ec6591 100644 --- a/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java +++ b/java/src/com/android/inputmethod/latin/LatinKeyboardBaseView.java @@ -123,6 +123,11 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx */ void onText(CharSequence text); + /** + * Called when user released a finger outside any key. + */ + void onCancel(); + /** * Called when the user quickly moves the finger from right to * left. @@ -1005,6 +1010,10 @@ public class LatinKeyboardBaseView extends View implements PointerTracker.UIProx dismissPopupKeyboard(); } + public void onCancel() { + dismissPopupKeyboard(); + } + public void swipeLeft() { } public void swipeRight() { diff --git a/java/src/com/android/inputmethod/latin/PointerTracker.java b/java/src/com/android/inputmethod/latin/PointerTracker.java index f849158ae..8b1f019d4 100644 --- a/java/src/com/android/inputmethod/latin/PointerTracker.java +++ b/java/src/com/android/inputmethod/latin/PointerTracker.java @@ -389,9 +389,13 @@ public class PointerTracker { } private void detectAndSendKey(int index, int x, int y, long eventTime) { - if (isValidKeyIndex(index)) { - final Key key = mKeys[index]; - OnKeyboardActionListener listener = mListener; + final OnKeyboardActionListener listener = mListener; + final Key key = getKey(index); + + if (key == null) { + if (listener != null) + listener.onCancel(); + } else { if (key.text != null) { if (listener != null) { listener.onText(key.text);