mirror of
https://github.com/SimpleMobileTools/Simple-Keyboard.git
synced 2025-04-24 15:08:44 +02:00
Fixed on delete key click
This commit is contained in:
parent
637f069a65
commit
ed4ba59134
@ -104,8 +104,7 @@ class SimpleKeyboardIME : InputMethodService(), OnKeyboardActionListener, Shared
|
|||||||
MyKeyboard.KEYCODE_DELETE -> {
|
MyKeyboard.KEYCODE_DELETE -> {
|
||||||
val selectedText = inputConnection.getSelectedText(0)
|
val selectedText = inputConnection.getSelectedText(0)
|
||||||
if (TextUtils.isEmpty(selectedText)) {
|
if (TextUtils.isEmpty(selectedText)) {
|
||||||
inputConnection.sendKeyEvent(KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DEL))
|
inputConnection.deleteSurroundingText(1, 0)
|
||||||
inputConnection.sendKeyEvent(KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DEL))
|
|
||||||
} else {
|
} else {
|
||||||
inputConnection.commitText("", 1)
|
inputConnection.commitText("", 1)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user