From cd66af8cc0c1fb6ac7ecdb616f3d9ab38d79137b Mon Sep 17 00:00:00 2001 From: merkost Date: Wed, 28 Jun 2023 11:54:14 +1000 Subject: [PATCH] Changed onPastedText cursor position to the end of the text --- .../keyboard/interfaces/OnKeyboardActionListener.kt | 3 +++ .../simplemobiletools/keyboard/services/SimpleKeyboardIME.kt | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/keyboard/interfaces/OnKeyboardActionListener.kt b/app/src/main/kotlin/com/simplemobiletools/keyboard/interfaces/OnKeyboardActionListener.kt index 8f9189a..73ca5b9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/interfaces/OnKeyboardActionListener.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/interfaces/OnKeyboardActionListener.kt @@ -1,5 +1,8 @@ package com.simplemobiletools.keyboard.interfaces +/** + * The SimpleKeyboardIME class uses this interface to communicate with the input connection + */ interface OnKeyboardActionListener { /** * Called when the user presses a key. This is sent before the [.onKey] is called. For keys that repeat, this is only called once. 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 68045c0..83ff6ce 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt @@ -241,7 +241,7 @@ class SimpleKeyboardIME : InputMethodService(), OnKeyboardActionListener, Shared } override fun onText(text: String) { - currentInputConnection?.commitText(text, 0) + currentInputConnection?.commitText(text, 1) } override fun reloadKeyboard() {