File tree Expand file tree Collapse file tree
src/main/java/helium314/keyboard/keyboard Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727
2828# Keep java-llama.cpp classes
2929-keep class de.kherud.llama.** { *; }
30+ -keep class org.nehuatl.llamacpp.** { *; }
31+
3032
3133
3234# Fix correct service name
Original file line number Diff line number Diff line change @@ -366,6 +366,7 @@ private void setMainKeyboardFrame(
366366 }
367367 mHandwritingView .setVisibility (View .GONE );
368368 }
369+
369370
370371 if (PointerTracker .sPersistentTouchpadModeActive ) {
371372 if (mTouchpadView != null ) {
Original file line number Diff line number Diff line change @@ -73,6 +73,8 @@ class KeyboardState(private val switchActions: SwitchActions) {
7373 // For handling double tap.
7474 private var isInAlphabetUnshiftedFromShifted = false
7575 private var isInDoubleTapShiftKey = false
76+ private var lastShiftPressTime = 0L
77+
7678
7779 private val savedKeyboardState = SavedKeyboardState ()
7880
@@ -515,8 +517,11 @@ class KeyboardState(private val switchActions: SwitchActions) {
515517 shiftKeyState.onPress()
516518 return
517519 }
518- isInDoubleTapShiftKey = switchActions.isInDoubleTapShiftKeyTimeout
520+ val now = android.os.SystemClock .uptimeMillis()
521+ isInDoubleTapShiftKey = switchActions.isInDoubleTapShiftKeyTimeout && (now - lastShiftPressTime > 100 )
522+ lastShiftPressTime = now
519523 if (isInDoubleTapShiftKey) {
524+
520525 if (alphabetShiftState.isManualShifted || isInAlphabetUnshiftedFromShifted) {
521526 // Shift key has been double tapped while in manual shifted or automatic shifted state.
522527 setShiftLocked(true )
Original file line number Diff line number Diff line change @@ -163,10 +163,10 @@ public boolean isTypingState() {
163163
164164 @ Override
165165 public void startDoubleTapShiftKeyTimer () {
166- sendMessageDelayed (obtainMessage (MSG_DOUBLE_TAP_SHIFT_KEY ),
167- ViewConfiguration .getDoubleTapTimeout ());
166+ sendMessageDelayed (obtainMessage (MSG_DOUBLE_TAP_SHIFT_KEY ), 300 );
168167 }
169168
169+
170170 @ Override
171171 public void cancelDoubleTapShiftKeyTimer () {
172172 removeMessages (MSG_DOUBLE_TAP_SHIFT_KEY );
@@ -218,8 +218,10 @@ public void postDismissGestureFloatingPreviewText(final long delay) {
218218
219219 public void cancelAllMessages () {
220220 cancelAllKeyTimers ();
221+ cancelDoubleTapShiftKeyTimer ();
221222 cancelAllUpdateBatchInputTimers ();
222223 removeMessages (MSG_DISMISS_KEY_PREVIEW );
223224 removeMessages (MSG_DISMISS_GESTURE_FLOATING_PREVIEW_TEXT );
224225 }
225226}
227+
You can’t perform that action at this time.
0 commit comments