From dfec26a93be8cc3bf605273a49a46223e2551cde Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Mon, 10 Jan 2022 00:27:22 +0100 Subject: Swap the Enter and Action keys when needed When IME_FLAG_NO_ENTER_ACTION is set. --- srcs/juloo.keyboard2/Keyboard2.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'srcs/juloo.keyboard2/Keyboard2.java') diff --git a/srcs/juloo.keyboard2/Keyboard2.java b/srcs/juloo.keyboard2/Keyboard2.java index f54b3fa..20e93de 100644 --- a/srcs/juloo.keyboard2/Keyboard2.java +++ b/srcs/juloo.keyboard2/Keyboard2.java @@ -162,12 +162,15 @@ public class Keyboard2 extends InputMethodService { _config.actionLabel = info.actionLabel.toString(); _config.actionId = info.actionId; + _config.swapEnterActionKey = false; } else { int action = info.imeOptions & EditorInfo.IME_MASK_ACTION; _config.actionLabel = actionLabel_of_imeAction(action); // Might be null _config.actionId = action; + _config.swapEnterActionKey = + (info.imeOptions & EditorInfo.IME_FLAG_NO_ENTER_ACTION) != 0; } } -- cgit v1.2.3