mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 19:14:05 +09:00
fix: rapid typing of bksp-char would be recognised as two bksp
This commit is contained in:
@@ -56,7 +56,7 @@ object InputStrober {
|
|||||||
val keymap = IME.getLowLayerByName(App.getConfigString("basekeyboardlayout"))
|
val keymap = IME.getLowLayerByName(App.getConfigString("basekeyboardlayout"))
|
||||||
|
|
||||||
if (stroboStatus % 2 == 0 && keybuf[0] != 0) {
|
if (stroboStatus % 2 == 0 && keybuf[0] != 0) {
|
||||||
// println("Key strobed: ${keybuf.joinToString()}; ${oldKeys.joinToString()}; changed = $keyChanged")
|
// println("Key strobed: ${keybuf.joinToString()}; old: ${oldKeys.joinToString()}; changed = $keyChanged")
|
||||||
|
|
||||||
stroboStatus += 1
|
stroboStatus += 1
|
||||||
stroboTime = System.nanoTime()
|
stroboTime = System.nanoTime()
|
||||||
@@ -82,11 +82,11 @@ object InputStrober {
|
|||||||
val headKeyCode = if (keyDiff.size < 1) keybuf[0] else keyDiff[0]
|
val headKeyCode = if (keyDiff.size < 1) keybuf[0] else keyDiff[0]
|
||||||
|
|
||||||
if (!keyChanged) {
|
if (!keyChanged) {
|
||||||
// println("KEY_DOWN '$keysym' ($headKeyCode) $repeatCount; ${keys.joinToString()}")
|
// println("KEY_DOWN '$keysym' ($headKeyCode) $repeatCount")
|
||||||
App.inputStrobed(TerrarumKeyboardEvent(KEY_DOWN, keysym, headKeyCode, repeatCount, keybuf))
|
App.inputStrobed(TerrarumKeyboardEvent(KEY_DOWN, keysym, headKeyCode, repeatCount, keybuf))
|
||||||
}
|
}
|
||||||
else if (newKeysym != null) {
|
else if (newKeysym != null) {
|
||||||
// println("KEY_DOWC '$newKeysym' ($headKeyCode) $repeatCount; ${keys.joinToString()}")
|
// println("KEY_DOWC '$newKeysym' ($headKeyCode) $repeatCount")
|
||||||
App.inputStrobed(TerrarumKeyboardEvent(KEY_DOWN, newKeysym, headKeyCode, repeatCount, keybuf))
|
App.inputStrobed(TerrarumKeyboardEvent(KEY_DOWN, newKeysym, headKeyCode, repeatCount, keybuf))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -277,7 +277,9 @@ class UIItemTextLineInput(
|
|||||||
endComposing()
|
endComposing()
|
||||||
copyToClipboard()
|
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}")
|
// printdbg(this, "BACKSPACE hit; ime.composing=${ime?.composing?.invoke()}; buflen=${textbuf.size}")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user