mirror of
https://github.com/FossifyOrg/Keyboard.git
synced 2026-09-24 02:55:15 -04:00
Merge pull request #202 from Merkost/delete_fix
Fixed on delete key click
This commit is contained in:
1 file changed
+1
-2
@@ -104,8 +104,7 @@ class SimpleKeyboardIME : InputMethodService(), OnKeyboardActionListener, Shared
|
||||
MyKeyboard.KEYCODE_DELETE -> {
|
||||
val selectedText = inputConnection.getSelectedText(0)
|
||||
if (TextUtils.isEmpty(selectedText)) {
|
||||
inputConnection.sendKeyEvent(KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DEL))
|
||||
inputConnection.sendKeyEvent(KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DEL))
|
||||
inputConnection.deleteSurroundingText(1, 0)
|
||||
} else {
|
||||
inputConnection.commitText("", 1)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user