From 85d798299eaee3affc9e548975c9f3dac390e6e3 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Sat, 30 Jul 2022 17:42:58 +0200 Subject: Standard auto-capitalisation only after space Change the capitalisation algorithm to use Android's 'getCursorCapsMode'. This requires a bit of cursor calculations but should feel more standard. The auto completion only triggers after a space is typed or backspace is pressed. --- srcs/juloo.keyboard2/Keyboard2.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'srcs/juloo.keyboard2/Keyboard2.java') diff --git a/srcs/juloo.keyboard2/Keyboard2.java b/srcs/juloo.keyboard2/Keyboard2.java index 756295e..b2197a1 100644 --- a/srcs/juloo.keyboard2/Keyboard2.java +++ b/srcs/juloo.keyboard2/Keyboard2.java @@ -251,8 +251,7 @@ public class Keyboard2 extends InputMethodService public void onUpdateSelection(int oldSelStart, int oldSelEnd, int newSelStart, int newSelEnd, int candidatesStart, int candidatesEnd) { super.onUpdateSelection(oldSelStart, oldSelEnd, newSelStart, newSelEnd, candidatesStart, candidatesEnd); - update_shift_state( - _autocap.selection_updated(oldSelStart, newSelStart, getCurrentInputConnection())); + update_shift_state(_autocap.selection_updated(oldSelStart, newSelStart)); } @Override -- cgit v1.2.3