do not crash on pressing the empty space near A or L
This commit is contained in:
parent
7457808c49
commit
e69a48aa0f
|
@ -1224,7 +1224,7 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
||||||
detectAndSendKey(mCurrentKey, touchX, touchY, eventTime)
|
detectAndSendKey(mCurrentKey, touchX, touchY, eventTime)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mKeys[mCurrentKey].codes.firstOrNull() == MyKeyboard.KEYCODE_SPACE && !mIsLongPressingSpace) {
|
if (mKeys.getOrNull(mCurrentKey)?.codes?.firstOrNull() == MyKeyboard.KEYCODE_SPACE && !mIsLongPressingSpace) {
|
||||||
detectAndSendKey(mCurrentKey, touchX, touchY, eventTime)
|
detectAndSendKey(mCurrentKey, touchX, touchY, eventTime)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue