Skip to content

Commit

Permalink
CLDR-15034 kbd: cherry picks from main (#3334)
Browse files Browse the repository at this point in the history
Two PRs that were merged to main (45) instead of maint-44

-----

- CLDR-17113 kbd: element/attr renaming (#3313)

* CLDR-17113 kbd: element/attr renaming

- 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

* CLDR-17113 kbd display output= and display= should support variables

* CLDR-17113 kbd shuffle element deck chairs

- 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

Also, document.

* CLDR-17113 kbd: move keyList back into attributes

* CLDR-17113 kbd: add longPressDefaultKeyId

- replaces longPressDefault=true

* CLDR-17113 kbd: no nested gestures

* CLDR-17113 kbd: no nested gestures,2

(cherry picked from commit 5f1d298)

-----

- CLDR-17140 kbd: specify modifier matching (#3314)

* CLDR-17140 kbd: specify modifier matching

* CLDR-17140 kbd: rename modifier= to modifiers=

* CLDR-17140 kbd: modifiers: add 'other' and comma

- now supports modifier 'other' if nothing else matches
- now supports comma-separated lists of modifier sets
- attribute name "modifier" changed to "modifiers"

* CLDR-17140 kbd: remove extraneous mention of duplicate keys

- per review

* CLDR-17140 kbd: modifiers review comments

(cherry picked from commit 286a10b)
  • Loading branch information
srl295 authored Oct 11, 2023
1 parent e58b346 commit 32a1842
Show file tree
Hide file tree
Showing 18 changed files with 566 additions and 473 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
305 changes: 196 additions & 109 deletions docs/ldml/tr35-keyboards.md

Large diffs are not rendered by default.

87 changes: 55 additions & 32 deletions keyboards/3.0/fr-t-k0-azerty.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@
<!-- 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,
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>

Expand All @@ -37,10 +41,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,42 +56,61 @@
-->
<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-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" to="" />
<key id="umlaut" to="¨" />
<key id="super-2" to="²" longPress="" />

<!-- test key -->
<key id="a" flicks="a" to="a" longPress="à â á ä ã å ā" />
<!-- test key -->
<key id="A" flicks="b" to="A" longPress="À Á Ä Ã Å Ā" />
<!-- TODO: all additional maps, hardware and touch -->
<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="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" 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 form="iso">
<layers formId="iso">
<!-- in DTD: required if conformsTo ≥ 41 -->
<layer modifier="none">
<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" />
Expand All @@ -96,7 +119,7 @@
<row keys="space" />
</layer>

<layer modifier="shift">
<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" />
Expand All @@ -105,7 +128,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
6 changes: 3 additions & 3 deletions keyboards/3.0/ja-Latn.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
<import base="cldr" path="techpreview/keys-Zyyy-currency.xml" />
</keys>

<layers form="jis">
<layer modifier="none">
<layers formId="jis">
<layer modifiers="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" />
<row keys="a s d f g h j k l semi-colon colon close-square" />
<row keys="z x c v b n m comma period slash underscore" />
<row keys="space"/>
</layer>
<layer modifier="shift">
<layer modifiers="shift">
<row keys="bang double-quote hash dollar percent amp apos open-paren close-paren 0 equal tilde pipe" /> <!-- 0 is repeated from "none" -->
<row keys="Q W E R T Y U I O P grave open-curly" />
<row keys="A S D F G H J K L plus asterisk close-curly" />
Expand Down
48 changes: 24 additions & 24 deletions keyboards/3.0/mt-t-k0-47key.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,61 +14,61 @@
<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">
<layer modifier="none">
<layers formId="us">
<layer modifiers="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" />
<row keys="a s d f g h j k l semi-colon apos" />
<row keys="z x c v b n m comma period slash" />
<row keys="space" />
</layer>

<layer modifier="shift">
<layer modifiers="shift">
<row keys="C-tikka bang at euro dollar percent caret amp asterisk open-paren close-paren underscore plus" />
<row keys="Q W E R T Y U I O P G-tikka H-maqtugha Z-tikka" />
<row keys="A S D F G H J K L colon double-quote" />
<row keys="Z X C V B N M open-angle close-angle question" />
<row keys="space" />
</layer>

<layer modifier="altR">
<layer modifiers="altR">
<row keys="grave gap gap pound gap gap gap gap gap gap gap gap gap" />
<row keys="gap gap e-grave gap gap gap u-grave i-grave o-grave gap open-square close-square backslash" />
<row keys="a-grave gap gap gap gap gap gap gap gap gap gap" />
<row keys="gap gap gap gap gap gap gap gap gap gap" />
<row keys="space" />
</layer>

<layer modifier="altR shift">
<layer modifiers="altR shift">
<row keys="tilde gap gap gap gap gap gap gap gap gap gap gap gap" />
<row keys="gap gap E-grave gap gap gap U-grave I-grave O-grave gap open-curly close-curly pipe" />
<row keys="A-grave gap gap gap gap gap gap gap gap gap gap" />
Expand Down
48 changes: 24 additions & 24 deletions keyboards/3.0/mt.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,58 +20,58 @@
<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">
<layer modifier="none">
<layers formId="iso">
<layer modifiers="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" />
<row keys="a s d f g h j k l semi-colon hash" />
<row keys="z-tikka z x c v b n m comma period slash" />
<row keys="space" />
</layer>

<layer modifier="shift">
<layer modifiers="shift">
<row keys="C-tikka bang double-quote euro dollar percent caret amp open-paren close-paren underscore plus" />
<row keys="Q W E R T Y U I O P G-tikka H-maqtugha" />
<row keys="A S D F G H J K L colon at tilde" />
<row keys="Z-tikka Z X C V B N M open-angle close-angle question" />
<row keys="space" />
</layer>

<layer modifier="altR">
<layer modifiers="altR">
<row keys="grave gap gap pound gap gap gap gap gap gap gap gap gap" />
<row keys="gap gap e-grave gap gap gap u-grave i-grave o-grave gap open-square close-square" />
<row keys="a-grave gap gap gap gap gap gap gap gap gap gap gap" />
<row keys="backslash gap gap gap gap gap gap gap gap gap gap" />
<row keys="space" />
</layer>

<layer modifier="altR shift">
<layer modifiers="altR shift">
<row keys="not gap gap gap gap gap gap gap gap gap gap gap gap" />
<row keys="gap gap E-grave gap gap gap U-grave I-grave O-grave gap open-curly close-curly" />
<row keys="A-grave gap gap gap gap gap gap gap gap gap gap gap" />
Expand Down
24 changes: 12 additions & 12 deletions keyboards/3.0/pcm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,38 @@
<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">
<layer modifier="none">
<layers formId="iso">
<layer modifiers="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" />
<row keys="a s d f g h j k l odot edot slash" />
<row keys="slash z c v b n m comma period semi-colon apos" />
<row keys="space" />
</layer>

<layer modifier="shift">
<layer modifiers="shift">
<row keys="grave bang at hash dollar naira percent amp asterisk open-paren close-paren underscore plus" />
<row keys="A S D F G H J K L Odot Edot question" />
<row keys="A S D F G H J K L Odot Edot" />
<row keys="question Z C V B N M open-angle close-angle colon double-quote" />
<row keys="space" />
</layer>

<layer modifier="caps">
<layer modifiers="caps">
<row keys="backquote 1 2 3 4 5 6 7 8 9 0 hyphen equal" />
<row keys="Q W E R T Y U I O P open-square close-square" />
<row keys="A S D F G H J K L Odot Edot slash" />
Expand Down
Loading

0 comments on commit 32a1842

Please sign in to comment.