diff options
| author | Jules Aguillon | 2024-03-03 17:08:25 +0100 |
|---|---|---|
| committer | Jules Aguillon | 2024-03-03 17:14:01 +0100 |
| commit | 5e5937b0f49e6fe61db29f36a15070d0c1936b88 (patch) | |
| tree | 55a7eb691b104a1bcedfff3ebb60cb2077c976b9 /srcs/juloo.keyboard2/Keyboard2View.java | |
| parent | ce38a4f151259d6d7fcc066fbf2cc44c0b4fc27a (diff) | |
| download | unexpected-keyboard-5e5937b0f49e6fe61db29f36a15070d0c1936b88.tar.gz unexpected-keyboard-5e5937b0f49e6fe61db29f36a15070d0c1936b88.zip | |
Fix auto-capitalisation disabling locked shift
Shift locked via the "caps lock" key use the "fake pointer" mechanism
that is also used by auto-capitalisation.
Make sure that unlatching a fake pointer do not disabled a locked
modifier.
The implementation is moved into the Pointers class for a safer API and
easier implementation.
Diffstat (limited to 'srcs/juloo.keyboard2/Keyboard2View.java')
| -rw-r--r-- | srcs/juloo.keyboard2/Keyboard2View.java | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/srcs/juloo.keyboard2/Keyboard2View.java b/srcs/juloo.keyboard2/Keyboard2View.java index bad75bb..c0ec68f 100644 --- a/srcs/juloo.keyboard2/Keyboard2View.java +++ b/srcs/juloo.keyboard2/Keyboard2View.java @@ -120,19 +120,7 @@ public class Keyboard2View extends View { if (_keyboard == null || key == null) return; - int flags = _pointers.getKeyFlags(key, kv); - if (latched) - { - if (flags != -1 && !lock) - return; // Don't replace an existing pointer - _pointers.add_fake_pointer(kv, key, lock); - } - else - { - if ((flags & KeyValue.FLAG_FAKE_PTR) == 0) - return; // Don't remove locked pointers - _pointers.remove_fake_pointer(kv, key); - } + _pointers.set_fake_pointer_state(key, kv, latched, lock); } /** Called by auto-capitalisation. */ |
