From 9fb7f743e0d7bc73ac53c836dd9b3d187b19510c Mon Sep 17 00:00:00 2001 From: Alex Burdusel Date: Sun, 21 Nov 2021 21:39:20 +0200 Subject: [PATCH] Add romanian diacritics --- .../com/genymobile/scrcpy/KeyComposition.java | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/com/genymobile/scrcpy/KeyComposition.java b/server/src/main/java/com/genymobile/scrcpy/KeyComposition.java index 2f2835c952..aa02037e72 100644 --- a/server/src/main/java/com/genymobile/scrcpy/KeyComposition.java +++ b/server/src/main/java/com/genymobile/scrcpy/KeyComposition.java @@ -15,9 +15,11 @@ */ public final class KeyComposition { - private static final String KEY_DEAD_GRAVE = "\u0300"; private static final String KEY_DEAD_ACUTE = "\u0301"; + private static final String KEY_DEAD_BREVE = "\u0306"; // ă Ă private static final String KEY_DEAD_CIRCUMFLEX = "\u0302"; + private static final String KEY_DEAD_COMMA_BELOW = "\u0326"; // ș Ș ț Ț + private static final String KEY_DEAD_GRAVE = "\u0300"; private static final String KEY_DEAD_TILDE = "\u0303"; private static final String KEY_DEAD_UMLAUT = "\u0308"; @@ -51,6 +53,14 @@ private static String umlaut(char c) { return KEY_DEAD_UMLAUT + c; } + private static String commaBelow(char c) { + return KEY_DEAD_COMMA_BELOW + c; + } + + private static String breve(char c) { + return KEY_DEAD_BREVE + c; + } + private static Map createDecompositionMap() { Map map = new HashMap<>(); map.put('À', grave('A')); @@ -169,6 +179,14 @@ private static Map createDecompositionMap() { map.put('ẍ', umlaut('x')); map.put('ẗ', umlaut('t')); + map.put('Ă', breve('A')); + map.put('ă', breve('a')); + + map.put('Ș', commaBelow('S')); + map.put('ș', commaBelow('s')); + map.put('Ț', commaBelow('T')); + map.put('ț', commaBelow('t')); + return map; } }