From b7eefd1079095bd574d65317991dca8389d8a44f Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Wed, 28 Feb 2024 23:25:03 +0100 Subject: [PATCH] Add support for gujarati numerals --- srcs/juloo.keyboard2/KeyModifier.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/srcs/juloo.keyboard2/KeyModifier.java b/srcs/juloo.keyboard2/KeyModifier.java index 94f096b..99e7230 100644 --- a/srcs/juloo.keyboard2/KeyModifier.java +++ b/srcs/juloo.keyboard2/KeyModifier.java @@ -103,6 +103,7 @@ public final class KeyModifier case "bengali": return map_char_numpad_bengali; case "devanagari": return map_char_numpad_devanagari; case "persian": return map_char_numpad_persian; + case "gujarati": return map_char_numpad_gujarati; default: return map_char_none; } } @@ -1098,4 +1099,25 @@ public final class KeyModifier } } }; + + private static final Map_char map_char_numpad_gujarati = + new Map_char() { + public String apply(char c) + { + switch (c) + { + case '0': return "૦"; + case '1': return "૧"; + case '2': return "૨"; + case '3': return "૩"; + case '4': return "૪"; + case '5': return "૫"; + case '6': return "૬"; + case '7': return "૭"; + case '8': return "૮"; + case '9': return "૯"; + default: return null; + } + } + }; }