diff options
| author | Jules Aguillon | 2022-03-19 15:39:20 +0100 |
|---|---|---|
| committer | Jules Aguillon | 2022-03-19 15:39:20 +0100 |
| commit | e872c5878874bdd035b9ca870853068a53cfc002 (patch) | |
| tree | f387e240310c86d33deb4a61976e8bef41255941 /srcs/juloo.keyboard2/KeyboardData.java | |
| parent | 57c6208b50ac0959911a1966187c9bb036bd40a9 (diff) | |
| download | unexpected-keyboard-e872c5878874bdd035b9ca870853068a53cfc002.tar.gz unexpected-keyboard-e872c5878874bdd035b9ca870853068a53cfc002.zip | |
Allow modifiers to hide keys
Modifiers can temporarily remove a key from the layout by returning
'null'.
Make sure pointer handling code handle these modified keys gracefully
and doesn't trigger a key event and a vibration for the removed key.
Diffstat (limited to 'srcs/juloo.keyboard2/KeyboardData.java')
| -rw-r--r-- | srcs/juloo.keyboard2/KeyboardData.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/srcs/juloo.keyboard2/KeyboardData.java b/srcs/juloo.keyboard2/KeyboardData.java index 81b6870..f0b1d1b 100644 --- a/srcs/juloo.keyboard2/KeyboardData.java +++ b/srcs/juloo.keyboard2/KeyboardData.java @@ -194,6 +194,18 @@ class KeyboardData { return new Key(key0, key1, key2, key3, key4, width * s, shift, edgekeys); } + + public KeyValue getValue(int index) + { + switch (index) + { + case 1: return key1; + case 2: return key2; + case 3: return key3; + case 4: return key4; + default: case 0: return key0; + } + } } public static abstract interface MapKeys extends Function<KeyValue, KeyValue> { } |
