Skip to content

Commit ed4ba59

Browse files
committed
Fixed on delete key click
1 parent 637f069 commit ed4ba59

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ class SimpleKeyboardIME : InputMethodService(), OnKeyboardActionListener, Shared
104104
MyKeyboard.KEYCODE_DELETE -> {
105105
val selectedText = inputConnection.getSelectedText(0)
106106
if (TextUtils.isEmpty(selectedText)) {
107-
inputConnection.sendKeyEvent(KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DEL))
108-
inputConnection.sendKeyEvent(KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DEL))
107+
inputConnection.deleteSurroundingText(1, 0)
109108
} else {
110109
inputConnection.commitText("", 1)
111110
}

0 commit comments

Comments
 (0)