am b36a653c: am 12a4e08a: Handling multi-character uppercase key input
Merge commit 'b36a653ca65f3c26ba070a73b9d43beb57f620ee' * commit 'b36a653ca65f3c26ba070a73b9d43beb57f620ee': Handling multi-character uppercase key inputmain
commit
b0b9f3b830
|
@ -1347,14 +1347,21 @@ public class LatinIME extends InputMethodService
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mKeyboardSwitcher.getInputView().isShifted()) {
|
if (mKeyboardSwitcher.getInputView().isShifted()) {
|
||||||
// TODO: This doesn't work with [beta], need to fix it in the next release.
|
|
||||||
if (keyCodes == null || keyCodes[0] < Character.MIN_CODE_POINT
|
if (keyCodes == null || keyCodes[0] < Character.MIN_CODE_POINT
|
||||||
|| keyCodes[0] > Character.MAX_CODE_POINT) {
|
|| keyCodes[0] > Character.MAX_CODE_POINT) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
primaryCode = keyCodes[0];
|
primaryCode = keyCodes[0];
|
||||||
if (mKeyboardSwitcher.isAlphabetMode()) {
|
if (mKeyboardSwitcher.isAlphabetMode() && Character.isLowerCase(primaryCode)) {
|
||||||
primaryCode = Character.toUpperCase(primaryCode);
|
int upperCaseCode = Character.toUpperCase(primaryCode);
|
||||||
|
if (upperCaseCode != primaryCode) {
|
||||||
|
primaryCode = upperCaseCode;
|
||||||
|
} else {
|
||||||
|
// Some keys, such as [eszett], have upper case as multi-characters.
|
||||||
|
String upperCase = new String(new int[] {primaryCode}, 0, 1).toUpperCase();
|
||||||
|
onText(upperCase);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mPredicting) {
|
if (mPredicting) {
|
||||||
|
|
Loading…
Reference in New Issue