fix long pressing the Delete button
This commit is contained in:
parent
d5a53a1089
commit
2b140744eb
|
@ -1325,14 +1325,15 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
||||||
if (mCurrentKey >= 0 && mKeys[mCurrentKey].repeatable) {
|
if (mCurrentKey >= 0 && mKeys[mCurrentKey].repeatable) {
|
||||||
mRepeatKeyIndex = mCurrentKey
|
mRepeatKeyIndex = mCurrentKey
|
||||||
|
|
||||||
// if the user long presses Space, move the cursor after swipine left/right
|
|
||||||
if (mKeys[mCurrentKey].codes.firstOrNull() == MyKeyboard.KEYCODE_SPACE) {
|
|
||||||
val msg = mHandler!!.obtainMessage(MSG_REPEAT)
|
val msg = mHandler!!.obtainMessage(MSG_REPEAT)
|
||||||
mHandler!!.sendMessageDelayed(msg, REPEAT_START_DELAY.toLong())
|
mHandler!!.sendMessageDelayed(msg, REPEAT_START_DELAY.toLong())
|
||||||
|
// if the user long presses Space, move the cursor after swipine left/right
|
||||||
|
if (mKeys[mCurrentKey].codes.firstOrNull() == MyKeyboard.KEYCODE_SPACE) {
|
||||||
mLastSpaceMoveX = touchX
|
mLastSpaceMoveX = touchX
|
||||||
} else {
|
} else {
|
||||||
repeatKey(true)
|
repeatKey(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delivering the key could have caused an abort
|
// Delivering the key could have caused an abort
|
||||||
if (mAbortKey) {
|
if (mAbortKey) {
|
||||||
mRepeatKeyIndex = NOT_A_KEY
|
mRepeatKeyIndex = NOT_A_KEY
|
||||||
|
|
Loading…
Reference in New Issue