From 71edc078de0800c49c465033fad8c97aa8e32c6c Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 10 Feb 2022 10:13:08 +0100 Subject: [PATCH] do not allow toggline permanent caps with a key inbetween 2 shifts --- .../simplemobiletools/keyboard/services/SimpleKeyboardIME.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt b/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt index fe2ffd5..ddfd31e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/services/SimpleKeyboardIME.kt @@ -88,6 +88,10 @@ class SimpleKeyboardIME : InputMethodService(), MyKeyboardView.OnKeyboardActionL return } + if (code != MyKeyboard.KEYCODE_SHIFT) { + lastShiftPressTS = 0 + } + when (code) { MyKeyboard.KEYCODE_DELETE -> { if (keyboard!!.mShiftState == SHIFT_ON_ONE_CHAR) {