Skip to content

Commit 9c5cf0b

Browse files
committed
fix #30, fixing a glitch with backspace getting stuck
1 parent 00cd9b4 commit 9c5cf0b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

app/src/main/kotlin/com/simplemobiletools/keyboard/views/MyKeyboardView.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,6 +1002,15 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
10021002
if (ignoreTouches) {
10031003
if (action == MotionEvent.ACTION_UP) {
10041004
ignoreTouches = false
1005+
1006+
// fix a glitch with long pressing backspace, then clicking some letter
1007+
if (mRepeatKeyIndex != NOT_A_KEY) {
1008+
val key = mKeys[mRepeatKeyIndex]
1009+
if (key.code == KEYCODE_DELETE) {
1010+
mHandler?.removeMessages(MSG_REPEAT)
1011+
mRepeatKeyIndex = NOT_A_KEY
1012+
}
1013+
}
10051014
}
10061015
return true
10071016
}

0 commit comments

Comments
 (0)