abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/Pointers.java
diff options
context:
space:
mode:
authorJules Aguillon2022-07-30 18:14:05 +0200
committerJules Aguillon2022-07-30 18:14:05 +0200
commit4f5ce6634780520391bec039977119562e208516 (patch)
tree082f8011e0735fad3f303dbc3a0e11a0a182802a /srcs/juloo.keyboard2/Pointers.java
parent85d798299eaee3affc9e548975c9f3dac390e6e3 (diff)
downloadunexpected-keyboard-4f5ce6634780520391bec039977119562e208516.tar.gz
unexpected-keyboard-4f5ce6634780520391bec039977119562e208516.zip
Fix auto-capitalisation interfering with caps lock
Add a flag to recognize fake pointers and avoid clearing the intentionally locked shift key.
Diffstat (limited to 'srcs/juloo.keyboard2/Pointers.java')
-rw-r--r--srcs/juloo.keyboard2/Pointers.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/srcs/juloo.keyboard2/Pointers.java b/srcs/juloo.keyboard2/Pointers.java
index a9d3b64..2ac55bb 100644
--- a/srcs/juloo.keyboard2/Pointers.java
+++ b/srcs/juloo.keyboard2/Pointers.java
@@ -81,14 +81,14 @@ public final class Pointers implements Handler.Callback
if (isKeyDown(key))
return;
Pointer ptr = new Pointer(-1, key, kv, 0.f, 0.f, Modifiers.EMPTY);
- ptr.flags = ptr.flags & ~(KeyValue.FLAG_LATCH | KeyValue.FLAG_LOCK);
+ ptr.flags = ptr.flags & ~(KeyValue.FLAG_LATCH | KeyValue.FLAG_LOCK | KeyValue.FLAG_FAKE_PTR);
_ptrs.add(ptr);
}
public void remove_fake_pointer(KeyValue kv, KeyboardData.Key key)
{
Pointer ptr = getLatched(key, kv);
- if (ptr != null)
+ if (ptr != null && (ptr.flags & KeyValue.FLAG_FAKE_PTR) != 0)
removePtr(ptr);
}