abouttreesummaryrefslogcommitdiff
path: root/srcs/juloo.keyboard2/Config.java
diff options
context:
space:
mode:
authorJules Aguillon2023-06-03 18:35:16 +0200
committerJules Aguillon2023-06-03 18:35:16 +0200
commit59b3341eaf47e95e6bf0ebdb558cef3b5151963b (patch)
treec33467dc20ebcc9ed289ee41b2106cb19265180d /srcs/juloo.keyboard2/Config.java
parent85cdb9b2b5e4a43ace04e97dbfa7350aa84efedc (diff)
downloadunexpected-keyboard-59b3341eaf47e95e6bf0ebdb558cef3b5151963b.tar.gz
unexpected-keyboard-59b3341eaf47e95e6bf0ebdb558cef3b5151963b.zip
Hide the voice typing key if no suitable IM
Implemented similarly to the IM switching key.
Diffstat (limited to 'srcs/juloo.keyboard2/Config.java')
-rw-r--r--srcs/juloo.keyboard2/Config.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/srcs/juloo.keyboard2/Config.java b/srcs/juloo.keyboard2/Config.java
index 9fa6593..f99a140 100644
--- a/srcs/juloo.keyboard2/Config.java
+++ b/srcs/juloo.keyboard2/Config.java
@@ -53,6 +53,7 @@ final class Config
// Dynamically set
public boolean shouldOfferSwitchingToNextInputMethod;
public boolean shouldOfferSwitchingToSecond;
+ public boolean shouldOfferVoiceTyping;
public String actionLabel; // Might be 'null'
public int actionId; // Meaningful only when 'actionLabel' isn't 'null'
public boolean swapEnterActionKey; // Swap the "enter" and "action" keys
@@ -75,6 +76,7 @@ final class Config
// initialized later
shouldOfferSwitchingToNextInputMethod = false;
shouldOfferSwitchingToSecond = false;
+ shouldOfferVoiceTyping = false;
actionLabel = null;
actionId = 0;
swapEnterActionKey = false;
@@ -211,6 +213,8 @@ final class Config
KeyValue.getKeyByName("enter") : action_key;
case SWITCH_SECOND:
return shouldOfferSwitchingToSecond ? key : null;
+ case SWITCH_VOICE_TYPING:
+ return shouldOfferVoiceTyping ? key : null;
}
break;
case Keyevent: