switch to letters keyboard after pressing space
This commit is contained in:
parent
48eea0b26b
commit
05f98338a9
|
@ -145,7 +145,13 @@ class SimpleKeyboardIME : InputMethodService(), MyKeyboardView.OnKeyboardActionL
|
||||||
}
|
}
|
||||||
|
|
||||||
inputConnection.commitText(code.toString(), 1)
|
inputConnection.commitText(code.toString(), 1)
|
||||||
if (keyboard!!.shiftState == SHIFT_ON_ONE_CHAR) {
|
if (primaryCode == MyKeyboard.KEYCODE_SPACE && keyboardMode != KEYBOARD_LETTERS) {
|
||||||
|
keyboardMode = KEYBOARD_LETTERS
|
||||||
|
keyboard = MyKeyboard(this, R.xml.keys_letters, enterKeyType)
|
||||||
|
keyboardView!!.setKeyboard(keyboard!!)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (keyboard!!.shiftState == SHIFT_ON_ONE_CHAR && keyboardMode == KEYBOARD_LETTERS) {
|
||||||
keyboard!!.shiftState = SHIFT_OFF
|
keyboard!!.shiftState = SHIFT_OFF
|
||||||
keyboardView!!.invalidateAllKeys()
|
keyboardView!!.invalidateAllKeys()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue