From 33c278d686449f95132c611ca534050905917ff9 Mon Sep 17 00:00:00 2001 From: merkost Date: Fri, 9 Jun 2023 10:05:48 +1000 Subject: [PATCH] Removed spaces --- .../keyboard/services/SimpleKeyboardIME.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt b/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt index 2148f08..2b6777d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt @@ -107,6 +107,7 @@ class SimpleKeyboardIME : InputMethodService(), MyKeyboardView.OnKeyboardActionL inputConnection.commitText("", 1) } } + MyKeyboard.KEYCODE_SHIFT -> { if (keyboardMode == KEYBOARD_LETTERS) { when { @@ -130,6 +131,7 @@ class SimpleKeyboardIME : InputMethodService(), MyKeyboardView.OnKeyboardActionL } keyboardView!!.invalidateAllKeys() } + MyKeyboard.KEYCODE_ENTER -> { val imeOptionsActionId = getImeOptionsActionId() if (imeOptionsActionId != IME_ACTION_NONE) { @@ -139,6 +141,7 @@ class SimpleKeyboardIME : InputMethodService(), MyKeyboardView.OnKeyboardActionL inputConnection.sendKeyEvent(KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_ENTER)) } } + MyKeyboard.KEYCODE_MODE_CHANGE -> { val keyboardXml = if (keyboardMode == KEYBOARD_LETTERS) { keyboardMode = KEYBOARD_SYMBOLS @@ -150,9 +153,11 @@ class SimpleKeyboardIME : InputMethodService(), MyKeyboardView.OnKeyboardActionL keyboard = MyKeyboard(this, keyboardXml, enterKeyType) keyboardView!!.setKeyboard(keyboard!!) } + MyKeyboard.KEYCODE_EMOJI -> { keyboardView?.openEmojiPalette() } + else -> { var codeChar = code.toChar() val originalText = inputConnection.getExtractedText(ExtractedTextRequest(), 0)?.text ?: return @@ -224,14 +229,17 @@ class SimpleKeyboardIME : InputMethodService(), MyKeyboardView.OnKeyboardActionL keyboardMode = KEYBOARD_NUMBERS R.xml.keys_numbers } + TYPE_CLASS_PHONE -> { keyboardMode = KEYBOARD_PHONE R.xml.keys_phone } + TYPE_CLASS_DATETIME -> { keyboardMode = KEYBOARD_SYMBOLS R.xml.keys_symbols } + else -> { keyboardMode = KEYBOARD_LETTERS getKeyboardLayoutXML()