Merge pull request #234 from esensar/fix/fast-typing-delay-remove
Ensure no multiple capital letters appear without using delay
This commit is contained in:
commit
e4c6ad9769
|
@ -260,14 +260,13 @@ class SimpleKeyboardIME : InputMethodService(), OnKeyboardActionListener, Shared
|
|||
}
|
||||
}
|
||||
inputConnection.commitText(codeChar.toString(), 1)
|
||||
updateShiftKeyState()
|
||||
}
|
||||
}
|
||||
|
||||
else -> {
|
||||
inputConnection.commitText(codeChar.toString(), 1)
|
||||
if (originalText == null) {
|
||||
updateShiftKeyState()
|
||||
}
|
||||
updateShiftKeyState()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1218,14 +1218,12 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
|
|||
val secondKeyIndex = getPressedKeyIndex(newPointerX, newPointerY)
|
||||
showPreview(secondKeyIndex)
|
||||
|
||||
mHandler!!.postDelayed({
|
||||
detectAndSendKey(secondKeyIndex, newPointerX, newPointerY, eventTime)
|
||||
detectAndSendKey(secondKeyIndex, newPointerX, newPointerY, eventTime)
|
||||
|
||||
val secondKeyCode = mKeys.getOrNull(secondKeyIndex)?.code
|
||||
if (secondKeyCode != null) {
|
||||
mOnKeyboardActionListener!!.onPress(secondKeyCode)
|
||||
}
|
||||
}, REPEAT_INTERVAL.toLong())
|
||||
val secondKeyCode = mKeys.getOrNull(secondKeyIndex)?.code
|
||||
if (secondKeyCode != null) {
|
||||
mOnKeyboardActionListener!!.onPress(secondKeyCode)
|
||||
}
|
||||
|
||||
showPreview(NOT_A_KEY)
|
||||
invalidateKey(mCurrentKey)
|
||||
|
|
Loading…
Reference in New Issue