Skip to content

Commit

Permalink
CLDR-12026 kbd: fr optimisé work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
srl295 committed Aug 25, 2023
1 parent 1f42ec7 commit 1bde943
Showing 1 changed file with 61 additions and 22 deletions.
83 changes: 61 additions & 22 deletions keyboards/3.0/fr-t-k0-optimise.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,32 @@
<import base="cldr" path="techpreview/keys-Zyyy-currency.xml" />

<!-- deadkeys -->
<key id="d-acute" to="\m{acute}"/>
<key id="d-grave" to="\m{grave}"/>
<key id="d-umlaut" to="\m{umlaut}"/>
<key id="d-caret" to="\m{caret}"/>
<key id="d-tilde" to="\m{tilde}"/>

<!-- extra keys -->
<key id="mark-acute" to="\m{acute}" />
<key id="mark-breve" to="\m{breve}" />
<key id="mark-caret" to="\m{caret}" />
<key id="mark-caron" to="\m{caron}" />
<key id="mark-cedilla" to="\m{cedilla}" />
<key id="mark-circumflex" to="\m{circumflex}" />
<key id="mark-comma" to="\m{comma}" />
<key id="mark-currency" to="\m{currency}" />
<key id="mark-dotabove" to="\m{dotabove}" />
<key id="mark-dotbelow" to="\m{dotbelow}" />
<key id="mark-doubleacute" to="\m{doubleacute}" />
<key id="mark-doublegrave" to="\m{doublegrave}" />
<key id="mark-euro" to="\m{euro}" />
<key id="mark-grave" to="\m{grave}" />
<key id="mark-macron" to="\m{macron}" />
<key id="mark-ogonek" to="\m{ogonek}" />
<key id="mark-ring" to="\m{ring}" />
<key id="mark-scientific" to="\m{scientific}" />
<key id="mark-solidus" to="\m{solidus}" />
<key id="mark-stroke" to="\m{stroke}" />
<key id="mark-submacron" to="\m{submacron}" />
<key id="mark-tilde" to="\m{tilde}" />
<key id="mark-umlaut" to="\m{umlaut}" />


<!-- extra keys -->
<key id="u-grave" to="ü" />
<key id="e-grave" to="è" />
<key id="e-acute" to="é" />
Expand All @@ -47,7 +66,7 @@
<key id="a-grave" to="à" />
<key id="e-caret" to="ê" />

<!-- extra symbols -->
<!-- extra symbols -->
<key id="bullet" to="" />
<key id="umlaut" to="¨" />
<key id="super-2" to="²" longPress="" />
Expand All @@ -61,73 +80,93 @@
<key id="open-g" to="«" />
<key id="close-g" to="»" />

<key id="theta" to="θ"/> <!-- "for Romani" -->
<key id="Theta" to="ϴ"/> <!-- "for Romani" -->


</keys>

<layers form="iso">
<layer modifier="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 d-caret" />
<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 modifier="shift">
<row keys="hash 1 2 3 4 5 6 7 8 9 0 double-quote d-umlaut" />
<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 modifier="alt">
<row keys="mark-breve section mark-acute mark-grave ampersand 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 modifier="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 -->
<!-- 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 -->
<!-- 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 -->
<!-- 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 -->
<!-- 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) -->
<!-- y also takes umlaut (in this sample) -->
<transform from="${umlaut}y" to="ÿ" />

<!-- tilde is on a subset, not all vowels, + n -->
<!-- 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 -->
<!-- accent + space = spacing accent -->
<transform from="($[spacing_accent]) " to="$1" />
</transformGroup>
<transformGroup>
<!-- this is a reorder group -->
<!-- nod-Lana partial example -->
<!-- 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 ... -->
<!-- ... partial example ... -->
</transformGroup>
</transforms>
</keyboard>

0 comments on commit 1bde943

Please sign in to comment.