diff options
| author | Jules Aguillon | 2025-08-16 18:48:00 +0200 |
|---|---|---|
| committer | Jules Aguillon | 2025-12-28 18:08:12 +0100 |
| commit | f082fcdebc4f129cd262ee4a0a6b83d91fde72bb (patch) | |
| tree | 74dd1045f5e2584c56246b40bd9904a5eb865a8e /srcs/juloo.keyboard2/Keyboard2.java | |
| parent | 98c1b8db82c0da8f49eb12d18c9001a57009eca5 (diff) | |
| download | unexpected-keyboard-f082fcdebc4f129cd262ee4a0a6b83d91fde72bb.tar.gz unexpected-keyboard-f082fcdebc4f129cd262ee4a0a6b83d91fde72bb.zip | |
Track the currently typed word
The `CurrentlyTypedWord` class tracks the word that is being typed. It's
implemented on the same model as Autocapitalisation and avoid expensive
IPC calls when possible.
The `Suggestions` class is where the suggestion lookup should go. It
currently just echoes the current word.
Diffstat (limited to 'srcs/juloo.keyboard2/Keyboard2.java')
| -rw-r--r-- | srcs/juloo.keyboard2/Keyboard2.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/srcs/juloo.keyboard2/Keyboard2.java b/srcs/juloo.keyboard2/Keyboard2.java index c7d7e3d..a2940d5 100644 --- a/srcs/juloo.keyboard2/Keyboard2.java +++ b/srcs/juloo.keyboard2/Keyboard2.java @@ -346,7 +346,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); - _keyeventhandler.selection_updated(oldSelStart, newSelStart); + _keyeventhandler.selection_updated(oldSelStart, newSelStart, newSelEnd); if ((oldSelStart == oldSelEnd) != (newSelStart == newSelEnd)) _keyboardView.set_selection_state(newSelStart != newSelEnd); } @@ -481,6 +481,11 @@ public class Keyboard2 extends InputMethodService { return _handler; } + + public void set_suggestions(List<String> suggestions) + { + _candidates_view.set_candidates(suggestions); + } } private IBinder getConnectionToken() |
