diff options
| author | Jules Aguillon | 2023-03-02 11:40:22 +0100 |
|---|---|---|
| committer | Jules Aguillon | 2023-03-02 11:40:22 +0100 |
| commit | 1f9e92ed60127baca11cd222a2851d01550bb71c (patch) | |
| tree | 2d6f3439aed84ae3fdaeaf44e69a35aaddb9e126 /srcs/juloo.keyboard2/Keyboard2View.java | |
| parent | 0da02d60c494ad25889dac555fab126ca70e9ffa (diff) | |
| download | unexpected-keyboard-1f9e92ed60127baca11cd222a2851d01550bb71c.tar.gz unexpected-keyboard-1f9e92ed60127baca11cd222a2851d01550bb71c.zip | |
Fix caps lock stopped by auto-capitalisation
Auto-capitalisation triggers when the backspace key is used. Make sure
to not remove a locked shift pointer.
Diffstat (limited to 'srcs/juloo.keyboard2/Keyboard2View.java')
| -rw-r--r-- | srcs/juloo.keyboard2/Keyboard2View.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/srcs/juloo.keyboard2/Keyboard2View.java b/srcs/juloo.keyboard2/Keyboard2View.java index 88f8e6b..3c642f0 100644 --- a/srcs/juloo.keyboard2/Keyboard2View.java +++ b/srcs/juloo.keyboard2/Keyboard2View.java @@ -105,10 +105,19 @@ public class Keyboard2View extends View { if (_keyboard == null || _shift_key == null) return; + int flags = _pointers.getKeyFlags(_shift_key, _shift_kv); if (state) + { + if (flags != -1 && !lock) + return; // Don't replace an existing pointer _pointers.add_fake_pointer(_shift_kv, _shift_key, lock); + } else + { + if ((flags & KeyValue.FLAG_FAKE_PTR) != 0) + return; // Don't remove locked pointers _pointers.remove_fake_pointer(_shift_kv, _shift_key); + } invalidate(); } |
