diff options
| author | Jules Aguillon | 2022-07-24 23:32:14 +0200 |
|---|---|---|
| committer | Jules Aguillon | 2022-07-24 23:32:14 +0200 |
| commit | bfde31da6e74aa57e3bcd6f2985fd4588bd48814 (patch) | |
| tree | 335d7de350bd4bd7f60cf0b80b5244f4445680a3 /srcs/juloo.keyboard2/Keyboard2.java | |
| parent | 324756535e139aacfb9d828a5bc9a2a6fef634ea (diff) | |
| download | unexpected-keyboard-bfde31da6e74aa57e3bcd6f2985fd4588bd48814.tar.gz unexpected-keyboard-bfde31da6e74aa57e3bcd6f2985fd4588bd48814.zip | |
Avoid automatic capitalisation when using arrows
Disable capitalisation just after an arrow kind is pressed to avoid
interrupting navigation.
Diffstat (limited to 'srcs/juloo.keyboard2/Keyboard2.java')
| -rw-r--r-- | srcs/juloo.keyboard2/Keyboard2.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/srcs/juloo.keyboard2/Keyboard2.java b/srcs/juloo.keyboard2/Keyboard2.java index cec2b44..756295e 100644 --- a/srcs/juloo.keyboard2/Keyboard2.java +++ b/srcs/juloo.keyboard2/Keyboard2.java @@ -251,8 +251,8 @@ 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); - _autocap.selection_updated(oldSelStart, newSelStart, getCurrentInputConnection()); - update_shift_state(true); + update_shift_state( + _autocap.selection_updated(oldSelStart, newSelStart, getCurrentInputConnection())); } @Override @@ -337,6 +337,11 @@ public class Keyboard2 extends InputMethodService if (conn == null) return; conn.sendKeyEvent(new KeyEvent(1, 1, eventAction, eventCode, 0, meta)); + if (eventAction == KeyEvent.ACTION_UP) + { + _autocap.event_sent(eventCode); + update_shift_state(false); + } } public void showKeyboardConfig() |
