mirror of
https://github.com/Julow/Unexpected-Keyboard.git
synced 2024-11-22 15:23:11 +01:00
Fix auto-capitalisation interfering with caps lock
Add a flag to recognize fake pointers and avoid clearing the intentionally locked shift key.
This commit is contained in:
parent
85d798299e
commit
4f5ce66347
@ -59,6 +59,7 @@ final class KeyValue
|
|||||||
public static final int FLAG_SMALLER_FONT = (1 << 25);
|
public static final int FLAG_SMALLER_FONT = (1 << 25);
|
||||||
// Used by [Pointers].
|
// Used by [Pointers].
|
||||||
public static final int FLAG_LOCKED = (1 << 26);
|
public static final int FLAG_LOCKED = (1 << 26);
|
||||||
|
public static final int FLAG_FAKE_PTR = (1 << 27);
|
||||||
|
|
||||||
// Kinds
|
// Kinds
|
||||||
public static final int KIND_CHAR = (0 << 29);
|
public static final int KIND_CHAR = (0 << 29);
|
||||||
|
@ -81,14 +81,14 @@ public final class Pointers implements Handler.Callback
|
|||||||
if (isKeyDown(key))
|
if (isKeyDown(key))
|
||||||
return;
|
return;
|
||||||
Pointer ptr = new Pointer(-1, key, kv, 0.f, 0.f, Modifiers.EMPTY);
|
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);
|
_ptrs.add(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void remove_fake_pointer(KeyValue kv, KeyboardData.Key key)
|
public void remove_fake_pointer(KeyValue kv, KeyboardData.Key key)
|
||||||
{
|
{
|
||||||
Pointer ptr = getLatched(key, kv);
|
Pointer ptr = getLatched(key, kv);
|
||||||
if (ptr != null)
|
if (ptr != null && (ptr.flags & KeyValue.FLAG_FAKE_PTR) != 0)
|
||||||
removePtr(ptr);
|
removePtr(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user