Skip to content

Commit

Permalink
CLDR-17113 kbd: element/attr renaming
Browse files Browse the repository at this point in the history
- layers/@Form > layers/@formid
- key/@flicks > key/@flickId
- key/@switch >  key/@layerId
- key/@to > key/@output
- display/@to > display/@output

- updates to dtd, samples
- drop some old data in tests
  • Loading branch information
srl295 committed Oct 4, 2023
1 parent c1e301d commit 38125c0
Show file tree
Hide file tree
Showing 13 changed files with 195 additions and 204 deletions.
51 changes: 25 additions & 26 deletions keyboards/3.0/fr-t-k0-azerty.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<!-- Note: displays is only used for keycap presentation -->
<!-- this example is not required for this keyboard as we use the spacing
modifiers -->
<display to="\u{0300}" display="${grave}" /> <!-- display combining grave as modifier letter grave ˋ -->
<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,
Expand All @@ -37,10 +37,10 @@
<import base="cldr" path="techpreview/keys-Zyyy-currency.xml" />

<!-- switch keys -->
<key id="shift" switch="shift" />
<key id="numeric" switch="numeric" />
<key id="symbol" switch="symbol" />
<key id="base" switch="base" />
<key id="shift" layerId="shift" />
<key id="numeric" layerId="numeric" />
<key id="symbol" layerId="symbol" />
<key id="base" layerId="base" />

<!--
TODO: need discussion
Expand All @@ -52,40 +52,39 @@
-->
<key id="enter" gap="true" />


<!-- extra keys -->
<key id="u-grave" to="ü" />
<key id="e-grave" to="é" /> <!-- 2 -->
<key id="e-acute" to="è" /> <!-- 7 -->
<key id="c-cedilla" to="ç" /> <!-- 9 -->
<key id="a-acute" to="à" /> <!-- 0 -->
<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-acute" output="à" /> <!-- 0 -->

<!-- extra symbols -->
<key id="bullet" to="" />
<key id="umlaut" to="¨" />
<key id="super-2" to="²" longPress="" />
<key id="bullet" output="" />
<key id="umlaut" output="¨" />
<key id="super-2" output="²" longPress="" />

<!-- test key -->
<key id="a" flicks="a" to="a" longPress="à â á ä ã å ā" />
<key id="a" flickId="a" output="a" longPress="à â á ä ã å ā" />
<!-- test key -->
<key id="A" flicks="b" to="A" longPress="À Á Ä Ã Å Ā" />
<key id="A" flickId="b" output="A" longPress="À Á Ä Ã Å Ā" />
<!-- TODO: all additional maps, hardware and touch -->
</keys>

<flicks>
<flick id="a">
<flickSegment directions="nw" to="\u{1234}" />
<flickSegment directions="nw se" to="\u{FFFF}" />
<flickSegment directions="e" to="\u{FFF0}" />
</flick>
<flick id="b">
<flickSegment directions="nw" to="\u{4567}" />
<flickSegment directions="nw se" to="\u{FFFF}" />
<flickSegment directions="e" to="\u{FFF0}" />
<flickSegment directions="nw" output="\u{4567}" />
<flickSegment directions="nw se" output="\u{FFFF}" />
<flickSegment directions="e" output="\u{FFF0}" />
</flick>
<flick id="a">
<flickSegment directions="nw" output="\u{1234}" />
<flickSegment directions="nw se" output="\u{FFFF}" />
<flickSegment directions="e" output="\u{FFF0}" />
</flick>
</flicks>

<layers form="iso">
<layers formId="iso">
<!-- in DTD: required if conformsTo ≥ 41 -->
<layer modifier="none">
<row
Expand All @@ -105,7 +104,7 @@
</layer>
</layers>

<layers form="touch" minDeviceWidth="150">
<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" />
Expand Down
2 changes: 1 addition & 1 deletion keyboards/3.0/ja-Latn.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<import base="cldr" path="techpreview/keys-Zyyy-currency.xml" />
</keys>

<layers form="jis">
<layers formId="jis">
<layer modifier="none">
<row keys="1 2 3 4 5 6 7 8 9 0 hyphen caret yen" />
<row keys="q w e r t y u i o p at open-square" />
Expand Down
40 changes: 20 additions & 20 deletions keyboards/3.0/mt-t-k0-47key.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,36 +14,36 @@
<import base="cldr" path="techpreview/keys-Zyyy-currency.xml" />

<!-- accent grave -->
<key id="a-grave" to="à" />
<key id="A-grave" to="À" />
<key id="e-grave" to="è" />
<key id="E-grave" to="È" />
<key id="i-grave" to="ì" />
<key id="I-grave" to="Ì" />
<key id="o-grave" to="ò" />
<key id="O-grave" to="Ò" />
<key id="u-grave" to="ù" />
<key id="U-grave" to="Ù" />
<key id="a-grave" output="à" />
<key id="A-grave" output="À" />
<key id="e-grave" output="è" />
<key id="E-grave" output="È" />
<key id="i-grave" output="ì" />
<key id="I-grave" output="Ì" />
<key id="o-grave" output="ò" />
<key id="O-grave" output="Ò" />
<key id="u-grave" output="ù" />
<key id="U-grave" output="Ù" />

<!-- tikka and maqtugha -->
<key id="c-tikka" to="ċ" /> <!-- tikka is a dot -->
<key id="C-tikka" to="Ċ" />
<key id="g-tikka" to="ġ" />
<key id="G-tikka" to="Ġ" />
<key id="h-maqtugha" to="ħ" /> <!-- maqtugħa, i.e. cut -->
<key id="H-maqtugha" to="Ħ" /> <!-- maqtugħa, i.e. cut -->
<key id="z-tikka" to="ż" />
<key id="Z-tikka" to="Ż" />
<key id="c-tikka" output="ċ" /> <!-- tikka is a dot -->
<key id="C-tikka" output="Ċ" />
<key id="g-tikka" output="ġ" />
<key id="G-tikka" output="Ġ" />
<key id="h-maqtugha" output="ħ" /> <!-- maqtugħa, i.e. cut -->
<key id="H-maqtugha" output="Ħ" /> <!-- maqtugħa, i.e. cut -->
<key id="z-tikka" output="ż" />
<key id="Z-tikka" output="Ż" />

<!-- Cedilla -->
<key id="c-cedilla" to="ç" />
<key id="c-cedilla" output="ç" />

<!-- gaps -->
<key id="gap" gap="true" width="1" />
</keys>

<!-- 47-key: MSA 100:2002, Appendix, figure A.1 -->
<layers form="us">
<layers formId="us">
<layer modifier="none">
<row keys="c-tikka 1 2 3 4 5 6 7 8 9 0 hyphen equal" />
<row keys="q w e r t y u i o p g-tikka h-maqtugha z-tikka" />
Expand Down
40 changes: 20 additions & 20 deletions keyboards/3.0/mt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,33 +20,33 @@
<import base="cldr" path="techpreview/keys-Zyyy-currency.xml"/>

<!-- accent grave -->
<key id="a-grave" to="à" />
<key id="A-grave" to="À" />
<key id="e-grave" to="è" />
<key id="E-grave" to="È" />
<key id="i-grave" to="ì" />
<key id="I-grave" to="Ì" />
<key id="o-grave" to="ò" />
<key id="O-grave" to="Ò" />
<key id="u-grave" to="ù" />
<key id="U-grave" to="Ù" />
<key id="a-grave" output="à" />
<key id="A-grave" output="À" />
<key id="e-grave" output="è" />
<key id="E-grave" output="È" />
<key id="i-grave" output="ì" />
<key id="I-grave" output="Ì" />
<key id="o-grave" output="ò" />
<key id="O-grave" output="Ò" />
<key id="u-grave" output="ù" />
<key id="U-grave" output="Ù" />

<!-- tikka and maqtugha -->
<key id="c-tikka" to="ċ" /> <!-- tikka is a dot -->
<key id="C-tikka" to="Ċ" />
<key id="g-tikka" to="ġ" />
<key id="G-tikka" to="Ġ" />
<key id="h-maqtugha" to="ħ" /> <!-- maqtugħa, i.e. cut -->
<key id="H-maqtugha" to="Ħ" /> <!-- maqtugħa, i.e. cut -->
<key id="z-tikka" to="ż" />
<key id="Z-tikka" to="Ż" />
<key id="c-tikka" output="ċ" /> <!-- tikka is a dot -->
<key id="C-tikka" output="Ċ" />
<key id="g-tikka" output="ġ" />
<key id="G-tikka" output="Ġ" />
<key id="h-maqtugha" output="ħ" /> <!-- maqtugħa, i.e. cut -->
<key id="H-maqtugha" output="Ħ" /> <!-- maqtugħa, i.e. cut -->
<key id="z-tikka" output="ż" />
<key id="Z-tikka" output="Ż" />

<!-- Cedilla -->
<key id="c-cedilla" to="ç" />
<key id="c-cedilla" output="ç" />
</keys>

<!-- 48-key -->
<layers form="iso">
<layers formId="iso">
<layer modifier="none">
<row keys="c-tikka 1 2 3 4 5 6 7 8 9 0 hyphen equal" />
<row keys="q w e r t y u i o p g-tikka h-maqtugha" />
Expand Down
18 changes: 9 additions & 9 deletions keyboards/3.0/pcm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@
<keys>
<import base="cldr" path="techpreview/keys-Zyyy-punctuation.xml" />
<import base="cldr" path="techpreview/keys-Zyyy-currency.xml" />
<key id="grave" to="\u{300}" />
<key id="backquote" to="`" />
<key id="acute" to="\u{301}" />
<key id="grave" output="\u{300}" />
<key id="backquote" output="`" />
<key id="acute" output="\u{301}" />

<!-- accented vowels -->
<key id="odot" to="" />
<key id="Odot" to="" />
<key id="edot" to="" />
<key id="Edot" to="" />
<key id="odot" output="" />
<key id="Odot" output="" />
<key id="edot" output="" />
<key id="Edot" output="" />

<!-- currency -->
<key id="naira" to="" />
<key id="naira" output="" />
</keys>

<layers form="iso">
<layers formId="iso">
<layer modifier="none">
<row keys="grave 1 2 3 4 5 6 7 8 9 0 hyphen equal" />
<row keys="acute w e r t y u i o p open-square close-square" />
Expand Down
36 changes: 18 additions & 18 deletions keyboards/3.0/pt-t-k0-abnt2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,34 @@
<version number="0.0.0" />
<info name="Portuguese (Brazil) (ABNT2)" />
<displays>
<display to="\m{acute}" display="´"/>
<display to="\m{grave}" display="`"/>
<display to="\m{umlaut}" display="¨"/>
<display to="\m{caret}" display="^"/>
<display to="\m{tilde}" display="~"/>
<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" />

<!-- TODO: using the proposed deadkey format -->
<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}"/>
<key id="d-acute" output="\m{acute}"/>
<key id="d-grave" output="\m{grave}"/>
<key id="d-umlaut" output="\m{umlaut}"/>
<key id="d-caret" output="\m{caret}"/>
<key id="d-tilde" output="\m{tilde}"/>

<key id="c-cedilla" to="ç" />
<key id="C-cedilla" to="Ç" />
<key id="c-cedilla" output="ç" />
<key id="C-cedilla" output="Ç" />

<key id="super-1" to="¹" />
<key id="super-2" to="²" />
<key id="super-3" to="³" />
<key id="ordinal-feminine" to="ª" />
<key id="ordinal-masculine" to="º" />
<key id="super-1" output="¹" />
<key id="super-2" output="²" />
<key id="super-3" output="³" />
<key id="ordinal-feminine" output="ª" />
<key id="ordinal-masculine" output="º" />
</keys>
<layers form="abnt2">
<layers formId="abnt2">
<layer modifier="none">
<row keys="apos 1 2 3 4 5 6 7 8 9 0 hyphen equal" />
<row keys="q w e r t y u i o p d-acute open-square" />
Expand Down
12 changes: 6 additions & 6 deletions keyboards/dtd/ldmlKeyboard3.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Please view the subcommittee page for the most recent information.
<!--@TECHPREVIEW-->
<!ATTLIST display id NMTOKEN #IMPLIED >
<!--@MATCH:any-->
<!ATTLIST display to CDATA #IMPLIED >
<!ATTLIST display output CDATA #IMPLIED >
<!--@MATCH:any-->
<!--@ALLOWS_UESC-->
<!ATTLIST display display CDATA #REQUIRED >
Expand All @@ -96,11 +96,11 @@ Please view the subcommittee page for the most recent information.
<!--@TECHPREVIEW-->
<!ATTLIST key id NMTOKEN #REQUIRED >
<!--@MATCH:any-->
<!ATTLIST key flicks NMTOKEN #IMPLIED >
<!ATTLIST key flickId NMTOKEN #IMPLIED >
<!--@MATCH:any-->
<!ATTLIST key gap (true) #IMPLIED >
<!--@VALUE-->
<!ATTLIST key to CDATA #IMPLIED >
<!ATTLIST key output CDATA #IMPLIED >
<!--@MATCH:any-->
<!--@VALUE-->
<!--@ALLOWS_UESC-->
Expand All @@ -117,7 +117,7 @@ Please view the subcommittee page for the most recent information.
<!--@ALLOWS_UESC-->
<!ATTLIST key stretch (true) #IMPLIED >
<!--@VALUE-->
<!ATTLIST key switch NMTOKEN #IMPLIED >
<!ATTLIST key layerId NMTOKEN #IMPLIED >
<!--@MATCH:any-->
<!--@VALUE-->
<!ATTLIST key transform (no) #IMPLIED >
Expand All @@ -137,7 +137,7 @@ Please view the subcommittee page for the most recent information.
<!--@TECHPREVIEW-->
<!ATTLIST flickSegment directions NMTOKENS #REQUIRED >
<!--@MATCH:regex/(n|e|s|w|ne|nw|se|sw)([ ]+(n|e|s|w|ne|nw|se|sw))*-->
<!ATTLIST flickSegment to CDATA #REQUIRED >
<!ATTLIST flickSegment output CDATA #REQUIRED >
<!--@MATCH:any-->
<!--@VALUE-->
<!--@ALLOWS_UESC-->
Expand All @@ -158,7 +158,7 @@ Please view the subcommittee page for the most recent information.

<!ELEMENT layers ( import*, layer*, special* ) >
<!--@TECHPREVIEW-->
<!ATTLIST layers form NMTOKEN #REQUIRED >
<!ATTLIST layers formId NMTOKEN #REQUIRED >
<!--@MATCH:any-->
<!ATTLIST layers minDeviceWidth CDATA #IMPLIED >
<!--@MATCH:range/1~999-->
Expand Down
10 changes: 5 additions & 5 deletions keyboards/dtd/ldmlKeyboard3.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
<xs:element name="display">
<xs:complexType>
<xs:attribute name="id" type="xs:NMTOKEN"/>
<xs:attribute name="to"/>
<xs:attribute name="output"/>
<xs:attribute name="display" use="required"/>
</xs:complexType>
</xs:element>
Expand Down Expand Up @@ -175,15 +175,15 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
<xs:element name="key">
<xs:complexType>
<xs:attribute name="id" type="xs:NMTOKEN" use="required"/>
<xs:attribute name="flicks" type="xs:NMTOKEN"/>
<xs:attribute name="flickId" type="xs:NMTOKEN"/>
<xs:attribute name="gap">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="true"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="to"/>
<xs:attribute name="output"/>
<xs:attribute name="longPress"/>
<xs:attribute name="longPressDefault"/>
<xs:attribute name="multiTap"/>
Expand All @@ -194,7 +194,7 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="switch" type="xs:NMTOKEN"/>
<xs:attribute name="layerId" type="xs:NMTOKEN"/>
<xs:attribute name="transform">
<xs:simpleType>
<xs:restriction base="xs:token">
Expand Down Expand Up @@ -293,7 +293,7 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
<xs:element maxOccurs="unbounded" minOccurs="0" ref="layer"/>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="special"/>
</xs:sequence>
<xs:attribute name="form" type="xs:NMTOKEN" use="required"/>
<xs:attribute name="formId" type="xs:NMTOKEN" use="required"/>
<xs:attribute name="minDeviceWidth"/>
</xs:complexType>
</xs:element>
Expand Down
Loading

0 comments on commit 38125c0

Please sign in to comment.