Fixed a bug when clicking on layout change and space at the same time

This commit is contained in:
merkost 2023-06-09 12:10:00 +10:00
parent 7ac8bc9c3b
commit 09bc110eb6
1 changed files with 2 additions and 2 deletions

View File

@ -1154,8 +1154,8 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
// fix a glitch with long pressing backspace, then clicking some letter // fix a glitch with long pressing backspace, then clicking some letter
if (mRepeatKeyIndex != NOT_A_KEY) { if (mRepeatKeyIndex != NOT_A_KEY) {
val key = mKeys[mRepeatKeyIndex] val key = mKeys.getOrNull(mRepeatKeyIndex)
if (key.code == KEYCODE_DELETE) { if (key?.code == KEYCODE_DELETE) {
mHandler?.removeMessages(MSG_REPEAT) mHandler?.removeMessages(MSG_REPEAT)
mRepeatKeyIndex = NOT_A_KEY mRepeatKeyIndex = NOT_A_KEY
} }