fix: rapid typing of bksp-char would be recognised as two bksp

This commit is contained in:
minjaesong
2023-10-27 20:55:23 +09:00
parent 00f8d8f850
commit 208bf79353
2 changed files with 6 additions and 4 deletions

View File

@@ -277,7 +277,9 @@ class UIItemTextLineInput(
endComposing()
copyToClipboard()
}
else if (keycodes.contains(Input.Keys.BACKSPACE) || (keycodes.contains(Input.Keys.CAPS_LOCK) && lowLayer.capsMode == TerrarumKeyCapsMode.BACK)) {
else if (
(headkey == Input.Keys.BACKSPACE && keycodes.contains(Input.Keys.BACKSPACE)) ||
(headkey == Input.Keys.CAPS_LOCK && keycodes.contains(Input.Keys.CAPS_LOCK) && lowLayer.capsMode == TerrarumKeyCapsMode.BACK)) {
// printdbg(this, "BACKSPACE hit; ime.composing=${ime?.composing?.invoke()}; buflen=${textbuf.size}")