From 59b3341eaf47e95e6bf0ebdb558cef3b5151963b Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Sat, 3 Jun 2023 18:35:16 +0200 Subject: Hide the voice typing key if no suitable IM Implemented similarly to the IM switching key. --- srcs/juloo.keyboard2/Config.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'srcs/juloo.keyboard2/Config.java') 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: -- cgit v1.2.3