Skip to content

Commit

Permalink
CLDR-17113 kbd shuffle element deck chairs
Browse files Browse the repository at this point in the history
- longPress, multiTap now use a new keyList id
- keyList is a list of keys, has a default key
- flickSegment now uses a keyId instead of output

This means that each part of longPress, flick, and multiTap can:
- have a <display> customization
- perform a layer switch if desired
  • Loading branch information
srl295 committed Oct 9, 2023
1 parent c386a76 commit a1a8612
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 27 deletions.
2 changes: 0 additions & 2 deletions common/supplemental/attributeValueValidity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,6 @@
<attributeValues dtds='ldml' elements='relativeTimePattern' attributes='count' type='localeSpecific'>pluralOrdinal</attributeValues>
<attributeValues dtds='ldml' elements='unitPattern' attributes='count' type='localeSpecific'>pluralOrdinal</attributeValues>
<attributeValues dtds='keyboard3' elements='keyboard3' attributes='locale' type='TODO'></attributeValues>
<!-- <attributeValues dtds='keyboard3' elements='map' attributes='longPress' type='TODO'></attributeValues>
<attributeValues dtds='keyboard3' elements='map' attributes='to' type='TODO'></attributeValues> -->
<attributeValues dtds='keyboard3' elements='info' attributes='name' type='TODO'></attributeValues>
<attributeValues dtds='keyboard3' elements='transform' attributes='from' type='TODO'></attributeValues>
<attributeValues dtds='keyboard3' elements='transform' attributes='to' type='TODO'></attributeValues>
Expand Down
44 changes: 34 additions & 10 deletions keyboards/3.0/fr-t-k0-azerty.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,30 +61,54 @@
<key id="e-grave" output="é" /> <!-- 2 -->
<key id="e-acute" output="è" /> <!-- 7 -->
<key id="c-cedilla" output="ç" /> <!-- 9 -->
<key id="a-acute" output="à" /> <!-- 0 -->
<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="ā" />

<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="²" longPress="" />
<key id="super-2" output="²" longPressKeyListId="sub-2" multiTapKeyListId="list-2" />
<key id="sub-2" output="" />

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

<keyLists>
<keyList id="sub-2" keyIds="sub-2" />
<keyList id="list-2" keyIds="2 super-2 sub-2" />
<keyList id="lower-a" defaultKeyId="a" keyIds="a-grave a-caret a-acute a-umlaut a-tilde a-ring a-caron" />
<keyList id="upper-a" defaultKeyId="A" keyIds="A-grave A-caret A-acute A-umlaut A-tilde A-ring A-caron" />
</keyLists>

<flicks>
<flick id="b">
<flickSegment directions="nw" output="\u{4567}" />
<flickSegment directions="nw se" output="\u{FFFF}" />
<flickSegment directions="e" output="\u{FFF0}" />
<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" output="\u{1234}" />
<flickSegment directions="nw se" output="\u{FFFF}" />
<flickSegment directions="e" output="\u{FFF0}" />
<flickSegment directions="nw" keyId="a-grave" />
<flickSegment directions="nw se" keyId="a-acute" />
<flickSegment directions="e" keyId="a-caron" />
</flick>
</flicks>

Expand Down
28 changes: 18 additions & 10 deletions keyboards/dtd/ldmlKeyboard3.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The CLDR Keyboard Subcommittee is currently developing major changes to the CLDR
Please view the subcommittee page for the most recent information.
<https://cldr.unicode.org/index/keyboard-workgroup> -->

<!ELEMENT keyboard3 ( import*, locales?, version?, info, settings?, displays?, keys?, flicks?, forms?, layers*, variables?, transforms*, special* ) >
<!ELEMENT keyboard3 ( import*, locales?, version?, info, settings?, displays?, keys?, keyLists?, flicks?, forms?, layers*, variables?, transforms*, special* ) >
<!--@TECHPREVIEW-->
<!ATTLIST keyboard3 locale CDATA #REQUIRED >
<!--@MATCH:validity/bcp47-wellformed-->
Expand Down Expand Up @@ -104,17 +104,12 @@ Please view the subcommittee page for the most recent information.
<!--@MATCH:any-->
<!--@VALUE-->
<!--@ALLOWS_UESC-->
<!ATTLIST key longPress CDATA #IMPLIED >
<!ATTLIST key longPressKeyListId NMTOKEN #IMPLIED >
<!--@MATCH:any-->
<!--@VALUE-->
<!--@ALLOWS_UESC-->
<!ATTLIST key longPressDefault CDATA #IMPLIED >
<!ATTLIST key multiTapKeyListId NMTOKEN #IMPLIED >
<!--@MATCH:any-->
<!--@VALUE-->
<!--@ALLOWS_UESC-->
<!ATTLIST key multiTap CDATA #IMPLIED >
<!--@VALUE-->
<!--@ALLOWS_UESC-->
<!ATTLIST key stretch (true) #IMPLIED >
<!--@VALUE-->
<!ATTLIST key layerId NMTOKEN #IMPLIED >
Expand All @@ -126,6 +121,20 @@ Please view the subcommittee page for the most recent information.
<!--@MATCH:range/0.01~100.0-->
<!--@VALUE-->

<!ELEMENT keyLists ( import*, keyList*, special* ) >
<!--@TECHPREVIEW-->

<!ELEMENT keyList EMPTY >
<!--@TECHPREVIEW-->
<!ATTLIST keyList id NMTOKEN #REQUIRED >
<!--@MATCH:any-->
<!ATTLIST keyList keyIds NMTOKENS #REQUIRED >
<!--@MATCH:any-->
<!--@VALUE-->
<!ATTLIST keyList defaultKeyId NMTOKEN #IMPLIED >
<!--@MATCH:any-->
<!--@VALUE-->

<!ELEMENT flicks ( import*, flick*, special* ) >

<!ELEMENT flick ( flickSegment+, special* ) >
Expand All @@ -137,10 +146,9 @@ 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 output CDATA #REQUIRED >
<!ATTLIST flickSegment keyId NMTOKEN #REQUIRED >
<!--@MATCH:any-->
<!--@VALUE-->
<!--@ALLOWS_UESC-->

<!ELEMENT forms ( import*, form*, special* ) >
<!--@TECHPREVIEW-->
Expand Down
28 changes: 23 additions & 5 deletions keyboards/dtd/ldmlKeyboard3.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
<xs:element minOccurs="0" ref="settings"/>
<xs:element minOccurs="0" ref="displays"/>
<xs:element minOccurs="0" ref="keys"/>
<xs:element minOccurs="0" ref="keyLists"/>
<xs:element minOccurs="0" ref="flicks"/>
<xs:element minOccurs="0" ref="forms"/>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="layers"/>
Expand Down Expand Up @@ -184,9 +185,8 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
</xs:simpleType>
</xs:attribute>
<xs:attribute name="output"/>
<xs:attribute name="longPress"/>
<xs:attribute name="longPressDefault"/>
<xs:attribute name="multiTap"/>
<xs:attribute name="longPressKeyListId" type="xs:NMTOKEN"/>
<xs:attribute name="multiTapKeyListId" type="xs:NMTOKEN"/>
<xs:attribute name="stretch">
<xs:simpleType>
<xs:restriction base="xs:token">
Expand Down Expand Up @@ -222,6 +222,25 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file



<xs:element name="keyLists">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="import"/>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="keyList"/>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="special"/>
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:element name="keyList">
<xs:complexType>
<xs:attribute name="id" type="xs:NMTOKEN" use="required"/>
<xs:attribute name="keyIds" type="xs:NMTOKENS" use="required"/>
<xs:attribute name="defaultKeyId" type="xs:NMTOKEN"/>
</xs:complexType>
</xs:element>





Expand Down Expand Up @@ -249,14 +268,13 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
<xs:element name="flickSegment">
<xs:complexType>
<xs:attribute name="directions" type="xs:NMTOKENS" use="required"/>
<xs:attribute name="output" use="required"/>
<xs:attribute name="keyId" type="xs:NMTOKEN" use="required"/>
</xs:complexType>
</xs:element>





<xs:element name="forms">
<xs:complexType>
<xs:sequence>
Expand Down

0 comments on commit a1a8612

Please sign in to comment.