diff options
| author | Jules Aguillon | 2021-04-18 00:55:31 +0200 |
|---|---|---|
| committer | Jules Aguillon | 2021-04-18 00:55:31 +0200 |
| commit | f8bce500ff3f870e6eadae591541a1210e458cff (patch) | |
| tree | 168adda0641f5f90a29c295cc3f8317db96bacb7 /srcs/juloo.keyboard2/KeyboardData.java | |
| parent | 1421bccc7b6588484fcf02517d35c98bbd05f6c4 (diff) | |
| download | unexpected-keyboard-f8bce500ff3f870e6eadae591541a1210e458cff.tar.gz unexpected-keyboard-f8bce500ff3f870e6eadae591541a1210e458cff.zip | |
Hide the input switching key if it's not needed
Android has a new way of switching between input methods and this key
need to be hidden in most cases.
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 000c7e0..c137af2 100644 --- a/srcs/juloo.keyboard2/KeyboardData.java +++ b/srcs/juloo.keyboard2/KeyboardData.java @@ -171,4 +171,16 @@ class KeyboardData return (k == null || (k.getFlags() & _flags) != 0) ? null : k; } } + + public static class RemoveKeysByEvent implements MapKeys + { + private final int _eventCode; + + public RemoveKeysByEvent(int ev) { _eventCode = ev; } + + public KeyValue map(KeyValue k) + { + return (k == null || k.getEventCode() == _eventCode) ? null : k; + } + } } |
