fixed incorrect hotkey handling that caused the arrow keys not work sometimes
This commit is contained in:
parent
5d769f27c7
commit
29339fc01e
4 changed files with 139 additions and 122 deletions
|
|
@ -119,9 +119,8 @@ abstract class KeyPadHandler extends InputMethodService {
|
||||||
// Logger.d("onKeyDown", "Key: " + event + " repeat?: " + event.getRepeatCount() + " long-time: " + event.isLongPress());
|
// Logger.d("onKeyDown", "Key: " + event + " repeat?: " + event.getRepeatCount() + " long-time: " + event.isLongPress());
|
||||||
|
|
||||||
// "backspace" key must repeat its function when held down, so we handle it in a special way
|
// "backspace" key must repeat its function when held down, so we handle it in a special way
|
||||||
if (Key.isBackspace(settings, keyCode)) {
|
if (Key.isBackspace(settings, keyCode) && onBackspace()) {
|
||||||
isBackspaceHandled = onBackspace();
|
return isBackspaceHandled = true;
|
||||||
return isBackspaceHandled;
|
|
||||||
} else {
|
} else {
|
||||||
isBackspaceHandled = false;
|
isBackspaceHandled = false;
|
||||||
}
|
}
|
||||||
|
|
@ -131,12 +130,17 @@ abstract class KeyPadHandler extends InputMethodService {
|
||||||
event.startTracking();
|
event.startTracking();
|
||||||
}
|
}
|
||||||
|
|
||||||
return Key.isNumber(keyCode)
|
if (Key.isBack(keyCode)) {
|
||||||
|
return onBack() && super.onKeyDown(keyCode, event);
|
||||||
|
}
|
||||||
|
|
||||||
|
return
|
||||||
|
Key.isNumber(keyCode)
|
||||||
|| Key.isOK(keyCode)
|
|| Key.isOK(keyCode)
|
||||||
|| Key.isHotkey(settings, keyCode) || Key.isHotkey(settings, -keyCode) // press or hold a hotkey
|
|| handleHotkey(keyCode, true, false, true) // hold a hotkey, handled in onKeyLongPress())
|
||||||
|| (keyCode == KeyEvent.KEYCODE_POUND && onText("#"))
|
|| handleHotkey(keyCode, false, keyRepeatCounter + 1 > 0, true) // press a hotkey, handled in onKeyUp()
|
||||||
|| (keyCode == KeyEvent.KEYCODE_STAR && onText("*"))
|
|| Key.isPoundOrStar(keyCode) && onText(String.valueOf((char) event.getUnicodeChar()), true)
|
||||||
|| super.onKeyDown(keyCode, event); // let the system handle the keys we don't care about (usually, only: KEYCODE_BACK)
|
|| super.onKeyDown(keyCode, event); // let the system handle the keys we don't care about (usually, the touch "buttons")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -161,7 +165,7 @@ abstract class KeyPadHandler extends InputMethodService {
|
||||||
lastKeyCode = 0;
|
lastKeyCode = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (handleHotkey(keyCode, true)) {
|
if (handleHotkey(keyCode, true, false, false)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -193,59 +197,62 @@ abstract class KeyPadHandler extends InputMethodService {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// repeat handling
|
if (isBackspaceHandled) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
keyRepeatCounter = (lastKeyCode == keyCode) ? keyRepeatCounter + 1 : 0;
|
keyRepeatCounter = (lastKeyCode == keyCode) ? keyRepeatCounter + 1 : 0;
|
||||||
lastKeyCode = keyCode;
|
lastKeyCode = keyCode;
|
||||||
|
|
||||||
if (Key.isNumber(keyCode)) {
|
if (Key.isNumber(keyCode)) {
|
||||||
numKeyRepeatCounter = (lastNumKeyCode == keyCode) ? numKeyRepeatCounter + 1 : 0;
|
numKeyRepeatCounter = (lastNumKeyCode == keyCode) ? numKeyRepeatCounter + 1 : 0;
|
||||||
lastNumKeyCode = keyCode;
|
lastNumKeyCode = keyCode;
|
||||||
}
|
|
||||||
|
|
||||||
// backspace is handled in onKeyDown only, so we ignore it here
|
|
||||||
if (isBackspaceHandled) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Key.isNumber(keyCode)) {
|
|
||||||
return onNumber(Key.codeToNumber(settings, keyCode), false, numKeyRepeatCounter);
|
return onNumber(Key.codeToNumber(settings, keyCode), false, numKeyRepeatCounter);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Key.isOK(keyCode)) {
|
if (Key.isBack(keyCode)) {
|
||||||
return onOK();
|
return onBack() && super.onKeyUp(keyCode, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (handleHotkey(keyCode, false)) {
|
return
|
||||||
return true;
|
Key.isOK(keyCode) && onOK()
|
||||||
}
|
|| handleHotkey(keyCode, false, keyRepeatCounter > 0, false)
|
||||||
|
|| Key.isPoundOrStar(keyCode) && onText(String.valueOf((char) event.getUnicodeChar()), false)
|
||||||
switch (keyCode) {
|
|| super.onKeyUp(keyCode, event); // let the system handle the keys we don't care about (usually, the touch "buttons")
|
||||||
case KeyEvent.KEYCODE_DPAD_UP:
|
|
||||||
case KeyEvent.KEYCODE_DPAD_DOWN:
|
|
||||||
case KeyEvent.KEYCODE_DPAD_LEFT:
|
|
||||||
case KeyEvent.KEYCODE_DPAD_RIGHT: return onArrow(keyCode, keyRepeatCounter > 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// let the system handle the keys we don't care about (usually, only: KEYCODE_BACK)
|
|
||||||
return super.onKeyUp(keyCode, event);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private boolean handleHotkey(int keyCode, boolean hold) {
|
private boolean handleHotkey(int keyCode, boolean hold, boolean repeat, boolean validateOnly) {
|
||||||
if (keyCode == settings.getKeyAddWord() * (hold ? -1 : 1)) {
|
if (keyCode == settings.getKeyAddWord() * (hold ? -1 : 1)) {
|
||||||
return onKeyAddWord();
|
return onKeyAddWord(validateOnly);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (keyCode == settings.getKeyFilterClear() * (hold ? -1 : 1)) {
|
||||||
|
return onKeyFilterClear(validateOnly);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (keyCode == settings.getKeyFilterSuggestions() * (hold ? -1 : 1)) {
|
||||||
|
return onKeyFilterSuggestions(validateOnly, repeat);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (keyCode == settings.getKeyNextLanguage() * (hold ? -1 : 1)) {
|
if (keyCode == settings.getKeyNextLanguage() * (hold ? -1 : 1)) {
|
||||||
return onKeyNextLanguage();
|
return onKeyNextLanguage(validateOnly);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (keyCode == settings.getKeyNextInputMode() * (hold ? -1 : 1)) {
|
if (keyCode == settings.getKeyNextInputMode() * (hold ? -1 : 1)) {
|
||||||
return onKeyNextInputMode();
|
return onKeyNextInputMode(validateOnly);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (keyCode == settings.getKeyPreviousSuggestion() * (hold ? -1 : 1)) {
|
||||||
|
return onKeyScrollSuggestion(validateOnly, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (keyCode == settings.getKeyNextSuggestion() * (hold ? -1 : 1)) {
|
||||||
|
return onKeyScrollSuggestion(validateOnly, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (keyCode == settings.getKeyShowSettings() * (hold ? -1 : 1)) {
|
if (keyCode == settings.getKeyShowSettings() * (hold ? -1 : 1)) {
|
||||||
return onKeyShowSettings();
|
return onKeyShowSettings(validateOnly);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -261,17 +268,20 @@ abstract class KeyPadHandler extends InputMethodService {
|
||||||
|
|
||||||
|
|
||||||
// hardware key handlers
|
// hardware key handlers
|
||||||
abstract protected boolean onArrow(int key, boolean repeat);
|
abstract protected boolean onBack();
|
||||||
abstract public boolean onBackspace();
|
abstract public boolean onBackspace();
|
||||||
abstract protected boolean onNumber(int key, boolean hold, int repeat);
|
abstract protected boolean onNumber(int key, boolean hold, int repeat);
|
||||||
abstract public boolean onOK();
|
abstract public boolean onOK();
|
||||||
abstract public boolean onText(String text); // used for "#", "*" and whatnot
|
abstract public boolean onText(String text, boolean validateOnly); // used for "#", "*" and whatnot
|
||||||
|
|
||||||
// hotkey handlers
|
// hotkey handlers
|
||||||
abstract protected boolean onKeyAddWord();
|
abstract protected boolean onKeyAddWord(boolean validateOnly);
|
||||||
abstract protected boolean onKeyNextLanguage();
|
abstract protected boolean onKeyFilterClear(boolean validateOnly);
|
||||||
abstract protected boolean onKeyNextInputMode();
|
abstract protected boolean onKeyFilterSuggestions(boolean validateOnly, boolean repeat);
|
||||||
abstract protected boolean onKeyShowSettings();
|
abstract protected boolean onKeyNextLanguage(boolean validateOnly);
|
||||||
|
abstract protected boolean onKeyNextInputMode(boolean validateOnly);
|
||||||
|
abstract protected boolean onKeyScrollSuggestion(boolean validateOnly, boolean backward);
|
||||||
|
abstract protected boolean onKeyShowSettings(boolean validateOnly);
|
||||||
|
|
||||||
// helpers
|
// helpers
|
||||||
abstract protected void onInit();
|
abstract protected void onInit();
|
||||||
|
|
|
||||||
|
|
@ -211,18 +211,8 @@ public class TraditionalT9 extends KeyPadHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public boolean onArrow(int key, boolean repeat) {
|
public boolean onBack() {
|
||||||
if (key == settings.getKeyFilterClear()) {
|
return settings.getShowSoftNumpad();
|
||||||
return onKeyFilterClear();
|
|
||||||
} else if (key == settings.getKeyFilterSuggestions()) {
|
|
||||||
return onKeyFilterSuggestions(repeat);
|
|
||||||
} else if (key == settings.getKeyPreviousSuggestion()) {
|
|
||||||
return onKeyPreviousSuggestion();
|
|
||||||
} else if (key == settings.getKeyNextSuggestion()) {
|
|
||||||
return onKeyNextSuggestion();
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -307,11 +297,17 @@ public class TraditionalT9 extends KeyPadHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public boolean onText(String text) {
|
public boolean onText(String text) { return onText(text, false); }
|
||||||
|
|
||||||
|
public boolean onText(String text, boolean validateOnly) {
|
||||||
if (mInputMode.shouldIgnoreText(text)) {
|
if (mInputMode.shouldIgnoreText(text)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (validateOnly) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
cancelAutoAccept();
|
cancelAutoAccept();
|
||||||
|
|
||||||
// accept the previously typed word (if any)
|
// accept the previously typed word (if any)
|
||||||
|
|
@ -326,22 +322,30 @@ public class TraditionalT9 extends KeyPadHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public boolean onKeyAddWord() {
|
public boolean onKeyAddWord(boolean validateOnly) {
|
||||||
if (!isInputViewShown() || mInputMode.isNumeric()) {
|
if (!isInputViewShown() || mInputMode.isNumeric()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (validateOnly) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
cancelAutoAccept();
|
cancelAutoAccept();
|
||||||
showAddWord();
|
showAddWord();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public boolean onKeyFilterClear() {
|
public boolean onKeyFilterClear(boolean validateOnly) {
|
||||||
if (suggestionBar.isEmpty()) {
|
if (isSuggestionViewHidden()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (validateOnly) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
cancelAutoAccept();
|
cancelAutoAccept();
|
||||||
|
|
||||||
if (mInputMode.clearWordStem()) {
|
if (mInputMode.clearWordStem()) {
|
||||||
|
|
@ -353,11 +357,15 @@ public class TraditionalT9 extends KeyPadHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public boolean onKeyFilterSuggestions(boolean repeat) {
|
public boolean onKeyFilterSuggestions(boolean validateOnly, boolean repeat) {
|
||||||
if (suggestionBar.isEmpty()) {
|
if (isSuggestionViewHidden()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (validateOnly) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
cancelAutoAccept();
|
cancelAutoAccept();
|
||||||
|
|
||||||
String filter;
|
String filter;
|
||||||
|
|
@ -377,68 +385,77 @@ public class TraditionalT9 extends KeyPadHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public boolean onKeyNextSuggestion() {
|
public boolean onKeyScrollSuggestion(boolean validateOnly, boolean backward) {
|
||||||
if (nextSuggestion()) {
|
if (isSuggestionViewHidden()) {
|
||||||
cancelAutoAccept();
|
return false;
|
||||||
mInputMode.setWordStem(suggestionBar.getCurrentSuggestion(), true);
|
}
|
||||||
textField.setComposingTextWithHighlightedStem(suggestionBar.getCurrentSuggestion(), mInputMode);
|
|
||||||
|
if (validateOnly) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
cancelAutoAccept();
|
||||||
|
if (backward) previousSuggestion();
|
||||||
|
else nextSuggestion();
|
||||||
|
mInputMode.setWordStem(suggestionBar.getCurrentSuggestion(), true);
|
||||||
|
textField.setComposingTextWithHighlightedStem(suggestionBar.getCurrentSuggestion(), mInputMode);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public boolean onKeyPreviousSuggestion() {
|
public boolean onKeyNextLanguage(boolean validateOnly) {
|
||||||
if (previousSuggestion()) {
|
if (mInputMode.isNumeric() || mEnabledLanguages.size() < 2) {
|
||||||
cancelAutoAccept();
|
return false;
|
||||||
mInputMode.setWordStem(suggestionBar.getCurrentSuggestion(), true);
|
}
|
||||||
textField.setComposingTextWithHighlightedStem(suggestionBar.getCurrentSuggestion(), mInputMode);
|
|
||||||
|
if (validateOnly) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
cancelAutoAccept();
|
||||||
|
commitCurrentSuggestion(false);
|
||||||
|
clearSuggestions();
|
||||||
|
resetKeyRepeat();
|
||||||
|
nextLang();
|
||||||
|
mInputMode.changeLanguage(mLanguage);
|
||||||
|
mInputMode.reset();
|
||||||
|
|
||||||
|
statusBar.setText(mInputMode.toString());
|
||||||
|
mainView.render();
|
||||||
|
forceShowWindowIfHidden();
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public boolean onKeyNextLanguage() {
|
public boolean onKeyNextInputMode(boolean validateOnly) {
|
||||||
if (nextLang()) {
|
if (allowedInputModes.size() == 1) {
|
||||||
cancelAutoAccept();
|
return false;
|
||||||
commitCurrentSuggestion(false);
|
}
|
||||||
mInputMode.changeLanguage(mLanguage);
|
|
||||||
mInputMode.reset();
|
|
||||||
resetKeyRepeat();
|
|
||||||
clearSuggestions();
|
|
||||||
statusBar.setText(mInputMode.toString());
|
|
||||||
mainView.render();
|
|
||||||
forceShowWindowIfHidden();
|
|
||||||
|
|
||||||
|
if (validateOnly) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public boolean onKeyNextInputMode() {
|
|
||||||
scheduleAutoAccept(mInputMode.getAutoAcceptTimeout()); // restart the timer
|
scheduleAutoAccept(mInputMode.getAutoAcceptTimeout()); // restart the timer
|
||||||
nextInputMode();
|
nextInputMode();
|
||||||
mainView.render();
|
mainView.render();
|
||||||
|
|
||||||
if (allowedInputModes.size() == 1) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
forceShowWindowIfHidden();
|
forceShowWindowIfHidden();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public boolean onKeyShowSettings() {
|
public boolean onKeyShowSettings(boolean validateOnly) {
|
||||||
if (!isInputViewShown()) {
|
if (!isInputViewShown()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (validateOnly) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
cancelAutoAccept();
|
cancelAutoAccept();
|
||||||
UI.showSettingsScreen(this);
|
UI.showSettingsScreen(this);
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -450,27 +467,15 @@ public class TraditionalT9 extends KeyPadHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private boolean previousSuggestion() {
|
private void previousSuggestion() {
|
||||||
if (isSuggestionViewHidden()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
suggestionBar.scrollToSuggestion(-1);
|
suggestionBar.scrollToSuggestion(-1);
|
||||||
textField.setComposingTextWithHighlightedStem(suggestionBar.getCurrentSuggestion(), mInputMode);
|
textField.setComposingTextWithHighlightedStem(suggestionBar.getCurrentSuggestion(), mInputMode);
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private boolean nextSuggestion() {
|
private void nextSuggestion() {
|
||||||
if (isSuggestionViewHidden()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
suggestionBar.scrollToSuggestion(1);
|
suggestionBar.scrollToSuggestion(1);
|
||||||
textField.setComposingTextWithHighlightedStem(suggestionBar.getCurrentSuggestion(), mInputMode);
|
textField.setComposingTextWithHighlightedStem(suggestionBar.getCurrentSuggestion(), mInputMode);
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -661,11 +666,7 @@ public class TraditionalT9 extends KeyPadHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private boolean nextLang() {
|
private void nextLang() {
|
||||||
if (mInputMode.isNumeric() || mEnabledLanguages.size() < 2) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// select the next language
|
// select the next language
|
||||||
int previous = mEnabledLanguages.indexOf(mLanguage.getId());
|
int previous = mEnabledLanguages.indexOf(mLanguage.getId());
|
||||||
int next = (previous + 1) % mEnabledLanguages.size();
|
int next = (previous + 1) % mEnabledLanguages.size();
|
||||||
|
|
@ -675,8 +676,6 @@ public class TraditionalT9 extends KeyPadHandler {
|
||||||
|
|
||||||
// save it for the next time
|
// save it for the next time
|
||||||
settings.saveInputLanguage(mLanguage.getId());
|
settings.saveInputLanguage(mLanguage.getId());
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,14 @@ public class Key {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static boolean isBack(int keyCode) { return keyCode == KeyEvent.KEYCODE_BACK; }
|
||||||
|
|
||||||
|
|
||||||
|
public static boolean isPoundOrStar(int keyCode) {
|
||||||
|
return keyCode == KeyEvent.KEYCODE_POUND || keyCode == KeyEvent.KEYCODE_STAR;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static boolean isOK(int keyCode) {
|
public static boolean isOK(int keyCode) {
|
||||||
return
|
return
|
||||||
keyCode == KeyEvent.KEYCODE_DPAD_CENTER
|
keyCode == KeyEvent.KEYCODE_DPAD_CENTER
|
||||||
|
|
|
||||||
|
|
@ -135,14 +135,14 @@ public class SoftKey extends androidx.appcompat.widget.AppCompatButton implement
|
||||||
|
|
||||||
int keyId = getId();
|
int keyId = getId();
|
||||||
|
|
||||||
if (keyId == R.id.soft_key_add_word) return tt9.onKeyAddWord();
|
if (keyId == R.id.soft_key_add_word) return tt9.onKeyAddWord(false);
|
||||||
if (keyId == R.id.soft_key_filter_suggestions) return tt9.onKeyFilterSuggestions(repeat);
|
if (keyId == R.id.soft_key_filter_suggestions) return tt9.onKeyFilterSuggestions(false, repeat);
|
||||||
if (keyId == R.id.soft_key_left_arrow) return tt9.onKeyPreviousSuggestion();
|
if (keyId == R.id.soft_key_left_arrow) return tt9.onKeyScrollSuggestion(false, true);
|
||||||
if (keyId == R.id.soft_key_right_arrow) return tt9.onKeyNextSuggestion();
|
if (keyId == R.id.soft_key_right_arrow) return tt9.onKeyScrollSuggestion(false, false);
|
||||||
if (keyId == R.id.soft_key_input_mode) return tt9.onKeyNextInputMode();
|
if (keyId == R.id.soft_key_input_mode) return tt9.onKeyNextInputMode(false);
|
||||||
if (keyId == R.id.soft_key_language) return tt9.onKeyNextLanguage();
|
if (keyId == R.id.soft_key_language) return tt9.onKeyNextLanguage(false);
|
||||||
if (keyId == R.id.soft_key_ok) return tt9.onOK();
|
if (keyId == R.id.soft_key_ok) return tt9.onOK();
|
||||||
if (keyId == R.id.soft_key_settings) return tt9.onKeyShowSettings();
|
if (keyId == R.id.soft_key_settings) return tt9.onKeyShowSettings(false);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue