• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3    See CLDR-12026 for the real new azerty keyboard
4-->
5<keyboard3 xmlns="https://schemas.unicode.org/cldr/45/keyboard3" locale="fr-t-k0-test" conformsTo="45">
6	<locales>
7		<locale id="br" /> <!-- example of including Breton -->
8	</locales>
9	<!-- 'conformsTo' gives CLDR spec conformance. Distinguishes from prior
10		keyboard formats -->
11	<!-- 'version' element is now optional -->
12	<version number="1.0.0" />
13	<info name="French Test AZERTY" author="Team Keyboard" layout="AZERTY" indicator="FR" />
14
15	<displays>
16		<!-- Note: displays is only used for keycap presentation -->
17		<!-- this example is not required for this keyboard as we use the spacing
18			modifiers -->
19		<display output="\u{0300}" display="${grave}" /> <!-- display combining grave as modifier letter grave ˋ -->
20		<!-- Note: We discussed why the existing displayMap was used for display.
21			rather than adding something closer to the key layout. 1. This way we can
22			tell the renderer what to do. Could be double diacritics, spacing issues,
23			etc. 2. We expect that keys have output. Otherwise the input content is malformed.
24			3. Don't Repeat Yourself : multiple keys (i.e. on different symbol layers)
25			may have the same display. -->
26
27		<!-- Example of a display mapping for a key by id -->
28		<display keyId="symbol" display="@" />
29		<display keyId="numeric" display="123" />
30		<displayOptions baseCharacter="x" />
31	</displays>
32
33	<keys>
34		<import base="cldr" path="45/keys-Zyyy-punctuation.xml" />
35		<import base="cldr" path="45/keys-Zyyy-currency.xml" />
36
37		<!-- switch keys -->
38		<key id="shift" layerId="shift" />
39		<key id="numeric" layerId="numeric" />
40		<key id="symbol" layerId="symbol" />
41		<key id="base" layerId="base" />
42
43		<!--
44			TODO: need discussion
45		<key id="bksp" gap="true" /> -->
46		<key id="extra" gap="true" />
47		<!--
48			TODO: need discussion
49		<key id="enter" to="\u{000A}" />
50		-->
51		<key id="enter" gap="true" />
52
53		<!-- extra keys -->
54		<key id="u-grave" output="ü" />
55		<key id="e-grave" output="é" /> <!-- 2 -->
56		<key id="e-acute" output="è" /> <!-- 7 -->
57		<key id="c-cedilla" output="ç" /> <!-- 9 -->
58		<key id="a-grave" output="à"  />
59		<key id="a-acute" output="á" />
60		<key id="a-caret" output="â" />
61		<key id="a-umlaut" output="ä" />
62		<key id="a-tilde" output="ã" />
63		<key id="a-ring" output="å" />
64		<key id="a-caron" output="ā" />
65
66		<key id="A-grave" output="À" /> <!-- 0 -->
67		<key id="A-acute" output="Á" />
68		<key id="A-caret" output="Â" />
69		<key id="A-umlaut" output="Ä" />
70		<key id="A-tilde" output="Ã" />
71		<key id="A-ring" output="Å" />
72		<key id="A-caron" output="Ā" />
73
74
75		<!-- extra symbols -->
76		<key id="bullet" output="•" />
77		<key id="umlaut" output="¨" />
78		<key id="super-2" output="²" multiTapKeyIds="sub-2 2" /> <!-- taps produce: ² ₂ 2 -->
79		<key id="sub-2" output="₂" />
80
81		<!-- note that a-caret is the default-->
82		<key id="a" flickId="a" output="a"
83			longPressKeyIds="a-grave a-caret a-acute a-umlaut a-tilde a-ring a-caron"
84			longPressDefaultKeyId="a-caret" />
85		<!-- note that A-caret is the default-->
86		<key id="A" flickId="b" output="A"
87			longPressKeyIds="A-grave A-caret A-acute A-umlaut a-tilde A-ring A-caron"
88			longPressDefaultKeyId="A-caret" />
89	</keys>
90
91	<flicks>
92		<flick id="b">
93			<flickSegment directions="nw" keyId="A-grave" />
94			<flickSegment directions="nw se" keyId="A-acute" />
95			<flickSegment directions="e" keyId="A-caron" />
96			<flickSegment directions="s" keyId="numeric" /> <!-- layer shifting flick-->
97		</flick>
98		<flick id="a">
99			<flickSegment directions="nw" keyId="a-grave" />
100			<flickSegment directions="nw se" keyId="a-acute" />
101			<flickSegment directions="e" keyId="a-caron" />
102		</flick>
103	</flicks>
104
105	<layers formId="iso">
106		<!-- in DTD: required if conformsTo ≥ 41 -->
107		<layer modifiers="none">
108			<row
109				keys="super-2 amp e-grave double-quote apos open-paren hyphen e-acute underscore c-cedilla a-acute close-paren equal" />
110			<row keys="a z e r t y u i o p caret dollar" />
111			<row keys="q s d f g h j k l m u-grave asterisk" />
112			<row keys="open-angle w x c v b n comma semi-colon colon bang" />
113			<row keys="space" />
114		</layer>
115
116		<layer modifiers="shift">
117			<row keys="1 2 3 4 5 6 7 8 9 0 degree plus" />
118			<row keys="A Z E R T Y U I O P umlaut pound" />
119			<row keys="Q S D F G H J K L M percent micro" />
120			<row keys="close-angle W X C V B N question period slash section" />
121			<row keys="space" />
122		</layer>
123	</layers>
124
125	<layers formId="touch" minDeviceWidth="150">
126		<!-- optional attribute for min physical device size -->
127		<layer id="base">
128			<row keys="a z e r t y u i o p" />
129			<row keys="q s d f g h j k l m" />
130			<row keys="shift gap w x c v b n gap" /> <!--TODO:  + bksp -->
131			<row keys="numeric extra space enter" />
132		</layer>
133
134		<layer id="shift">
135			<row keys="A Z E R T Y U I O P" />
136			<row keys="Q S D F G H J K L M" />
137			<row keys="base W X C V B N" />  <!--TODO:  + bksp -->
138			<row keys="numeric extra space enter" />
139		</layer>
140
141		<layer id="numeric">
142			<row keys="1 2 3 4 5 6 7 8 9 0" />
143			<row
144				keys="hyphen slash colon semi-colon open-paren close-paren dollar amp at double-quote" />
145			<row keys="symbol period comma question bang double-quote" /> <!--TODO:  + bksp -->
146			<row keys="base extra space enter" />
147		</layer>
148
149		<layer id="symbol">
150			<row
151				keys="open-square close-square open-curly close-curly hash percent caret asterisk plus equal" />
152			<row keys="underscore backslash pipe tilde open-angle close-angle euro pound yen bullet" />
153			<row keys="numeric period comma question bang double-quote" /> <!--TODO:  + bksp -->
154			<row keys="base extra space enter" />
155		</layer>
156	</layers>
157
158	<variables>
159		<!-- spacing accents as string variables -->
160		<string id="grave"  value="`" />
161		<string id="caret"  value="^" />
162		<string id="umlaut" value="¨" />
163		<string id="tilde"  value="~" />
164
165		<!-- sets representing vowels and accented vowels.  -->
166		<!-- There's an extra space between the lower and upper case for visual separation -->
167		<!-- but, there are only 10 items in the following four sets -->
168		<set id="vowel"       value="a e i o u  A E I O U" />
169		<set id="graveVowel"  value="à è ì ò ù  À È Ì Ò Ù" />
170		<set id="caretVowel"  value="â ê î ô û  Â Ê Î Ô Û" />
171		<set id="umlautVowel" value="ä ë ï ö ü  Ä Ë Ï Ö Ü" />
172
173		<!-- a set containing all spacing accents -->
174		<set id="spacing_accent" value="${grave} ${caret} ${umlaut} ${tilde}" />
175	</variables>
176
177	<transforms type="simple">
178		<transformGroup>
179			<!-- use sets for those that fit neatly into sets -->
180			<transform from="${grave}($[vowel])"  to="$[1:graveVowel]" />
181			<transform from="${caret}($[vowel])"  to="$[1:caretVowel]" />
182			<transform from="${umlaut}($[vowel])" to="$[1:umlautVowel]" />
183
184			<!-- y also takes umlaut (in this sample) -->
185			<transform from="${umlaut}y" to="ÿ" />
186
187			<!-- tilde is on a subset, not all vowels, + n -->
188			<transform from="${tilde}a" to="ã" />
189			<transform from="${tilde}A" to="Ã" />
190			<transform from="${tilde}n" to="ñ" />
191			<transform from="${tilde}N" to="Ñ" />
192			<transform from="${tilde}o" to="õ" />
193			<transform from="${tilde}O" to="Õ" />
194
195			<!-- accent + space = spacing accent -->
196			<transform from="($[spacing_accent]) " to="$1" />
197		</transformGroup>
198		<transformGroup>
199			<!-- this is a reorder group -->
200			<!-- nod-Lana partial example -->
201			<reorder from="\u{1A60}" order="127" />
202			<reorder from="\u{1A6B}" order="42" />
203			<reorder from="[\u{1A75}-\u{1A79}]" order="55" />
204			<!-- ... partial example ... -->
205		</transformGroup>
206	</transforms>
207</keyboard3>
208