mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-18 22:37:43 +00:00
feat(common): ldml update to WIP cldr data 🙀
- bn-bengali with a basic test - fr-optimise - note: disabling bengali reorders for now, not working properly due to tertiary reordering feat(core): tertiary reorders 🙀 #9707 For: #9916
This commit is contained in:
parent
19c5164449
commit
09411eba33
7 changed files with 652 additions and 1 deletions
|
|
@ -10,8 +10,10 @@
|
|||
tests_from_cldr = [
|
||||
'ja-Latn',
|
||||
'pt-t-k0-abnt2',
|
||||
'fr-t-k0-azerty',
|
||||
# 'fr-t-k0-optimise', (not yet)
|
||||
# 'fr-t-k0-test',
|
||||
'pcm',
|
||||
'bn',
|
||||
]
|
||||
|
||||
tests_without_testdata = [
|
||||
|
|
|
|||
172
resources/standards-data/ldml-keyboards/techpreview/3.0/bn.xml
Normal file
172
resources/standards-data/ldml-keyboards/techpreview/3.0/bn.xml
Normal file
|
|
@ -0,0 +1,172 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboard3 SYSTEM "../dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="bn" conformsTo="techpreview">
|
||||
<!--
|
||||
History:
|
||||
Based on
|
||||
https://github.com/keymanapp/ldml-keyboards-dev/blob/master/keyboards/sil-bengali/bn-t-k0-cldr-phonetic.ldml
|
||||
-->
|
||||
<locales>
|
||||
<locale id="as" />
|
||||
<locale id="syl" />
|
||||
</locales>
|
||||
<version number="1.3.0" />
|
||||
<info name="SIL Bengali-Assamese Phonetic" indicator="bn" layout="QWERTY" />
|
||||
|
||||
<keys>
|
||||
<import base="cldr" path="techpreview/keys-Zyyy-punctuation.xml" />
|
||||
<import base="cldr" path="techpreview/keys-Zyyy-currency.xml" />
|
||||
|
||||
<!-- key names based on https://www.loc.gov/catdir/cpso/romanization/bengali.pdf + Assamese for /wa/ -->
|
||||
|
||||
<!-- UNSHIFTED KEYS -->
|
||||
<!-- E: (top) row -->
|
||||
<key id="candrabindu" output="\u{0981}" /> <!-- n̐ -->
|
||||
<key id="1" output="১" />
|
||||
<key id="2" output="২" />
|
||||
<key id="3" output="৩" />
|
||||
<key id="4" output="৪" />
|
||||
<key id="5" output="৫" />
|
||||
<key id="6" output="৬" />
|
||||
<key id="7" output="৭" />
|
||||
<key id="8" output="৮" />
|
||||
<key id="9" output="৯" />
|
||||
<key id="0" output="০" />
|
||||
<!-- hyphen -->
|
||||
<!-- equal -->
|
||||
|
||||
<!-- D: -->
|
||||
<key id="more" output="\m{q}" /> <!-- 'additional characters' -->
|
||||
<key id="wa" output="ৱ" /> <!-- Assamese-->
|
||||
<key id="e" output="\u{09C7}" />
|
||||
<key id="ra" output="র" />
|
||||
<key id="ta" output="ত" />
|
||||
<key id="sha" output="য" />
|
||||
<key id="u" output="\u{09C1}" />
|
||||
<key id="i" output="\u{09BF}" />
|
||||
<key id="o" output="\u{09CB}" />
|
||||
<key id="pa" output="প" />
|
||||
|
||||
<!-- C: -->
|
||||
<key id="ā" output="\u{09BE}" />
|
||||
<key id="sa" output="স" />
|
||||
<key id="da" output="দ" />
|
||||
<key id="ṭa" output="ট" />
|
||||
<key id="ga" output="গ" />
|
||||
<key id="ha" output="হ" />
|
||||
<key id="ja" output="জ" />
|
||||
<key id="ka" output="ক" />
|
||||
<key id="la" output="ল" />
|
||||
|
||||
<!-- B: -->
|
||||
<key id="śa" output="শ" />
|
||||
<key id="hasant" output="\u{09CD}" />
|
||||
<key id="ca" output="চ" />
|
||||
<key id="ḍa" output="ড" />
|
||||
<key id="ba" output="ব" />
|
||||
<key id="na" output="ন" />
|
||||
<key id="ma" output="ম" />
|
||||
<!-- comma -->
|
||||
<key id="dahri" output="।" />
|
||||
|
||||
|
||||
<!-- SHIFTED KEYS -->
|
||||
<key id="ṃ" output="\u{0982}" />
|
||||
<!-- exclam, etc -->
|
||||
|
||||
<!-- gap -->
|
||||
<key id="ña" output="ঞ" />
|
||||
<key id="ai" output="\u{09C8}" />
|
||||
<key id="ṛ" output="\u{09C3}" />
|
||||
<key id="tha" output="থ" />
|
||||
<key id="ẏa" output="য়" /> <!-- Missing in Keyman version of file-->
|
||||
<key id="ū" output="\u{09C2}" />
|
||||
<key id="ī" output="\u{09C0}" />
|
||||
<key id="au" output="\u{09CC}" />
|
||||
<key id="pha" output="ফ" />
|
||||
|
||||
<key id="lengthener" output="\m{A}" />
|
||||
<key id="sha" output="ষ" />
|
||||
<key id="dha" output="ধ" />
|
||||
<key id="ṭha" output="ঠ" />
|
||||
<key id="gha" output="ঘ" />
|
||||
<!-- gap -->
|
||||
<key id="jha" output="ঝ" />
|
||||
<key id="kha" output="খ" />
|
||||
<!-- gap -->
|
||||
|
||||
<!-- gap -->
|
||||
<key id="vis-hasant" output="\m{X}" />
|
||||
<key id="cha" output="ছ" />
|
||||
<key id="ḍha" output="ঢ" />
|
||||
<key id="bha" output="ভ" />
|
||||
<key id="ṇa" output="ণ" />
|
||||
<key id="ṅa" output="ঙ" />
|
||||
<!-- less-than -->
|
||||
<key id="nukta" output="\u{09BC}" />
|
||||
<!-- question -->
|
||||
|
||||
|
||||
</keys>
|
||||
<layers formId="us">
|
||||
<layer modifiers="none">
|
||||
<row keys="candrabindu 1 2 3 4 5 6 7 8 9 0 hyphen equal" />
|
||||
<row keys="more wa e ra ta sha u i o pa open-square close-square backslash" />
|
||||
<row keys="ā sa da ṭa ga ha ja ka la semi-colon apos" />
|
||||
<row keys="śa hasant ca ḍa ba na ma comma dahri slash" />
|
||||
<row keys="space" />
|
||||
</layer>
|
||||
<layer modifiers="shift">
|
||||
<row
|
||||
keys="ṃ bang at hash dollar percent caret amp asterisk open-paren close-paren underscore plus" />
|
||||
<row keys="gap ña ai ṛ tha ẏa ū ī au pha open-curly close-curly pipe" />
|
||||
<row keys="lengthener sha dha ṭha gha gap jha kha gap colon double-quote" />
|
||||
<row keys="gap vis-hasant cha ḍha bha ṇa ṅa open-angle nukta question" />
|
||||
<row keys="space" />
|
||||
</layer>
|
||||
</layers>
|
||||
|
||||
<transforms type="simple">
|
||||
<transformGroup>
|
||||
<transform from="\u{09C7}\m{A}" to="\u{09CC}" /> <!-- E + lengthener = AU -->
|
||||
<!-- <transform from="\u{09C7}\u{09BE}" to="\u09CB" /> --> <!-- E + O = O This is handled by normalization. -->
|
||||
|
||||
<!-- these suport the 'q' key -->
|
||||
<transform from="\m{q}:" to="\u{0983}" />
|
||||
<transform from="\m{q}L" to="ৡ" />
|
||||
<transform from="\m{q}।" to="॥" />
|
||||
<transform from="\m{q}ড" to="ড়" />
|
||||
<transform from="\m{q}ঢ" to="ঢ়" />
|
||||
<transform from="\m{q}ত" to="ৎ" />
|
||||
<transform from="\m{q}য" to="য়" />
|
||||
<transform from="\m{q}র" to="ৰ" />
|
||||
<transform from="\m{q}ল" to="ঌ" />
|
||||
<transform from="\m{q}\u{09BE}" to="অ" />
|
||||
<transform from="\m{q}\u{09BF}" to="ই" />
|
||||
<transform from="\m{q}\u{09C0}" to="ঈ" />
|
||||
<transform from="\m{q}\u{09C1}" to="উ" />
|
||||
<transform from="\m{q}\u{09C2}" to="ঊ" />
|
||||
<transform from="\m{q}\u{09C3}" to="ৠ" />
|
||||
<transform from="\m{q}\u{09C7}" to="এ" />
|
||||
<transform from="\m{q}\u{09C8}" to="ঐ" />
|
||||
<transform from="\m{q}\u{09CB}" to="ও" />
|
||||
<transform from="\m{q}\u{09CC}" to="ঔ" />
|
||||
<transform from="\m{q}\m{A}" to="আ" />
|
||||
<transform from="\m{q}\m{X}" to="\u{09CD}\u{200C}" /> <!-- virama + zwnj-->
|
||||
</transformGroup>
|
||||
<!-- TODO: document these -->
|
||||
<!-- TODO-LDML: not working, probably due to #9707 -->
|
||||
<!-- <transformGroup>
|
||||
<reorder from="\u{09BC}" tertiary="3"/>
|
||||
<reorder from="\u{09CD}[\u{0980}\u{0985}-\u{098C}\u{098F}\u{0990}\u{0993}-\u{09A8}\u{09AA}-\u{09B0}\u{09B2}\u{09B6}-\u{09B9}\u{09BD}\u{09DC}\u{09DD}\u{09DF}-\u{09E1}\u{09E6}-\u{09F1}\u{09FC}]" order="10" tertiaryBase="true"/>
|
||||
<reorder from="\u{09CD}[\u{200C}\u{200D}][\u{0980}\u{0985}-\u{098C}\u{098F}\u{0990}\u{0993}-\u{09A8}\u{09AA}-\u{09B0}\u{09B2}\u{09B6}-\u{09B9}\u{09BD}\u{09DC}\u{09DD}\u{09DF}-\u{09E1}\u{09E6}-\u{09F1}\u{09FC}]" order="10" tertiaryBase="true"/>
|
||||
<reorder from="\u{09CD}" order="120" tertiaryBase="true"/>
|
||||
<reorder from="[\u{09BF}\u{09C7}\u{09C8}]" order="60"/>
|
||||
<reorder from="[\u{09C1}-\u{09C4}\u{09E2}\u{09E3}]" order="70"/>
|
||||
<reorder from="[\u{09BE}\u{09C0}\u{09CB}\u{09CC}]" order="75"/>
|
||||
<reorder from="\u{0981}" order="85"/>
|
||||
<reorder from="[\u{0982}\u{0983}]" order="95"/>
|
||||
<reorder from="\u{09FE}" order="117"/>
|
||||
</transformGroup> -->
|
||||
</transforms>
|
||||
</keyboard3>
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboardTest3 SYSTEM "../dtd/ldmlKeyboardTest3.dtd">
|
||||
<keyboardTest3 conformsTo="techpreview">
|
||||
<info keyboard="fr-t-k0-optimise.xml" author="Team Keyboard" name="fr-test" />
|
||||
<repertoire name="simple-repertoire" chars="[a b c d e \u{22}]" type="simple" /> <!-- verify that these outputs are all available from simple keys on any layer, for all form factors -->
|
||||
<repertoire name="chars-repertoire" chars="[á é ó]" type="gesture" /> <!-- verify that these outputs are all available from simple or gesture keys on any layer, for touch -->
|
||||
<tests name="key-tests">
|
||||
<test name="key-test">
|
||||
<startContext to="abc\u0022..."/>
|
||||
<!-- tests by pressing key ids -->
|
||||
<keystroke key="s"/>
|
||||
<check result="abc\u0022...s" />
|
||||
<!-- TODO -->
|
||||
</test>
|
||||
</tests>
|
||||
</keyboardTest3>
|
||||
|
|
@ -0,0 +1,200 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboard3 SYSTEM "../dtd/ldmlKeyboard3.dtd">
|
||||
<!--
|
||||
New French
|
||||
-->
|
||||
<keyboard3 locale="fr-t-k0-optimise" conformsTo="techpreview">
|
||||
<version number="1.0.0" />
|
||||
<info author="Team Keyboard" name="French AZERTY optimisé" layout="AZERTY" indicator="FR" />
|
||||
|
||||
<displays>
|
||||
<display output="\u0300" display="${grave}" />
|
||||
<display output="\m{acute}" display="´" />
|
||||
<display output="\m{grave}" display="`" />
|
||||
<display output="\m{umlaut}" display="¨" />
|
||||
<display output="\m{caret}" display="^" />
|
||||
<display output="\m{tilde}" display="~" />
|
||||
</displays>
|
||||
|
||||
<keys>
|
||||
<import base="cldr" path="techpreview/keys-Zyyy-punctuation.xml" />
|
||||
<import base="cldr" path="techpreview/keys-Zyyy-currency.xml" />
|
||||
|
||||
<!-- deadkeys -->
|
||||
<key id="mark-acute" output="\m{acute}" />
|
||||
<key id="mark-breve" output="\m{breve}" />
|
||||
<key id="mark-caret" output="\m{caret}" />
|
||||
<key id="mark-caron" output="\m{caron}" />
|
||||
<key id="mark-cedilla" output="\m{cedilla}" />
|
||||
<key id="mark-circumflex" output="\m{circumflex}" />
|
||||
<key id="mark-comma" output="\m{comma}" />
|
||||
<key id="mark-currency" output="\m{currency}" />
|
||||
<key id="mark-dotabove" output="\m{dotabove}" />
|
||||
<key id="mark-dotbelow" output="\m{dotbelow}" />
|
||||
<key id="mark-doubleacute" output="\m{doubleacute}" />
|
||||
<key id="mark-doublegrave" output="\m{doublegrave}" />
|
||||
<key id="mark-euro" output="\m{euro}" />
|
||||
<key id="mark-grave" output="\m{grave}" />
|
||||
<key id="mark-macron" output="\m{macron}" />
|
||||
<key id="mark-ogonek" output="\m{ogonek}" />
|
||||
<key id="mark-ring" output="\m{ring}" />
|
||||
<key id="mark-scientific" output="\m{scientific}" />
|
||||
<key id="mark-solidus" output="\m{solidus}" />
|
||||
<key id="mark-stroke" output="\m{stroke}" />
|
||||
<key id="mark-submacron" output="\m{submacron}" />
|
||||
<key id="mark-tilde" output="\m{tilde}" />
|
||||
<key id="mark-umlaut" output="\m{umlaut}" />
|
||||
|
||||
|
||||
<!-- extra keys -->
|
||||
<key id="e-grave" output="è" />
|
||||
<key id="e-acute" output="é" />
|
||||
<key id="c-cedilla" output="ç" />
|
||||
<key id="a-acute" output="á" />
|
||||
<key id="a-grave" output="à" />
|
||||
<key id="e-caret" output="ê" />
|
||||
|
||||
<!-- extra symbols -->
|
||||
<key id="bullet" output="•" />
|
||||
<key id="umlaut" output="¨" />
|
||||
<key id="sub-2" output="₂" />
|
||||
<key id="super-2" output="²" longPressKeyIds="sub-2" />
|
||||
<key id="en-dash" output="–" />
|
||||
<key id="plus-minus" output="±" />
|
||||
<key id="vulgar-half" output="½" />
|
||||
<key id="vulgar-quarter" output="¼" />
|
||||
<key id="ellipsis" output="…" />
|
||||
<key id="open-apos" output="‘" />
|
||||
<key id="close-apos" output="’" />
|
||||
<key id="open-g" output="«" />
|
||||
<key id="close-g" output="»" />
|
||||
|
||||
<key id="theta" output="θ" /> <!-- "for Romani" -->
|
||||
<key id="Theta" output="ϴ" /> <!-- "for Romani" -->
|
||||
<key id="tm" output="™" />
|
||||
<key id="open-double" output="“" />
|
||||
<key id="close-double" output="’" />
|
||||
<key id="oe" output="œ" />
|
||||
<key id="Oe" output="Œ" />
|
||||
<key id="registered" output="®" />
|
||||
<key id="minus-sign" output="−" />
|
||||
<key id="ss" output="ß" />
|
||||
<key id="ininity" output="∞" />
|
||||
<key id="division" output="÷" />
|
||||
<key id="less-equal" output="≤" />
|
||||
<key id="greater-equal" output="≥" />
|
||||
<key id="copy" output="©" />
|
||||
<key id="inverse-question" output="¿" />
|
||||
<key id="inverse-bang" output="¡" />
|
||||
<key id="middle-dot" output="•" />
|
||||
<key id="A-grave" output="À" />
|
||||
<key id="E-acute" output="É" />
|
||||
<key id="E-caret" output="Ê" />
|
||||
<key id="em-dash" output="—" />
|
||||
<key id="open-single" output="’" />
|
||||
<key id="close-single" output="’" />
|
||||
<key id="u-grave" output="Ù" />
|
||||
<key id="radix" output="√" />
|
||||
<key id="C-cedilla" output="Ç" />
|
||||
<key id="not-equal" output="±" />
|
||||
|
||||
<key id="infinity" output="∞" />
|
||||
<key id="E-grave" output="È" />
|
||||
<key id="U-grave" output="Ù" />
|
||||
<key id="nb-hyphen" output="‑" />
|
||||
<key id="multiplication" output="×" />
|
||||
<key id="ezh" output="ʒ" />
|
||||
<key id="Ezh" output="Ʒ" />
|
||||
<key id="ae" output="æ" />
|
||||
<key id="Ae" output="Æ" />
|
||||
<key id="permille" output="‰" />
|
||||
<key id="dbl-dagger" output="‡" />
|
||||
<key id="dagger" output="†" />
|
||||
<key id="asym-equal" output="≃" />
|
||||
<key id="Ss" output="ẞ" />
|
||||
</keys>
|
||||
|
||||
<layers formId="iso">
|
||||
<layer modifiers="none">
|
||||
<row keys="at a-grave e-acute e-grave e-caret open-paren close-paren open-apos close-apos open-g close-g apos mark-caret" />
|
||||
<row keys="a z e r t y u i o p hyphen plus" />
|
||||
<row keys="q s d f g h j k l m slash asterisk" />
|
||||
<row keys="open-angle w x c v b n period comma colon semi-colon" />
|
||||
<row keys="space" />
|
||||
</layer>
|
||||
|
||||
<layer modifiers="shift">
|
||||
<row keys="hash 1 2 3 4 5 6 7 8 9 0 double-quote mark-umlaut" />
|
||||
<row keys="A Z E R T Y U I O P en-dash plus-minus" />
|
||||
<row keys="Q S D F G H J K L M backslash vulgar-half" />
|
||||
<row keys="close-angle W X C V B N question bang ellipsis equal" />
|
||||
<row keys="space" />
|
||||
</layer>
|
||||
|
||||
<layer modifiers="alt">
|
||||
<row keys="mark-breve section mark-acute mark-grave amp open-square close-square mark-macron underscore open-double close-double degree mark-caron"/>
|
||||
<row keys="ae pound euro registered open-curly close-curly u-grave mark-dotabove oe percent minus-sign dagger"/>
|
||||
<row keys="theta ss dollar mark-currency mark-scientific mark-euro gap mark-solidus pipe infinity division multiplication"/>
|
||||
<row keys="less-equal ezh copy c-cedilla mark-cedilla mark-stroke mark-tilde inverse-question inverse-bang middle-dot asym-equal"/>
|
||||
<row keys="space" />
|
||||
</layer>
|
||||
|
||||
<layer modifiers="alt shift">
|
||||
<row keys="mark-circumflex A-grave E-acute E-grave E-caret mark-doubleacute mark-doublegrave gap em-dash open-single close-single mark-ring gap"/>
|
||||
<row keys="Ae gap gap gap tm gap U-grave mark-dotbelow Oe permille nb-hyphen dbl-dagger"/>
|
||||
<row keys="Theta Ss gap gap gap mark-submacron gap gap gap gap radix vulgar-quarter"/>
|
||||
<row keys="greater-equal Ezh gap C-cedilla mark-ogonek gap gap gap mark-comma gap not-equal"/>
|
||||
<row keys="space" />
|
||||
</layer>
|
||||
</layers>
|
||||
|
||||
<variables>
|
||||
<!-- spacing accents as string variables -->
|
||||
<string id="grave" value="`" />
|
||||
<string id="caret" value="^" />
|
||||
<string id="umlaut" value="¨" />
|
||||
<string id="tilde" value="~" />
|
||||
|
||||
<!-- sets representing vowels and accented vowels. -->
|
||||
<!-- There's an extra space between the lower and upper case for visual separation -->
|
||||
<!-- but, there are only 10 items in the following four sets -->
|
||||
<set id="vowel" value="a e i o u A E I O U" />
|
||||
<set id="graveVowel" value="à è ì ò ù À È Ì Ò Ù" />
|
||||
<set id="caretVowel" value="â ê î ô û Â Ê Î Ô Û" />
|
||||
<set id="umlautVowel" value="ä ë ï ö ü Ä Ë Ï Ö Ü" />
|
||||
|
||||
<!-- a set containing all spacing accents -->
|
||||
<set id="spacing_accent" value="${grave} ${caret} ${umlaut} ${tilde}" />
|
||||
</variables>
|
||||
|
||||
<transforms type="simple">
|
||||
<transformGroup>
|
||||
<!-- use sets for those that fit neatly into sets -->
|
||||
<transform from="${grave}($[vowel])" to="$[1:graveVowel]" />
|
||||
<transform from="${caret}($[vowel])" to="$[1:caretVowel]" />
|
||||
<transform from="${umlaut}($[vowel])" to="$[1:umlautVowel]" />
|
||||
|
||||
<!-- y also takes umlaut (in this sample) -->
|
||||
<transform from="${umlaut}y" to="ÿ" />
|
||||
|
||||
<!-- tilde is on a subset, not all vowels, + n -->
|
||||
<transform from="${tilde}a" to="ã" />
|
||||
<transform from="${tilde}A" to="Ã" />
|
||||
<transform from="${tilde}n" to="ñ" />
|
||||
<transform from="${tilde}N" to="Ñ" />
|
||||
<transform from="${tilde}o" to="õ" />
|
||||
<transform from="${tilde}O" to="Õ" />
|
||||
|
||||
<!-- accent + space = spacing accent -->
|
||||
<transform from="($[spacing_accent]) " to="$1" />
|
||||
</transformGroup>
|
||||
<transformGroup>
|
||||
<!-- this is a reorder group -->
|
||||
<!-- nod-Lana partial example -->
|
||||
<reorder from="\u1A60" order="127" />
|
||||
<reorder from="\u1A6B" order="42" />
|
||||
<reorder from="[\u1A75-\u1A79]" order="55" />
|
||||
<!-- ... partial example ... -->
|
||||
</transformGroup>
|
||||
</transforms>
|
||||
</keyboard3>
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboardTest3 SYSTEM "../dtd/ldmlKeyboardTest3.dtd">
|
||||
<keyboardTest3 conformsTo="techpreview">
|
||||
<info keyboard="fr-t-k0-test.xml" author="Team Keyboard" name="fr-test" />
|
||||
<repertoire name="simple-repertoire" chars="[a b c d e \u{22}]" type="simple" /> <!-- verify that these outputs are all available from simple keys on any layer, for all form factors -->
|
||||
<repertoire name="chars-repertoire" chars="[á é ó]" type="gesture" /> <!-- verify that these outputs are all available from simple or gesture keys on any layer, for touch -->
|
||||
<tests name="key-tests">
|
||||
<test name="key-test">
|
||||
<startContext to="abc\u{0022}..."/>
|
||||
<!-- tests by pressing key ids -->
|
||||
<keystroke key="s"/>
|
||||
<check result="abc\u{0022}...s" />
|
||||
<keystroke key="t"/>
|
||||
<check result="abc\u{0022}...st" />
|
||||
<keystroke key="u"/>
|
||||
<check result="abc\u{0022}...stu" />
|
||||
<!-- tests by specifying 'to' output char -->
|
||||
<emit to="v"/>
|
||||
<check result="abc\u{0022}...stuv" />
|
||||
</test>
|
||||
</tests>
|
||||
</keyboardTest3>
|
||||
|
|
@ -0,0 +1,213 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboard3 SYSTEM "../dtd/ldmlKeyboard3.dtd">
|
||||
<!--
|
||||
This file is part of the CLDR Keyboard Technical Preview.
|
||||
This is a sample data file.
|
||||
This file is subject to change.
|
||||
Please see https://cldr.unicode.org/index/keyboard-workgroup for the latest information.
|
||||
|
||||
Also NOTE: this is really a test keyboard. CLDR-12026 will be for the real new azerty keyboard
|
||||
-->
|
||||
<keyboard3 locale="fr-t-k0-test" conformsTo="techpreview">
|
||||
<locales>
|
||||
<locale id="br" /> <!-- example of including Breton -->
|
||||
</locales>
|
||||
<!-- 'conformsTo' gives CLDR spec conformance. Distinguishes from prior
|
||||
keyboard formats -->
|
||||
<!-- 'version' element is now optional -->
|
||||
<version number="1.0.0" />
|
||||
<info name="French Test AZERTY" author="Team Keyboard" layout="AZERTY" indicator="FR" />
|
||||
|
||||
<displays>
|
||||
<!-- Note: displays is only used for keycap presentation -->
|
||||
<!-- this example is not required for this keyboard as we use the spacing
|
||||
modifiers -->
|
||||
<display output="\u{0300}" display="${grave}" /> <!-- display combining grave as modifier letter grave ˋ -->
|
||||
<!-- Note: We discussed why the existing displayMap was used for display.
|
||||
rather than adding something closer to the key layout. 1. This way we can
|
||||
tell the renderer what to do. Could be double diacritics, spacing issues,
|
||||
etc. 2. We expect that keys have output. Otherwise the input content is malformed.
|
||||
3. Don't Repeat Yourself : multiple keys (i.e. on different symbol layers)
|
||||
may have the same display. -->
|
||||
|
||||
<!-- Example of a display mapping for a key by id -->
|
||||
<display keyId="symbol" display="@" />
|
||||
<display keyId="numeric" display="123" />
|
||||
<displayOptions baseCharacter="x" />
|
||||
</displays>
|
||||
|
||||
<keys>
|
||||
<import base="cldr" path="techpreview/keys-Zyyy-punctuation.xml" />
|
||||
<import base="cldr" path="techpreview/keys-Zyyy-currency.xml" />
|
||||
|
||||
<!-- switch keys -->
|
||||
<key id="shift" layerId="shift" />
|
||||
<key id="numeric" layerId="numeric" />
|
||||
<key id="symbol" layerId="symbol" />
|
||||
<key id="base" layerId="base" />
|
||||
|
||||
<!--
|
||||
TODO: need discussion
|
||||
<key id="bksp" gap="true" /> -->
|
||||
<key id="extra" gap="true" />
|
||||
<!--
|
||||
TODO: need discussion
|
||||
<key id="enter" to="\u{000A}" />
|
||||
-->
|
||||
<key id="enter" gap="true" />
|
||||
|
||||
<!-- extra keys -->
|
||||
<key id="u-grave" output="ü" />
|
||||
<key id="e-grave" output="é" /> <!-- 2 -->
|
||||
<key id="e-acute" output="è" /> <!-- 7 -->
|
||||
<key id="c-cedilla" output="ç" /> <!-- 9 -->
|
||||
<key id="a-grave" output="à" />
|
||||
<key id="a-acute" output="á" />
|
||||
<key id="a-caret" output="â" />
|
||||
<key id="a-umlaut" output="ä" />
|
||||
<key id="a-tilde" output="ã" />
|
||||
<key id="a-ring" output="å" />
|
||||
<key id="a-caron" output="ā" />
|
||||
|
||||
<key id="A-grave" output="À" /> <!-- 0 -->
|
||||
<key id="A-acute" output="Á" />
|
||||
<key id="A-caret" output="Â" />
|
||||
<key id="A-umlaut" output="Ä" />
|
||||
<key id="A-tilde" output="Ã" />
|
||||
<key id="A-ring" output="Å" />
|
||||
<key id="A-caron" output="Ā" />
|
||||
|
||||
|
||||
<!-- extra symbols -->
|
||||
<key id="bullet" output="•" />
|
||||
<key id="umlaut" output="¨" />
|
||||
<key id="super-2" output="²" multiTapKeyIds="sub-2 2" /> <!-- taps produce: ² ₂ 2 -->
|
||||
<key id="sub-2" output="₂" />
|
||||
|
||||
<!-- note that a-caret is the default-->
|
||||
<key id="a" flickId="a" output="a"
|
||||
longPressKeyIds="a-grave a-caret a-acute a-umlaut a-tilde a-ring a-caron"
|
||||
longPressDefaultKeyId="a-caret" />
|
||||
<!-- note that A-caret is the default-->
|
||||
<key id="A" flickId="b" output="A"
|
||||
longPressKeyIds="A-grave A-caret A-acute A-umlaut a-tilde A-ring A-caron"
|
||||
longPressDefaultKeyId="A-caret" />
|
||||
</keys>
|
||||
|
||||
<flicks>
|
||||
<flick id="b">
|
||||
<flickSegment directions="nw" keyId="A-grave" />
|
||||
<flickSegment directions="nw se" keyId="A-acute" />
|
||||
<flickSegment directions="e" keyId="A-caron" />
|
||||
<flickSegment directions="s" keyId="numeric" /> <!-- layer shifting flick-->
|
||||
</flick>
|
||||
<flick id="a">
|
||||
<flickSegment directions="nw" keyId="a-grave" />
|
||||
<flickSegment directions="nw se" keyId="a-acute" />
|
||||
<flickSegment directions="e" keyId="a-caron" />
|
||||
</flick>
|
||||
</flicks>
|
||||
|
||||
<layers formId="iso">
|
||||
<!-- in DTD: required if conformsTo ≥ 41 -->
|
||||
<layer modifiers="none">
|
||||
<row
|
||||
keys="super-2 amp e-grave double-quote apos open-paren hyphen e-acute underscore c-cedilla a-acute close-paren equal" />
|
||||
<row keys="a z e r t y u i o p caret dollar" />
|
||||
<row keys="q s d f g h j k l m u-grave asterisk" />
|
||||
<row keys="open-angle w x c v b n comma semi-colon colon bang" />
|
||||
<row keys="space" />
|
||||
</layer>
|
||||
|
||||
<layer modifiers="shift">
|
||||
<row keys="1 2 3 4 5 6 7 8 9 0 degree plus" />
|
||||
<row keys="A Z E R T Y U I O P umlaut pound" />
|
||||
<row keys="Q S D F G H J K L M percent micro" />
|
||||
<row keys="close-angle W X C V B N question period slash section" />
|
||||
<row keys="space" />
|
||||
</layer>
|
||||
</layers>
|
||||
|
||||
<layers formId="touch" minDeviceWidth="150">
|
||||
<!-- optional attribute for min physical device size -->
|
||||
<layer id="base">
|
||||
<row keys="a z e r t y u i o p" />
|
||||
<row keys="q s d f g h j k l m" />
|
||||
<row keys="shift gap w x c v b n gap" /> <!--TODO: + bksp -->
|
||||
<row keys="numeric extra space enter" />
|
||||
</layer>
|
||||
|
||||
<layer id="shift">
|
||||
<row keys="A Z E R T Y U I O P" />
|
||||
<row keys="Q S D F G H J K L M" />
|
||||
<row keys="base W X C V B N" /> <!--TODO: + bksp -->
|
||||
<row keys="numeric extra space enter" />
|
||||
</layer>
|
||||
|
||||
<layer id="numeric">
|
||||
<row keys="1 2 3 4 5 6 7 8 9 0" />
|
||||
<row
|
||||
keys="hyphen slash colon semi-colon open-paren close-paren dollar amp at double-quote" />
|
||||
<row keys="symbol period comma question bang double-quote" /> <!--TODO: + bksp -->
|
||||
<row keys="base extra space enter" />
|
||||
</layer>
|
||||
|
||||
<layer id="symbol">
|
||||
<row
|
||||
keys="open-square close-square open-curly close-curly hash percent caret asterisk plus equal" />
|
||||
<row keys="underscore backslash pipe tilde open-angle close-angle euro pound yen bullet" />
|
||||
<row keys="numeric period comma question bang double-quote" /> <!--TODO: + bksp -->
|
||||
<row keys="base extra space enter" />
|
||||
</layer>
|
||||
</layers>
|
||||
|
||||
<variables>
|
||||
<!-- spacing accents as string variables -->
|
||||
<string id="grave" value="`" />
|
||||
<string id="caret" value="^" />
|
||||
<string id="umlaut" value="¨" />
|
||||
<string id="tilde" value="~" />
|
||||
|
||||
<!-- sets representing vowels and accented vowels. -->
|
||||
<!-- There's an extra space between the lower and upper case for visual separation -->
|
||||
<!-- but, there are only 10 items in the following four sets -->
|
||||
<set id="vowel" value="a e i o u A E I O U" />
|
||||
<set id="graveVowel" value="à è ì ò ù À È Ì Ò Ù" />
|
||||
<set id="caretVowel" value="â ê î ô û Â Ê Î Ô Û" />
|
||||
<set id="umlautVowel" value="ä ë ï ö ü Ä Ë Ï Ö Ü" />
|
||||
|
||||
<!-- a set containing all spacing accents -->
|
||||
<set id="spacing_accent" value="${grave} ${caret} ${umlaut} ${tilde}" />
|
||||
</variables>
|
||||
|
||||
<transforms type="simple">
|
||||
<transformGroup>
|
||||
<!-- use sets for those that fit neatly into sets -->
|
||||
<transform from="${grave}($[vowel])" to="$[1:graveVowel]" />
|
||||
<transform from="${caret}($[vowel])" to="$[1:caretVowel]" />
|
||||
<transform from="${umlaut}($[vowel])" to="$[1:umlautVowel]" />
|
||||
|
||||
<!-- y also takes umlaut (in this sample) -->
|
||||
<transform from="${umlaut}y" to="ÿ" />
|
||||
|
||||
<!-- tilde is on a subset, not all vowels, + n -->
|
||||
<transform from="${tilde}a" to="ã" />
|
||||
<transform from="${tilde}A" to="Ã" />
|
||||
<transform from="${tilde}n" to="ñ" />
|
||||
<transform from="${tilde}N" to="Ñ" />
|
||||
<transform from="${tilde}o" to="õ" />
|
||||
<transform from="${tilde}O" to="Õ" />
|
||||
|
||||
<!-- accent + space = spacing accent -->
|
||||
<transform from="($[spacing_accent]) " to="$1" />
|
||||
</transformGroup>
|
||||
<transformGroup>
|
||||
<!-- this is a reorder group -->
|
||||
<!-- nod-Lana partial example -->
|
||||
<reorder from="\u{1A60}" order="127" />
|
||||
<reorder from="\u{1A6B}" order="42" />
|
||||
<reorder from="[\u{1A75}-\u{1A79}]" order="55" />
|
||||
<!-- ... partial example ... -->
|
||||
</transformGroup>
|
||||
</transforms>
|
||||
</keyboard3>
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboardTest3 SYSTEM "../dtd/ldmlKeyboardTest3.dtd">
|
||||
<keyboardTest3 conformsTo="techpreview">
|
||||
<info keyboard="bn.xml" author="Team Keyboard" name="bn-test" />
|
||||
<tests name="tests">
|
||||
<test name="au">
|
||||
<startContext to=""/>
|
||||
<keystroke key="ka"/>
|
||||
<keystroke key="e"/>
|
||||
<keystroke key="lengthener"/>
|
||||
<check result="কৌ" /> <!-- ka + AU -->
|
||||
</test>
|
||||
<test name="greetings">
|
||||
<startContext to="" />
|
||||
<keystroke key="śa"/>
|
||||
<keystroke key="u"/>
|
||||
<keystroke key="bha"/>
|
||||
<keystroke key="e"/>
|
||||
<keystroke key="ca"/>
|
||||
<keystroke key="hasant"/>
|
||||
<keystroke key="cha"/>
|
||||
<keystroke key="ā"/>
|
||||
<check result="শুভেচ্ছা"/>
|
||||
</test>
|
||||
</tests>
|
||||
</keyboardTest3>
|
||||
Loading…
Add table
Reference in a new issue