forked from extern/Unexpected-Keyboard
Vietnamese keyboard (#291)
Added missing accent (horn, hook, dot below) Added layout Added accent font svg (by modified existing accent)
This commit is contained in:
parent
72249b8a42
commit
b54f9c5797
@ -14,6 +14,7 @@
|
||||
<item>qwerty_hu</item>
|
||||
<item>qwerty_tr</item>
|
||||
<item>qwerty_pl</item>
|
||||
<item>qwerty_vi</item>
|
||||
<item>ru_jcuken</item>
|
||||
<item>qwertz</item>
|
||||
<item>qwertz_cs</item>
|
||||
@ -46,6 +47,7 @@
|
||||
<item>QWERTY (Hungarian)</item>
|
||||
<item>QWERTY (Türkçe)</item>
|
||||
<item>QWERTY (Polski)</item>
|
||||
<item>QWERTY (Vietnamese)</item>
|
||||
<item>ЙЦУКЕН (Русский)</item>
|
||||
<item>QWERTZ</item>
|
||||
<item>QWERTZ (Czech)</item>
|
||||
|
@ -25,4 +25,5 @@
|
||||
<subtype android:label="%s" android:languageTag="cs" android:imeSubtypeLocale="cs_CZ" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwertz_cs,extra_keys=a|accent_cedille|accent_circonflexe"/>
|
||||
<subtype android:label="%s" android:languageTag="el" android:imeSubtypeLocale="el" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwerty_el,extra_keys=£|€"/>
|
||||
<subtype android:label="%s" android:languageTag="sk" android:imeSubtypeLocale="sk_SK" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwertz_sk,extra_keys=é|ě|ŕ|ř|ť|ž|ü|ú|ů|í|ö|ó|ô|á|ä|ś|š|ď|ĺ|ľ|ý|č|ň"/>
|
||||
<subtype android:label="%s" android:languageTag="vi" android:imeSubtypeLocale="vi_VN" android:imeSubtypeMode="keyboard" android:isAsciiCapable="true" android:imeSubtypeExtraValue="default_layout=qwerty_vi"/>
|
||||
</input-method>
|
||||
|
37
res/xml/qwerty_vi.xml
Normal file
37
res/xml/qwerty_vi.xml
Normal file
@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<keyboard>
|
||||
<row>
|
||||
<key key0="q" key1="~" key2="1" key3="`" key4="esc"/>
|
||||
<key key0="w" key1="accent_horn" key2="2" key3="\@"/>
|
||||
<key key0="e" key1="!" key2="3" key3="\#" key4="ê"/>
|
||||
<key key0="r" key2="4" key3="$" key1="accent_hook_above"/>
|
||||
<key key0="t" key2="5" key3="%"/>
|
||||
<key key0="y" key2="6" key3="^"/>
|
||||
<key key0="u" key2="7" key3="&"/>
|
||||
<key key0="i" key2="8" key3="*"/>
|
||||
<key key0="o" key1="ô" key2="9" key3="(" key4=")"/>
|
||||
<key key0="p" key2="0" key3="f11_placeholder" key4="f12_placeholder"/>
|
||||
</row>
|
||||
<row>
|
||||
<key shift="0.5" key0="a" key1="tab" key2="ă" key3="â"/>
|
||||
<key key0="s" key1="accent_aigu"/>
|
||||
<key key0="d" key1="accent_bar" key2="₫" key3="đ"/>
|
||||
<key key0="f" key1="accent_grave"/>
|
||||
<key key0="g" key2="-" key3="_"/>
|
||||
<key key0="h" key2="=" key3="+"/>
|
||||
<key key0="j" key1="accent_dot_below" key3="{" key4="}"/>
|
||||
<key key0="k" key3="[" key4="]"/>
|
||||
<key key0="l" key2="|" key3="\"/>
|
||||
</row>
|
||||
<row>
|
||||
<key width="1.5" key0="shift" key2="loc capslock"/>
|
||||
<key key0="z"/>
|
||||
<key key0="x" key1="accent_tilde"/>
|
||||
<key key0="c" key2="<" key3="."/>
|
||||
<key key0="v" key2=">" key3=","/>
|
||||
<key key0="b" key2="\?" key3="/"/>
|
||||
<key key0="n" key2=":" key3=";"/>
|
||||
<key key0="m" key2=""" key3="'"/>
|
||||
<key width="1.5" key0="backspace" key2="delete"/>
|
||||
</row>
|
||||
</keyboard>
|
@ -40,6 +40,9 @@
|
||||
<juloo.keyboard2.ExtraKeyCheckBoxPreference app:index="30"/>
|
||||
<juloo.keyboard2.ExtraKeyCheckBoxPreference app:index="31"/>
|
||||
<juloo.keyboard2.ExtraKeyCheckBoxPreference app:index="32"/>
|
||||
<juloo.keyboard2.ExtraKeyCheckBoxPreference app:index="33"/>
|
||||
<juloo.keyboard2.ExtraKeyCheckBoxPreference app:index="34"/>
|
||||
<juloo.keyboard2.ExtraKeyCheckBoxPreference app:index="35"/>
|
||||
</PreferenceScreen>
|
||||
<ListPreference android:key="numpad_layout" android:title="@string/pref_numpad_layout" android:summary="%s" android:defaultValue="high_first" android:entries="@array/pref_numpad_layout_entries" android:entryValues="@array/pref_numpad_layout_values"/>
|
||||
</PreferenceCategory>
|
||||
|
@ -357,6 +357,7 @@ final class Config
|
||||
case "qwerty_sv_se": id = R.xml.qwerty_sv_se; break;
|
||||
case "qwerty_tr": id = R.xml.qwerty_tr; break;
|
||||
case "qwerty_pl": id = R.xml.qwerty_pl; break;
|
||||
case "qwerty_vi": id = R.xml.qwerty_vi; break;
|
||||
case "qwertz": id = R.xml.qwertz; break;
|
||||
case "qwertz_cs": id = R.xml.qwertz_cs; break;
|
||||
case "qwertz_de": id = R.xml.qwertz_de; break;
|
||||
|
@ -31,6 +31,9 @@ public class ExtraKeyCheckBoxPreference extends CheckBoxPreference
|
||||
"accent_breve",
|
||||
"accent_slash",
|
||||
"accent_bar",
|
||||
"accent_dot_below",
|
||||
"accent_hook_above",
|
||||
"accent_horn",
|
||||
"€",
|
||||
"ß",
|
||||
"£",
|
||||
|
@ -60,6 +60,9 @@ class KeyModifier
|
||||
case SLASH: return apply_map_char(k, map_char_slash);
|
||||
case BAR: return apply_map_char(k, map_char_bar);
|
||||
case ARROW_RIGHT: return apply_combining(k, "\u20D7");
|
||||
case DOT_BELOW: return apply_map_char(k, map_char_dot_below);
|
||||
case HORN: return apply_map_char(k, map_char_horn);
|
||||
case HOOK_ABOVE: return apply_map_char(k, map_char_hook_above);
|
||||
default: return k;
|
||||
}
|
||||
}
|
||||
@ -570,4 +573,62 @@ class KeyModifier
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private static final Map_char map_char_dot_below =
|
||||
new Map_char() {
|
||||
public char apply(char c)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case 'a': return 'ạ';
|
||||
case 'ă': return 'ặ';
|
||||
case 'â': return 'ậ';
|
||||
case 'e': return 'ẹ';
|
||||
case 'ê': return 'ệ';
|
||||
case 'i': return 'ị';
|
||||
case 'o': return 'ọ';
|
||||
case 'ô': return 'ộ';
|
||||
case 'ơ': return 'ợ';
|
||||
case 'u': return 'ụ';
|
||||
case 'ư': return 'ự';
|
||||
case 'y': return 'ỵ';
|
||||
default: return c;
|
||||
}
|
||||
}
|
||||
};
|
||||
private static final Map_char map_char_horn =
|
||||
new Map_char() {
|
||||
public char apply(char c)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case 'o': return 'ơ';
|
||||
case 'u': return 'ư';
|
||||
default: return c;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private static final Map_char map_char_hook_above =
|
||||
new Map_char() {
|
||||
public char apply(char c)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case 'a': return 'ả';
|
||||
case 'ă': return 'ẳ';
|
||||
case 'â': return 'ẩ';
|
||||
case 'e': return 'ẻ';
|
||||
case 'ê': return 'ể';
|
||||
case 'i': return 'ỉ';
|
||||
case 'o': return 'ỏ';
|
||||
case 'ô': return 'ổ';
|
||||
case 'ơ': return 'ở';
|
||||
case 'u': return 'ủ';
|
||||
case 'ư': return 'ử';
|
||||
case 'y': return 'ỷ';
|
||||
default: return c;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
package juloo.keyboard2;
|
||||
|
||||
import android.view.KeyCharacterMap;
|
||||
import android.view.KeyEvent;
|
||||
import java.util.HashMap;
|
||||
|
||||
@ -30,12 +29,15 @@ final class KeyValue
|
||||
META,
|
||||
DOUBLE_AIGU,
|
||||
DOT_ABOVE,
|
||||
DOT_BELOW,
|
||||
GRAVE,
|
||||
AIGU,
|
||||
CIRCONFLEXE,
|
||||
TILDE,
|
||||
CEDILLE,
|
||||
TREMA,
|
||||
HORN,
|
||||
HOOK_ABOVE,
|
||||
SUPERSCRIPT,
|
||||
SUBSCRIPT,
|
||||
RING,
|
||||
@ -310,6 +312,9 @@ final class KeyValue
|
||||
case "accent_arrow_right": return diacritic(0x5D, Modifier.ARROW_RIGHT);
|
||||
case "accent_breve": return diacritic(0x5E, Modifier.BREVE);
|
||||
case "accent_bar": return diacritic(0x5F, Modifier.BAR);
|
||||
case "accent_dot_below": return diacritic(0x60, Modifier.DOT_BELOW);
|
||||
case "accent_horn": return diacritic(0x61, Modifier.HORN);
|
||||
case "accent_hook_above": return diacritic(0x62, Modifier.HOOK_ABOVE);
|
||||
case "superscript": return modifierKey("Sup", Modifier.SUPERSCRIPT, 0);
|
||||
case "subscript": return modifierKey("Sub", Modifier.SUBSCRIPT, 0);
|
||||
case "ordinal": return modifierKey("Ord", Modifier.ORDINAL, 0);
|
||||
|
1
srcs/special_font/60.svg
Normal file
1
srcs/special_font/60.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-20 0 1168 2048"><path fill="currentColor" d="m931.256 1557.78-69.314-69.314Q749.47 1574.78 612.15 1586.55v99.395q176.555-11.772 319.106-128.166zm-414.577 28.77q-133.396-10.462-249.792-100.701 0 1.309-71.93 74.545l2.616-2.615q142.554 116.396 319.106 128.166zm-319.107-171.321q-90.24-103.316-107.24-245.867H-9.062q17.002 181.786 137.32 319.104l-6.539 5.23 3.923-2.614 41.85-43.158q30.08-31.387 30.08-32.695zm940.318-245.868h-99.394q-17 141.242-107.239 248.483l69.314 70.62q120.318-137.318 137.319-319.103zm0-96.778q-14.386-189.633-129.474-326.953l-69.314 70.622q86.316 111.164 99.394 256.33zM189.726 818.867h.001q-86.315 107.239-99.394 253.716H-9.06Q4.017 882.95 119.104 745.63l-3.923-3.924q-1.308 0 74.545 77.16zm749.377-142.552Q792.627 552.073 612.151 540.3v99.394q139.935 11.77 257.639 105.935zM516.679 540.303q-180.478 11.77-326.953 136.013l69.314 69.314q117.703-90.238 257.64-105.933v-99.394zM648 1838H430v201h218z"/></svg>
|
After Width: | Height: | Size: 976 B |
1
srcs/special_font/61.svg
Normal file
1
srcs/special_font/61.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1168 2048"><path d="m931.256 1839.834-69.314-69.314q-112.472 86.315-249.792 98.086V1968q176.555-11.771 319.106-128.166zm-414.577 28.77q-133.396-10.462-249.792-100.7 0 1.308-71.93 74.544l2.616-2.615q142.554 116.396 319.106 128.166v-99.395zm-319.107-171.32q-90.24-103.317-107.24-245.868H-9.062q17.001 181.786 137.32 319.104l-6.539 5.232 3.923-2.616 41.85-43.158q30.08-31.387 30.08-32.695zm940.318-245.869h-99.394q-17 141.242-107.239 248.483l69.314 70.621q120.318-137.319 137.319-319.104zm0-96.778q-14.386-189.633-129.474-326.953l-69.314 70.622q86.316 111.164 99.394 256.331h99.394zm-948.164-253.716h.001q-86.315 107.24-99.394 253.716H-9.06q13.078-189.633 128.165-326.953l-3.923-3.924q-1.308 0 74.545 77.161zM939.103 958.37Q792.627 834.127 612.151 822.355v99.395q139.935 11.77 257.639 105.934ZM516.679 822.357Q336.201 834.128 189.726 958.37l69.314 69.314q117.703-90.238 257.64-105.933v-99.394zM792 831.054q70-52 109.5-99.5t39.5-101.5q0-42-22.5-66t-73.5-24q-27 0-50 7.5t-49 18.5l-33-123q36-19 79.5-31.5t103.5-12.5q95 0 155.5 55t60.5 154q0 80-60.5 152t-187.5 128Z"/></svg>
|
After Width: | Height: | Size: 1.1 KiB |
1
srcs/special_font/62.svg
Normal file
1
srcs/special_font/62.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-20 0 1168 2048"><path fill="currentColor" d="m931.256 1851.834-69.314-69.314q-112.472 86.315-249.792 98.086V1980q176.555-11.771 319.106-128.166zm-414.577 28.77q-133.396-10.462-249.792-100.7 0 1.308-71.93 74.544l2.616-2.615q142.554 116.396 319.106 128.166v-99.395zm-319.107-171.32q-90.24-103.317-107.24-245.868H-9.062q17.001 181.786 137.32 319.104l-6.539 5.232 3.923-2.616 41.85-43.158q30.08-31.387 30.08-32.695zm940.318-245.869h-99.394q-17 141.242-107.239 248.483l69.314 70.621q120.318-137.319 137.319-319.104zm0-96.778q-14.386-189.633-129.474-326.953l-69.314 70.622q86.316 111.164 99.394 256.331h99.394zm-948.164-253.716h.001q-86.315 107.24-99.394 253.716H-9.06q13.078-189.633 128.165-326.953l-3.923-3.924q-1.308 0 74.545 77.161zM939.103 970.37Q792.627 846.127 612.151 834.355v99.395q139.935 11.77 257.639 105.934ZM516.679 834.357Q336.201 846.128 189.726 970.37l69.314 69.314q117.703-90.238 257.64-105.933v-99.394zM623 840.054l-12-52q65-11 108-52t43-121q0-96-79-153t-226-57l-7 109q72 0 116 24.5t44 73.5q0 48-36 67t-123 26l32 135z"/></svg>
|
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
Loading…
Reference in New Issue
Block a user