abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/Keyboard2View.java
diff options
context:
space:
mode:
authorJules Aguillon2021-04-18 00:55:31 +0200
committerJules Aguillon2021-04-18 00:55:31 +0200
commitf8bce500ff3f870e6eadae591541a1210e458cff (patch)
tree168adda0641f5f90a29c295cc3f8317db96bacb7 /srcs/juloo.keyboard2/Keyboard2View.java
parent1421bccc7b6588484fcf02517d35c98bbd05f6c4 (diff)
downloadunexpected-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/Keyboard2View.java')
-rw-r--r--srcs/juloo.keyboard2/Keyboard2View.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/srcs/juloo.keyboard2/Keyboard2View.java b/srcs/juloo.keyboard2/Keyboard2View.java
index ccbbb7e..1dbfb87 100644
--- a/srcs/juloo.keyboard2/Keyboard2View.java
+++ b/srcs/juloo.keyboard2/Keyboard2View.java
@@ -83,12 +83,13 @@ public class Keyboard2View extends View
return (paint);
}
- public void setKeyboard(KeyboardData keyboard)
+ public void setKeyboard(KeyboardData kw)
{
+ if (!_config.shouldOfferSwitchingToNextInputMethod)
+ kw = kw.removeKeys(new KeyboardData.RemoveKeysByEvent(KeyValue.EVENT_CHANGE_METHOD));
if (_config.disableAccentKeys)
- _keyboard = keyboard.removeKeys(new KeyboardData.RemoveKeysByFlags(KeyValue.FLAGS_ACCENTS));
- else
- _keyboard = keyboard;
+ kw = kw.removeKeys(new KeyboardData.RemoveKeysByFlags(KeyValue.FLAGS_ACCENTS));
+ _keyboard = kw;
reset();
}