Add more accented characters to KeyModifier.java (#622)

This commit is contained in:
JapanYoshi 2024-04-25 20:24:52 +09:00 committed by GitHub
parent 94b2ded843
commit 5386541db3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -559,14 +559,19 @@ public final class KeyModifier
switch (c)
{
case 'a': return "á";
case 'c': return "ć";
case 'e': return "é";
case 'i': return "í";
case 'l': return "ĺ";
case 'ń': return "ń";
case 'o': return "ó";
case 'r': return "ŕ";
case 's': return "ś";
case 'u': return "ú";
case 'y': return "ý";
case 'z': return "ź";
// used in Pinyin
case 'ü': return "ǘ";
// Combining diacritic
case 'j':
// Russian vowels
@ -584,15 +589,21 @@ public final class KeyModifier
{
switch (c)
{
case 'a': return "ǎ";
case 'c': return "č";
case 'd': return "ď";
case 'e': return "ě";
case 'i': return "ǐ";
case 'l': return "ľ";
case 'n': return "ň";
case 'o': return "ǒ";
case 'r': return "ř";
case 's': return "š";
case 't': return "ť";
case 'u': return "ǔ";
case 'z': return "ž";
// used in Pinyin
case 'ü': return "ǚ";
default: return map_dead_char(c, '\u02C7');
}
}
@ -605,8 +616,16 @@ public final class KeyModifier
switch (c)
{
case 'c': return "ç";
case 's': return "ş";
case 'd': return "";
case 'e': return "ȩ";
case 'g': return "ģ";
case 'h': return "";
case 'k': return "ķ";
case 'l': return "ļ";
case 'n': return "ņ";
case 'r': return "ŗ";
case 's': return "ş";
case 't': return "ţ";
default: return map_dead_char(c, '\u00B8');
}
}
@ -619,10 +638,16 @@ public final class KeyModifier
switch (c)
{
case 'a': return "â";
case 'c': return "ĉ";
case 'e': return "ê";
case 'g': return "ĝ";
case 'h': return "ĥ";
case 'i': return "î";
case 'j': return "ĵ";
case 'o': return "ô";
case 'ŝ': return "ŝ";
case 'u': return "û";
case 'z': return "";
default: return map_dead_char(c, '\u02C6');
}
}
@ -634,7 +659,26 @@ public final class KeyModifier
{
switch (c)
{
case 'ė': return "ė";
case 'a': return "ȧ";
case 'b': return "";
case 'c': return "ċ";
case 'd': return "";
case 'e': return "ė";
case 'f': return "";
case 'g': return "ġ";
case 'h': return "";
// Turkish ı / İ is handled elsewhere
case 'm': return "";
case 'n': return "";
case 'o': return "ȯ";
case 'p': return "";
case 'r': return "";
case 's': return "";
case 't': return "";
case 'w': return "";
case 'x': return "";
case 'y': return "";
case 'z': return "ż";
default: return map_dead_char(c, '\u02D9');
}
}
@ -651,6 +695,8 @@ public final class KeyModifier
case 'i': return "ì";
case 'o': return "ò";
case 'u': return "ù";
// used in Pinyin
case 'ü': return "ǜ";
default: return map_dead_char(c, '\u02CB');
}
}
@ -665,7 +711,10 @@ public final class KeyModifier
case 'a': return "ā";
case 'e': return "ē";
case 'i': return "ī";
case 'o': return "ō";
case 'u': return "ū";
// used in Pinyin
case 'ü': return "ǖ";
default: return map_dead_char(c, '\u00AF');
}
}
@ -683,6 +732,7 @@ public final class KeyModifier
case 'k': return "ķ";
case 'l': return "ļ";
case 'n': return "ņ";
case 'o': return "ǫ";
case 'u': return "ų";
default: return map_dead_char(c, '\u02DB');
}
@ -709,8 +759,17 @@ public final class KeyModifier
switch (c)
{
case 'a': return "ã";
case 'o': return "õ";
case 'e': return "";
case 'i': return "ĩ";
case 'n': return "ñ";
case 'o': return "õ";
case 'u': return "ũ";
// Vietnamese
case 'ă': return "";
case 'â': return "";
case 'ê': return "";
case 'ơ': return "";
case 'ư': return "";
default: return map_dead_char(c, '\u02DC');
}
}
@ -888,14 +947,17 @@ public final class KeyModifier
{
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 "";
case '.': return "";
default: return null;
}
}
@ -1053,6 +1115,8 @@ public final class KeyModifier
}
};
// Used with Arabic despite the name; called "Hindi numerals" in Arabic
// map_char_numpad_devanagari is used in Hindi
private static final Map_char map_char_numpad_hindu =
new Map_char() {
public String apply(char c)