Skip to content

Commit e4c6ad9

Browse files
authored
Merge pull request #234 from esensar/fix/fast-typing-delay-remove
Ensure no multiple capital letters appear without using delay
2 parents 25918d4 + e0fa3fd commit e4c6ad9

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,14 +260,13 @@ class SimpleKeyboardIME : InputMethodService(), OnKeyboardActionListener, Shared
260260
}
261261
}
262262
inputConnection.commitText(codeChar.toString(), 1)
263+
updateShiftKeyState()
263264
}
264265
}
265266

266267
else -> {
267268
inputConnection.commitText(codeChar.toString(), 1)
268-
if (originalText == null) {
269-
updateShiftKeyState()
270-
}
269+
updateShiftKeyState()
271270
}
272271
}
273272
}

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,14 +1218,12 @@ class MyKeyboardView @JvmOverloads constructor(context: Context, attrs: Attribut
12181218
val secondKeyIndex = getPressedKeyIndex(newPointerX, newPointerY)
12191219
showPreview(secondKeyIndex)
12201220

1221-
mHandler!!.postDelayed({
1222-
detectAndSendKey(secondKeyIndex, newPointerX, newPointerY, eventTime)
1221+
detectAndSendKey(secondKeyIndex, newPointerX, newPointerY, eventTime)
12231222

1224-
val secondKeyCode = mKeys.getOrNull(secondKeyIndex)?.code
1225-
if (secondKeyCode != null) {
1226-
mOnKeyboardActionListener!!.onPress(secondKeyCode)
1227-
}
1228-
}, REPEAT_INTERVAL.toLong())
1223+
val secondKeyCode = mKeys.getOrNull(secondKeyIndex)?.code
1224+
if (secondKeyCode != null) {
1225+
mOnKeyboardActionListener!!.onPress(secondKeyCode)
1226+
}
12291227

12301228
showPreview(NOT_A_KEY)
12311229
invalidateKey(mCurrentKey)

0 commit comments

Comments
 (0)