894544585d0ed472e4e228aff334739c55d3c492
[free-sw/xcb/proto] / src / xkb.xml
1 <?xml version="1.0" encoding="utf-8" ?>
2 <!--
3 Copyright (C) 2009 Open Text Corporation.  All Rights Reserved.
4
5 Permission is hereby granted, free of charge, to any person obtaining a copy
6 of this software and associated documentation files (the "Software"), to deal
7 in the Software without restriction, including without limitation the rights
8 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 copies of the Software, and to permit persons to whom the Software is
10 furnished to do so, subject to the following conditions:
11
12 The above copyright notice and this permission notice shall be included in all
13 copies or substantial portions of the Software.
14
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19 ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22 Except as contained in this notice, the names of the authors or their
23 institutions shall not be used in advertising or otherwise to promote the
24 sale, use or other dealings in this Software without prior written
25 authorization from the authors.
26 -->
27 <xcb header="xkb" extension-xname="XKEYBOARD" extension-name="xkb"
28         major-version="1" minor-version="0">
29
30         <import>xproto</import>
31
32         <!-- Common Types -->
33         <enum name="Const">
34                 <item name="MaxLegalKeyCode"> <value>255</value> </item>
35                 <item name="PerKeyBitArraySize">
36                         <value>32</value>
37                 </item>
38                 <item name="KeyNameLength">
39                         <value>4</value>
40                 </item>
41         </enum>
42
43         <enum name="EventType">
44                 <item name="NewKeyboardNotify">      <bit>0</bit> </item>
45                 <item name="MapNotify">              <bit>1</bit> </item>
46                 <item name="StateNotify">            <bit>2</bit> </item>
47                 <item name="ControlsNotify">         <bit>3</bit> </item>
48                 <item name="IndicatorStateNotify">   <bit>4</bit> </item>
49                 <item name="IndicatorMapNotify">     <bit>5</bit> </item>
50                 <item name="NamesNotify">            <bit>6</bit> </item>
51                 <item name="CompatMapNotify">        <bit>7</bit> </item>
52                 <item name="BellNotify">             <bit>8</bit> </item>
53                 <item name="ActionMessage">          <bit>9</bit> </item>
54                 <item name="AccessXNotify">          <bit>10</bit> </item>
55                 <item name="ExtensionDeviceNotify">  <bit>11</bit> </item>
56         </enum>
57
58         <enum name="NKNDetail">
59                 <item name="Keycodes"> <bit>0</bit> </item>
60                 <item name="Geometry"> <bit>1</bit> </item>
61                 <item name="DeviceID"> <bit>2</bit> </item>
62         </enum>
63
64         <enum name="AXNDetail">
65                 <item name="SKPress">      <bit>0</bit> </item>
66                 <item name="SKAccept">     <bit>1</bit> </item>
67                 <item name="SKReject">     <bit>2</bit> </item>
68                 <item name="SKRelease">    <bit>3</bit> </item>
69                 <item name="BKAccept">     <bit>4</bit> </item>
70                 <item name="BKReject">     <bit>5</bit> </item>
71                 <item name="AXKWarning">   <bit>6</bit> </item>
72         </enum>
73
74         <enum name="MapPart">
75                 <item name="KeyTypes">            <bit>0</bit> </item>
76                 <item name="KeySyms">             <bit>1</bit> </item>
77                 <item name="ModifierMap">         <bit>2</bit> </item>
78                 <item name="ExplicitComponents">  <bit>3</bit> </item>
79                 <item name="KeyActions">          <bit>4</bit> </item>
80                 <item name="KeyBehaviors">        <bit>5</bit> </item>
81                 <item name="VirtualMods">         <bit>6</bit> </item>
82                 <item name="VirtualModMap">       <bit>7</bit> </item>
83         </enum>
84
85         <enum name="SetMapFlags">
86                 <item name="ResizeTypes">       <bit>0</bit> </item>
87                 <item name="RecomputeActions">  <bit>1</bit> </item>
88         </enum>
89
90         <enum name="StatePart">
91                 <item name="ModifierState">     <bit>0</bit> </item>
92                 <item name="ModifierBase">      <bit>1</bit> </item>
93                 <item name="ModifierLatch">     <bit>2</bit> </item>
94                 <item name="ModifierLock">      <bit>3</bit> </item>
95                 <item name="GroupState">        <bit>4</bit> </item>
96                 <item name="GroupBase">         <bit>5</bit> </item>
97                 <item name="GroupLatch">        <bit>6</bit> </item>
98                 <item name="GroupLock">         <bit>7</bit> </item>
99                 <item name="CompatState">       <bit>8</bit> </item>
100                 <item name="GrabMods">          <bit>9</bit> </item>
101                 <item name="CompatGrabMods">    <bit>10</bit> </item>
102                 <item name="LookupMods">        <bit>11</bit> </item>
103                 <item name="CompatLookupMods">  <bit>12</bit> </item>
104                 <item name="PointerButtons">    <bit>13</bit> </item>
105         </enum>
106
107         <enum name="BoolCtrl">
108                 <item name="RepeatKeys">           <bit>0</bit> </item>
109                 <item name="SlowKeys">             <bit>1</bit> </item>
110                 <item name="BounceKeys">           <bit>2</bit> </item>
111                 <item name="StickyKeys">           <bit>3</bit> </item>
112                 <item name="MouseKeys">            <bit>4</bit> </item>
113                 <item name="MouseKeysAccel">       <bit>5</bit> </item>
114                 <item name="AccessXKeys">          <bit>6</bit> </item>
115                 <item name="AccessXTimeoutMask">   <bit>7</bit> </item>
116                 <item name="AccessXFeedbackMask">  <bit>8</bit> </item>
117                 <item name="AudibleBellMask">      <bit>9</bit> </item>
118                 <item name="Overlay1Mask">         <bit>10</bit> </item>
119                 <item name="Overlay2Mask">         <bit>11</bit> </item>
120                 <item name="IgnoreGroupLockMask">  <bit>12</bit> </item>
121         </enum>
122
123         <!-- XXX: one zero less than XKB specification says,
124                   uses the same values as libX11 -->
125         <enum name="Control" >
126                 <item name="GroupsWrap">      <bit>27</bit> </item>
127                 <item name="InternalMods">    <bit>28</bit> </item>
128                 <item name="IgnoreLockMods">  <bit>29</bit> </item>
129                 <item name="PerKeyRepeat">    <bit>30</bit> </item>
130                 <item name="ControlsEnabled"> <bit>31</bit> </item>
131         </enum>
132
133         <enum name="AXFBOpt">
134                 <item name="SKPressFB">     <bit>0</bit> </item>
135                 <item name="SKAcceptFB">    <bit>1</bit> </item>
136                 <item name="FeatureFB">     <bit>2</bit> </item>
137                 <item name="SlowWarnFB">    <bit>3</bit> </item>
138                 <item name="IndicatorFB">   <bit>4</bit> </item>
139                 <item name="StickyKeysFB">  <bit>5</bit> </item>
140                 <item name="SKReleaseFB">   <bit>6</bit> </item>
141                 <item name="SKRejectFB">    <bit>7</bit> </item>
142                 <item name="BKRejectFB">    <bit>8</bit> </item>
143                 <item name="DumbBell">      <bit>9</bit> </item>
144         </enum>
145
146         <enum name="AXSKOpt">
147                 <item name="TwoKeys">     <bit>6</bit> </item>
148                 <item name="LatchToLock"> <bit>7</bit> </item>
149         </enum>
150
151         <union name="AXOption">
152                 <field name="fbopt" type="CARD16" enum="AXFBOpt" />
153                 <field name="skopt" type="CARD16" enum="AXSKOpt" />
154         </union>
155
156         <typedef oldname="CARD16" newname="DeviceSpec" />
157
158         <enum name="LedClassResult">
159                 <item name="KbdFeedbackClass"> <value>0</value> </item>
160                 <item name="LedFeedbackClass"> <value>4</value> </item>
161         </enum>
162
163         <enum name="LedClass">
164                 <item name="DfltXIClass">  <value>768</value> </item>   <!--0x300-->
165                 <item name="AllXIClasses"> <value>1280</value> </item>  <!--0x500-->
166         </enum>
167         <typedef oldname="CARD16" newname="LedClassSpec" />
168
169         <enum name="BellClassResult">
170                 <item name="KbdFeedbackClass">  <value>0</value> </item>
171                 <item name="BellFeedbackClass"> <value>5</value> </item>
172         </enum>
173
174         <enum name="BellClass">
175                 <item name="DfltXIClass"> <value>768</value> </item>    <!--0x300-->
176         </enum>
177         <typedef oldname="CARD16" newname="BellClassSpec" />
178
179         <enum name="ID">
180                 <item name="UseCoreKbd">  <value>256</value> </item>    <!-- 0x100 -->
181                 <item name="UseCorePtr">  <value>512</value> </item>    <!-- 0x200 -->
182                 <item name="DfltXIClass"> <value>768</value> </item>    <!-- 0x300 -->
183                 <item name="DfltXIId">   <value>1024</value> </item>    <!-- 0x400 -->
184                 <item name="AllXIClass"> <value>1280</value> </item>    <!-- 0x500 -->
185                 <item name="AllXIId">    <value>1536</value> </item>    <!-- 0x600 -->
186                 <item name="XINone">     <value>65280</value> </item>   <!--0xff00-->
187         </enum>
188         <typedef oldname="CARD16" newname="IDSpec" />
189
190         <enum name="Group">
191                 <item name="1"> <value>0</value> </item>
192                 <item name="2"> <value>1</value> </item>
193                 <item name="3"> <value>2</value> </item>
194                 <item name="4"> <value>3</value> </item>
195         </enum>
196
197         <enum name="Groups">
198                 <item name="Any"> <value>254</value> </item>
199                 <item name="All"> <value>255</value> </item>
200         </enum>
201
202         <enum name="SetOfGroup">
203                 <item name="Group1"> <bit>0</bit> </item>
204                 <item name="Group2"> <bit>1</bit> </item>
205                 <item name="Group3"> <bit>2</bit> </item>
206                 <item name="Group4"> <bit>3</bit> </item>
207         </enum>
208
209         <enum name="SetOfGroups">
210                 <item name="Any"> <bit>7</bit> </item>
211         </enum>
212
213         <enum name="GroupsWrap">
214                 <item name="WrapIntoRange">     <value>0</value> </item>
215                 <item name="ClampIntoRange">    <bit>6</bit> </item>
216                 <item name="RedirectIntoRange"> <bit>7</bit> </item>
217         </enum>
218
219         <enum name="VModsHigh">
220                 <item name="15"> <bit>7</bit> </item>
221                 <item name="14"> <bit>6</bit> </item>
222                 <item name="13"> <bit>5</bit> </item>
223                 <item name="12"> <bit>4</bit> </item>
224                 <item name="11"> <bit>3</bit> </item>
225                 <item name="10"> <bit>2</bit> </item>
226                 <item name="9">  <bit>1</bit> </item>
227                 <item name="8">  <bit>0</bit> </item>
228         </enum>
229
230         <enum name="VModsLow">
231                 <item name="7"> <bit>7</bit> </item>
232                 <item name="6"> <bit>6</bit> </item>
233                 <item name="5"> <bit>5</bit> </item>
234                 <item name="4"> <bit>4</bit> </item>
235                 <item name="3"> <bit>3</bit> </item>
236                 <item name="2"> <bit>2</bit> </item>
237                 <item name="1"> <bit>1</bit> </item>
238                 <item name="0"> <bit>0</bit> </item>
239         </enum>
240
241         <enum name="VMod">
242                 <item name="15"> <bit>15</bit> </item>
243                 <item name="14"> <bit>14</bit> </item>
244                 <item name="13"> <bit>13</bit> </item>
245                 <item name="12"> <bit>12</bit> </item>
246                 <item name="11"> <bit>11</bit> </item>
247                 <item name="10"> <bit>10</bit> </item>
248                 <item name="9">  <bit>9</bit> </item>
249                 <item name="8">  <bit>8</bit> </item>
250                 <item name="7">  <bit>7</bit> </item>
251                 <item name="6">  <bit>6</bit> </item>
252                 <item name="5">  <bit>5</bit> </item>
253                 <item name="4">  <bit>4</bit> </item>
254                 <item name="3">  <bit>3</bit> </item>
255                 <item name="2">  <bit>2</bit> </item>
256                 <item name="1">  <bit>1</bit> </item>
257                 <item name="0">  <bit>0</bit> </item>
258         </enum>
259
260         <enum name="Explicit">
261                 <item name="VModMap">     <bit>7</bit> </item>
262                 <item name="Behavior">    <bit>6</bit> </item>
263                 <item name="AutoRepeat">  <bit>5</bit> </item>
264                 <item name="Interpret">   <bit>4</bit> </item>
265                 <item name="KeyType4">    <bit>3</bit> </item>
266                 <item name="KeyType3">    <bit>2</bit> </item>
267                 <item name="KeyType2">    <bit>1</bit> </item>
268                 <item name="KeyType1">    <bit>0</bit> </item>
269         </enum>
270
271         <enum name="SymInterpretMatch">
272                 <item name="NoneOf">      <value>0</value> </item>
273                 <item name="AnyOfOrNone"> <value>1</value> </item>
274                 <item name="AnyOf">       <value>2</value> </item>
275                 <item name="AllOf">       <value>3</value> </item>
276                 <item name="Exactly">     <value>4</value> </item>
277         </enum>
278
279         <enum name="SymInterpMatch">
280                 <item name="LevelOneOnly"> <bit>7</bit> </item>
281                 <item name="OpMask">       <value>127</value> </item>   <!--0x7f-->
282         </enum>
283
284         <enum name="IMFlag">
285                 <item name="NoExplicit">  <bit>7</bit> </item>
286                 <item name="NoAutomatic"> <bit>6</bit> </item>
287                 <item name="LEDDrivesKB"> <bit>5</bit> </item>
288         </enum>
289
290         <enum name="IMModsWhich">
291                 <item name="UseCompat">    <bit>4</bit> </item>
292                 <item name="UseEffective"> <bit>3</bit> </item>
293                 <item name="UseLocked">    <bit>2</bit> </item>
294                 <item name="UseLatched">   <bit>1</bit> </item>
295                 <item name="UseBase">      <bit>0</bit> </item>
296         </enum>
297
298         <enum name="IMGroupsWhich">
299                 <item name="UseCompat">    <bit>4</bit> </item>
300                 <item name="UseEffective"> <bit>3</bit> </item>
301                 <item name="UseLocked">    <bit>2</bit> </item>
302                 <item name="UseLatched">   <bit>1</bit> </item>
303                 <item name="UseBase">      <bit>0</bit> </item>
304         </enum>
305
306         <struct name="IndicatorMap">
307                 <field name="flags" type="CARD8" enum="IMFlag" />
308                 <field name="whichGroups" type="CARD8" enum="IMGroupsWhich" />
309                 <field name="groups" type="CARD8" enum="SetOfGroup" />
310                 <field name="whichMods" type="CARD8" enum="IMModsWhich" />
311                 <field name="mods" type="CARD8" mask="ModMask" />
312                 <field name="realMods" type="CARD8" mask="ModMask" />
313                 <field name="vmods" type="CARD16" mask="VMod" />
314                 <field name="ctrls" type="CARD32" mask="BoolCtrl" />
315         </struct>
316
317         <enum name="CMDetail">
318                 <item name="SymInterp">   <bit>0</bit> </item>
319                 <item name="GroupCompat"> <bit>1</bit> </item>
320         </enum>
321
322         <enum name="NameDetail">
323                 <item name="Keycodes">        <bit>0</bit> </item>
324                 <item name="Geometry">        <bit>1</bit> </item>
325                 <item name="Symbols">         <bit>2</bit> </item>
326                 <item name="PhysSymbols">     <bit>3</bit> </item>
327                 <item name="Types">           <bit>4</bit> </item>
328                 <item name="Compat">          <bit>5</bit> </item>
329                 <item name="KeyTypeNames">    <bit>6</bit> </item>
330                 <item name="KTLevelNames">    <bit>7</bit> </item>
331                 <item name="IndicatorNames">  <bit>8</bit> </item>
332                 <item name="KeyNames">        <bit>9</bit> </item>
333                 <item name="KeyAliases">      <bit>10</bit> </item>
334                 <item name="VirtualModNames"> <bit>11</bit> </item>
335                 <item name="GroupNames">      <bit>12</bit> </item>
336                 <item name="RGNames">         <bit>13</bit> </item>
337         </enum>
338
339         <enum name="GBNDetail">
340                 <item name="Types">         <bit>0</bit> </item>
341                 <item name="CompatMap">     <bit>1</bit> </item>
342                 <item name="ClientSymbols"> <bit>2</bit> </item>
343                 <item name="ServerSymbols"> <bit>3</bit> </item>
344                 <item name="IndicatorMaps"> <bit>4</bit> </item>
345                 <item name="KeyNames">      <bit>5</bit> </item>
346                 <item name="Geometry">      <bit>6</bit> </item>
347                 <item name="OtherNames">    <bit>7</bit> </item>
348         </enum>
349
350         <enum name="XIFeature">
351                 <item name="Keyboards">      <bit>0</bit> </item>
352                 <item name="ButtonActions">  <bit>1</bit> </item>
353                 <item name="IndicatorNames"> <bit>2</bit> </item>
354                 <item name="IndicatorMaps">  <bit>3</bit> </item>
355                 <item name="IndicatorState"> <bit>4</bit> </item>
356         </enum>
357
358         <enum name="PerClientFlag">
359                 <item name="DetectableAutoRepeat">   <bit>0</bit> </item>
360                 <item name="GrabsUseXKBState">       <bit>1</bit> </item>
361                 <item name="AutoResetControls">      <bit>2</bit> </item>
362                 <item name="LookupStateWhenGrabbed"> <bit>3</bit> </item>
363                 <item name="SendEventUsesXKBState">  <bit>4</bit> </item>
364         </enum>
365
366         <struct name="ModDef">
367                 <field name="mask" type="CARD8" mask="ModMask" />
368                 <field name="realMods" type="CARD8" mask="ModMask" />
369                 <field name="vmods" type="CARD16" mask="VMod" />
370         </struct>
371
372         <struct name="KeyName">
373                 <list name="name" type="char">
374                         <value>4</value>
375                 </list>
376         </struct>
377
378         <struct name="KeyAlias">
379                 <list name="real" type="char">
380                         <value>4</value>
381                 </list>
382                 <list name="alias" type="char">
383                         <value>4</value>
384                 </list>
385         </struct>
386
387         <struct name="CountedString16">
388                 <field name="length" type="CARD16" />
389                 <list name="string" type="char">
390                         <fieldref>length</fieldref>
391                 </list>
392                 <list type="void" name="alignment_pad">
393                         <op op="-">
394                                 <op op="&amp;">
395                                         <op op="+">
396                                                 <fieldref>length</fieldref>
397                                                 <value>5</value>
398                                         </op>
399                                         <unop op="~">
400                                                 <value>3</value>
401                                         </unop>
402                                 </op>
403                                 <op op="+">
404                                         <fieldref>length</fieldref>
405                                         <value>2</value>
406                                 </op>
407                         </op>
408                 </list>
409         </struct>
410
411         <struct name="KTMapEntry">
412                 <field name="active" type="BOOL" />
413                 <field name="mods_mask" type="CARD8" mask="ModMask" />
414                 <field name="level" type="CARD8" />
415                 <field name="mods_mods" type="CARD8" mask="ModMask" />
416                 <field name="mods_vmods" type="CARD16" mask="VMod" />
417                 <pad bytes="2" />
418         </struct>
419
420         <struct name="KeyType">
421                 <field name="mods_mask" type="CARD8" mask="ModMask" />
422                 <field name="mods_mods" type="CARD8" mask="ModMask" />
423                 <field name="mods_vmods" type="CARD16" mask="VMod" />
424                 <field name="numLevels" type="CARD8" />
425                 <field name="nMapEntries" type="CARD8" />
426                 <field name="hasPreserve" type="BOOL" />
427                 <pad bytes="1" />
428                 <list name="map" type="KTMapEntry">
429                         <fieldref>nMapEntries</fieldref>
430                 </list>
431                 <list name="preserve" type="ModDef">
432                     <op op="*">
433                         <fieldref>hasPreserve</fieldref>
434                         <fieldref>nMapEntries</fieldref>
435                     </op>
436                 </list>
437         </struct>
438
439         <struct name="KeySymMap">
440                 <list name="kt_index" type="CARD8">
441                         <value>4</value>
442                 </list>
443                 <field name="groupInfo" type="CARD8" />
444                 <field name="width" type="CARD8" />
445                 <field name="nSyms" type="CARD16" />
446                 <list name="syms" type="KEYSYM">
447                         <fieldref>nSyms</fieldref>
448                 </list>
449         </struct>
450
451         <!-- Key Behaviors -->
452
453         <struct name="CommonBehavior">
454                 <field name="type" type="CARD8" />
455                 <field name="data" type="CARD8" />
456         </struct>
457
458         <struct name="DefaultBehavior">
459                 <field name="type" type="CARD8" />
460                 <pad bytes="1" />
461         </struct>
462
463         <typedef oldname="DefaultBehavior" newname="LockBehavior" />
464
465         <struct name="RadioGroupBehavior">
466                 <field name="type" type="CARD8" />
467                 <field name="group" type="CARD8" />
468         </struct>
469
470         <struct name="Overlay1Behavior">
471                 <field name="type" type="CARD8" />
472                 <field name="key" type="KEYCODE" />
473         </struct>
474
475         <struct name="Overlay2Behavior">
476                 <field name="type" type="CARD8" />
477                 <field name="key" type="CARD8" />
478         </struct>
479
480         <typedef oldname="LockBehavior" newname="PermamentLockBehavior" />
481         <typedef oldname="RadioGroupBehavior" newname="PermamentRadioGroupBehavior" />
482         <typedef oldname="Overlay1Behavior" newname="PermamentOverlay1Behavior" />
483         <typedef oldname="Overlay2Behavior" newname="PermamentOverlay2Behavior" />
484
485         <union name="Behavior">
486                 <field name="common" type="CommonBehavior" />
487                 <field name="default" type="DefaultBehavior" />
488                 <field name="lock" type="LockBehavior" />
489                 <field name="radioGroup" type="RadioGroupBehavior" />
490                 <field name="overlay1" type="Overlay1Behavior" />
491                 <field name="overlay2" type="Overlay2Behavior" />
492                 <field name="permamentLock" type="PermamentLockBehavior" />
493                 <field name="permamentRadioGroup" type="PermamentRadioGroupBehavior" />
494                 <field name="permamentOverlay1" type="PermamentOverlay1Behavior" />
495                 <field name="permamentOverlay2" type="PermamentOverlay2Behavior" />
496                 <field name="type" type="CARD8" />
497         </union>
498
499         <enum name="BehaviorType">
500                 <item name="Default">             <value>0</value> </item>      <!--0x00-->
501                 <item name="Lock">                <value>1</value> </item>      <!--0x01-->
502                 <item name="RadioGroup">          <value>2</value> </item>      <!--0x02-->
503                 <item name="Overlay1">            <value>3</value> </item>      <!--0x03-->
504                 <item name="Overlay2">            <value>4</value> </item>      <!--0x04-->
505                 <item name="PermamentLock">       <value>129</value> </item>    <!--0x81-->
506                 <item name="PermamentRadioGroup"> <value>130</value> </item>    <!--0x82-->
507                 <item name="PermamentOverlay1">   <value>131</value> </item>    <!--0x83-->
508                 <item name="PermamentOverlay2">   <value>132</value> </item>    <!--0x84-->
509         </enum>
510
511         <struct name="SetBehavior">
512                 <field name="keycode" type="KEYCODE" />
513                 <field name="behavior" type="Behavior" />
514                 <pad bytes="1" />
515         </struct>
516
517         <struct name="SetExplicit">
518                 <field name="keycode" type="KEYCODE" />
519                 <field name="explicit" type="CARD8" mask="Explicit" />
520         </struct>
521
522         <struct name="KeyModMap">
523                 <field name="keycode" type="KEYCODE" />
524                 <field name="mods" type="CARD8" mask="ModMask" />
525         </struct>
526
527         <struct name="KeyVModMap">
528                 <field name="keycode" type="KEYCODE" />
529                 <pad bytes="1" />
530                 <field name="vmods" type="CARD16" mask="VMod" />
531         </struct>
532
533         <struct name="KTSetMapEntry">
534                 <field name="level" type="CARD8" />
535                 <field name="realMods" type="CARD8" mask="ModMask" />
536                 <field name="virtualMods" type="CARD16" mask="VMod" />
537         </struct>
538
539         <struct name="SetKeyType">
540                 <field name="mask" type="CARD8" mask="ModMask" />
541                 <field name="realMods" type="CARD8" mask="ModMask" />
542                 <field name="virtualMods" type="CARD16" mask="VMod" />
543                 <field name="numLevels" type="CARD8" />
544                 <field name="nMapEntries" type="CARD8" />
545                 <field name="preserve" type="BOOL" />
546                 <pad bytes="1" />
547                 <list name="entries" type="KTSetMapEntry">
548                         <fieldref>nMapEntries</fieldref>
549                 </list>
550                 <list name="preserve_entries" type="KTSetMapEntry">
551                     <op op = "*">
552                         <fieldref>preserve</fieldref>
553                         <fieldref>nMapEntries</fieldref>
554                     </op>
555                 </list>
556         </struct>
557
558         <typedef oldname="char" newname="STRING8" />
559
560         <struct name="Property">
561                 <field name="nameLength" type="CARD16" />
562                 <list name="name" type="STRING8">
563                         <fieldref>nameLength</fieldref>
564                 </list>
565                 <field name="valueLength" type="CARD16" />
566                 <list name="value" type="STRING8">
567                         <fieldref>valueLength</fieldref>
568                 </list>
569         </struct>
570
571         <struct name="Outline">
572                 <field name="nPoints" type="CARD8" />
573                 <field name="cornerRadius" type="CARD8" />
574                 <pad bytes="2" />
575                 <list name="points" type="POINT">
576                         <fieldref>nPoints</fieldref>
577                 </list>
578         </struct>
579
580         <struct name="Shape">
581                 <field name="name" type="ATOM" />
582                 <field name="nOutlines" type="CARD8" />
583                 <field name="primaryNdx" type="CARD8" />
584                 <field name="approxNdx" type="CARD8" />
585                 <pad bytes="1" />
586                 <list name="outlines" type="Outline">
587                         <fieldref>nOutlines</fieldref>
588                 </list>
589         </struct>
590
591         <struct name="Key">
592                 <list name="name" type="STRING8">
593                         <value>4</value>
594                 </list>
595                 <field name="gap" type="INT16" />
596                 <field name="shapeNdx" type="CARD8" />
597                 <field name="colorNdx" type="CARD8" />
598         </struct>
599
600         <struct name="OverlayKey">
601                 <list name="over" type="STRING8">
602                         <value>4</value>
603                 </list>
604                 <list name="under" type="STRING8">
605                         <value>4</value>
606                 </list>
607         </struct>
608
609         <struct name="OverlayRow">
610                 <field name="rowUnder" type="CARD8" />
611                 <field name="nKeys" type="CARD8" />
612                 <pad bytes="2" />
613                 <list name="keys" type="OverlayKey">
614                         <fieldref>nKeys</fieldref>
615                 </list>
616         </struct>
617
618         <struct name="Overlay">
619                 <field name="name" type="ATOM" />
620                 <field name="nRows" type="CARD8" />
621                 <pad bytes="3" />
622                 <list name="rows" type="OverlayRow">
623                         <fieldref>nRows</fieldref>
624                 </list>
625         </struct>
626
627         <struct name="Row">
628                 <field name="top" type="INT16" />
629                 <field name="left" type="INT16" />
630                 <field name="nKeys" type="CARD8" />
631                 <field name="vertical" type="BOOL" />
632                 <pad bytes="2" />
633                 <list name="keys" type="Key">
634                         <fieldref>nKeys</fieldref>
635                 </list>
636         </struct>
637
638         <enum name="DoodadType">
639                 <item name="Outline">   <value>1</value> </item>
640                 <item name="Solid">     <value>2</value> </item>
641                 <item name="Text">      <value>3</value> </item>
642                 <item name="Indicator"> <value>4</value> </item>
643                 <item name="Logo">      <value>5</value> </item>
644         </enum>
645
646         <struct name="CommonDoodad">
647                 <field name="name" type="ATOM" />
648                 <field name="type" type="CARD8" enum="DoodadType" />
649                 <field name="priority" type="CARD8" />
650                 <field name="top" type="INT16" />
651                 <field name="left" type="INT16" />
652                 <field name="angle" type="INT16" />
653         </struct>
654
655         <struct name="ShapeDoodad">
656                 <field name="name" type="ATOM" />
657                 <field name="type" type="CARD8" enum="DoodadType" />
658                 <field name="priority" type="CARD8" />
659                 <field name="top" type="INT16" />
660                 <field name="left" type="INT16" />
661                 <field name="angle" type="INT16" />
662                 <field name="colorNdx" type="CARD8" />
663                 <field name="shapeNdx" type="CARD8" />
664                 <pad bytes="6" />
665         </struct>
666
667         <struct name="TextDoodad">
668                 <field name="name" type="ATOM" />
669                 <field name="type" type="CARD8" enum="DoodadType" />
670                 <field name="priority" type="CARD8" />
671                 <field name="top" type="INT16" />
672                 <field name="left" type="INT16" />
673                 <field name="angle" type="INT16" />
674                 <field name="width" type="CARD16" />
675                 <field name="height" type="CARD16" />
676                 <field name="colorNdx" type="CARD8" />
677                 <pad bytes="3" />
678                 <field name="text" type="CountedString16" />
679                 <field name="font" type="CountedString16" />
680         </struct>
681
682         <struct name="IndicatorDoodad">
683                 <field name="name" type="ATOM" />
684                 <field name="type" type="CARD8" enum="DoodadType" />
685                 <field name="priority" type="CARD8" />
686                 <field name="top" type="INT16" />
687                 <field name="left" type="INT16" />
688                 <field name="angle" type="INT16" />
689                 <field name="shapeNdx" type="CARD8" />
690                 <field name="onColorNdx" type="CARD8" />
691                 <field name="offColorNdx" type="CARD8" />
692                 <pad bytes="5" />
693         </struct>
694
695         <struct name="LogoDoodad">
696                 <field name="name" type="ATOM" />
697                 <field name="type" type="CARD8" enum="DoodadType" />
698                 <field name="priority" type="CARD8" />
699                 <field name="top" type="INT16" />
700                 <field name="left" type="INT16" />
701                 <field name="angle" type="INT16" />
702                 <field name="colorNdx" type="CARD8" />
703                 <field name="shapeNdx" type="CARD8" />
704                 <pad bytes="6" />
705                 <field name="logoName" type="CountedString16" />
706         </struct>
707
708         <union name="Doodad">
709                 <field name="common" type="CommonDoodad" />
710                 <field name="shape" type="ShapeDoodad" />
711                 <field name="text" type="TextDoodad" />
712                 <field name="indicator" type="IndicatorDoodad" />
713                 <field name="logo" type="LogoDoodad" />
714         </union>
715
716         <struct name="Section">
717                 <field name="name" type="ATOM" />
718                 <field name="top" type="INT16" />
719                 <field name="left" type="INT16" />
720                 <field name="width" type="CARD16" />
721                 <field name="height" type="CARD16" />
722                 <field name="angle" type="INT16" />
723                 <field name="priority" type="CARD8" />
724                 <field name="nRows" type="CARD8" />
725                 <field name="nDoodads" type="CARD8" />
726                 <field name="nOverlays" type="CARD8" />
727                 <pad bytes="2" />
728                 <list name="rows" type="Row">
729                         <fieldref>nRows</fieldref>
730                 </list>
731                 <list name="doodads" type="Doodad">
732                         <fieldref>nDoodads</fieldref>
733                 </list>
734                 <list name="overlays" type="Overlay">
735                         <fieldref>nOverlays</fieldref>
736                 </list>
737         </struct>
738
739         <struct name="Listing">
740                 <field name="flags" type="CARD16" />
741                 <field name="length" type="CARD16" />
742                 <list name="string" type="STRING8">
743                         <fieldref>length</fieldref>
744                 </list>
745         </struct>
746
747         <struct name="DeviceLedInfo">
748                 <field name="ledClass" type="LedClassSpec" enum="LedClass" />
749                 <field name="ledID" type="IDSpec" altenum="ID" />
750                 <field name="namesPresent" type="CARD32" />
751                 <field name="mapsPresent" type="CARD32" />
752                 <field name="physIndicators" type="CARD32" />
753                 <field name="state" type="CARD32" />
754                 <list name="names" type="ATOM">
755                         <popcount>
756                                 <fieldref>namesPresent</fieldref>
757                         </popcount>
758                 </list>
759                 <list name="maps" type="IndicatorMap">
760                         <popcount>
761                                 <fieldref>mapsPresent</fieldref>
762                         </popcount>
763                 </list>
764         </struct>
765
766         <!-- Errors -->
767
768         <enum name="Error">
769                 <item name="BadDevice"> <value>255</value> </item>      <!--0xff-->
770                 <item name="BadClass">  <value>254</value> </item>      <!--0xfe-->
771                 <item name="BadId">     <value>253</value> </item>      <!--0xfd-->
772         </enum>
773
774         <error name="Keyboard" number="0">
775                 <field name="value" type="CARD32" />
776                 <field name="minorOpcode" type="CARD16" />
777                 <field name="majorOpcode" type="CARD8" />
778                 <pad bytes="21" />
779         </error>
780
781         <!-- Key Actions -->
782
783         <enum name="SA">
784                 <item name="ClearLocks">    <bit>0</bit> </item>
785                 <item name="LatchToLock">   <bit>1</bit> </item>
786                 <item name="UseModMapMods"> <bit>2</bit> </item>
787                 <item name="GroupAbsolute"> <bit>2</bit> </item>
788         </enum>
789
790         <enum name="SAType">
791                 <item name="NoAction">       <value>0</value> </item>
792                 <item name="SetMods">        <value>1</value> </item>
793                 <item name="LatchMods">      <value>2</value> </item>
794                 <item name="LockMods">       <value>3</value> </item>
795                 <item name="SetGroup">       <value>4</value> </item>
796                 <item name="LatchGroup">     <value>5</value> </item>
797                 <item name="LockGroup">      <value>6</value> </item>
798                 <item name="MovePtr">        <value>7</value> </item>
799                 <item name="PtrBtn">         <value>8</value> </item>
800                 <item name="LockPtrBtn">     <value>9</value> </item>
801                 <item name="SetPtrDflt">     <value>10</value> </item>
802                 <item name="ISOLock">        <value>11</value> </item>
803                 <item name="Terminate">      <value>12</value> </item>
804                 <item name="SwitchScreen">   <value>13</value> </item>
805                 <item name="SetControls">    <value>14</value> </item>
806                 <item name="LockControls">   <value>15</value> </item>
807                 <item name="ActionMessage">  <value>16</value> </item>
808                 <item name="RedirectKey">    <value>17</value> </item>
809                 <item name="DeviceBtn">      <value>18</value> </item>
810                 <item name="LockDeviceBtn">  <value>19</value> </item>
811                 <item name="DeviceValuator"> <value>20</value> </item>
812         </enum>
813
814         <struct name="SANoAction">
815                 <field name="type" type="CARD8" enum="SAType" />
816                 <pad bytes="7" />
817         </struct>
818
819         <struct name="SASetMods">
820                 <field name="type" type="CARD8" enum="SAType" />
821                 <field name="flags" type="CARD8" mask="SA" />
822                 <field name="mask" type="CARD8" mask="ModMask" />
823                 <field name="realMods" type="CARD8" mask="ModMask" />
824                 <field name="vmodsHigh" type="CARD8" mask="VModsHigh" />
825                 <field name="vmodsLow" type="CARD8" mask="VModsLow" />
826                 <pad bytes="2" />
827         </struct>
828
829         <typedef oldname="SASetMods" newname="SALatchMods" />
830
831         <typedef oldname="SASetMods" newname="SALockMods" />
832
833         <struct name="SASetGroup">
834                 <field name="type" type="CARD8" enum="SAType" />
835                 <field name="flags" type="CARD8" mask="SA" />
836                 <field name="group" type="INT8" />
837                 <pad bytes="5" />
838         </struct>
839
840         <typedef oldname="SASetGroup" newname="SALatchGroup" />
841
842         <typedef oldname="SASetGroup" newname="SALockGroup" />
843
844         <enum name="SAMovePtrFlag">
845                 <item name="NoAcceleration"> <bit>0</bit> </item>
846                 <item name="MoveAbsoluteX">  <bit>1</bit> </item>
847                 <item name="MoveAbsoluteY">  <bit>2</bit> </item>
848         </enum>
849
850         <struct name="SAMovePtr">
851                 <field name="type" type="CARD8" enum="SAType" />
852                 <field name="flags" type="CARD8" mask="SAMovePtrFlag" />
853                 <field name="xHigh" type="INT8" />
854                 <field name="xLow" type="CARD8" />
855                 <field name="yHigh" type="INT8" />
856                 <field name="yLow" type="CARD8" />
857                 <pad bytes="2" />
858         </struct>
859
860         <struct name="SAPtrBtn">
861                 <field name="type" type="CARD8" enum="SAType" />
862                 <field name="flags" type="CARD8" />
863                 <field name="count" type="CARD8" />
864                 <field name="button" type="CARD8" />
865                 <pad bytes="4" />
866         </struct>
867
868         <struct name="SALockPtrBtn">
869                 <field name="type" type="CARD8" enum="SAType" />
870                 <field name="flags" type="CARD8" />
871                 <pad bytes="1" />
872                 <field name="button" type="CARD8" />
873                 <pad bytes="4" />
874         </struct>
875
876         <enum name="SASetPtrDfltFlag">
877                 <!-- The spec says 0x02 but Xlib uses 0x04. -->
878                 <item name="DfltBtnAbsolute">  <bit>2</bit> </item>
879                 <item name="AffectDfltButton"> <bit>0</bit> </item>
880         </enum>
881
882         <struct name="SASetPtrDflt">
883                 <field name="type" type="CARD8" enum="SAType" />
884                 <field name="flags" type="CARD8" mask="SASetPtrDfltFlag" />
885                 <field name="affect" type="CARD8" mask="SASetPtrDfltFlag" />
886                 <field name="value" type="INT8" />
887                 <pad bytes="4" />
888         </struct>
889
890         <enum name="SAIsoLockFlag">
891                 <item name="NoLock">         <bit>0</bit> </item>
892                 <item name="NoUnlock">       <bit>1</bit> </item>
893                 <item name="UseModMapMods">  <bit>2</bit> </item>
894                 <item name="GroupAbsolute">  <bit>2</bit> </item>
895                 <item name="ISODfltIsGroup"> <bit>3</bit> </item>
896         </enum>
897
898         <enum name="SAIsoLockNoAffect">
899                 <item name="Ctrls"> <bit>3</bit> </item>
900                 <item name="Ptr">   <bit>4</bit> </item>
901                 <item name="Group"> <bit>5</bit> </item>
902                 <item name="Mods">  <bit>6</bit> </item>
903         </enum>
904
905         <struct name="SAIsoLock">
906                 <field name="type" type="CARD8" enum="SAType" />
907                 <field name="flags" type="CARD8" mask="SAIsoLockFlag" />
908                 <field name="mask" type="CARD8" mask="ModMask" />
909                 <field name="realMods" type="CARD8" mask="ModMask" />
910                 <field name="group" type="INT8" />
911                 <field name="affect" type="CARD8" mask="SAIsoLockNoAffect" />
912                 <field name="vmodsHigh" type="CARD8" mask="VModsHigh" />
913                 <field name="vmodsLow" type="CARD8" mask="VModsLow" />
914         </struct>
915
916         <struct name="SATerminate">
917                 <field name="type" type="CARD8" enum="SAType" />
918                 <pad bytes="7" />
919         </struct>
920
921         <enum name="SwitchScreenFlag">
922                 <item name="Application"> <bit>0</bit> </item>
923                 <item name="Absolute" >   <bit>2</bit> </item>
924         </enum>
925
926         <struct name="SASwitchScreen">
927                 <field name="type" type="CARD8" enum="SAType" />
928                 <field name="flags" type="CARD8" />
929                 <field name="newScreen" type="INT8" />
930                 <pad bytes="5" />
931         </struct>
932
933         <enum name="BoolCtrlsHigh">
934                 <item name="AccessXFeedback"> <bit>0</bit> </item>
935                 <item name="AudibleBell">     <bit>1</bit> </item>
936                 <item name="Overlay1">        <bit>2</bit> </item>
937                 <item name="Overlay2">        <bit>3</bit> </item>
938                 <item name="IgnoreGroupLock"> <bit>4</bit> </item>
939         </enum>
940
941         <enum name="BoolCtrlsLow">
942                 <item name="RepeatKeys">     <bit>0</bit> </item>
943                 <item name="SlowKeys">       <bit>1</bit> </item>
944                 <item name="BounceKeys">     <bit>2</bit> </item>
945                 <item name="StickyKeys">     <bit>3</bit> </item>
946                 <item name="MouseKeys">      <bit>4</bit> </item>
947                 <item name="MouseKeysAccel"> <bit>5</bit> </item>
948                 <item name="AccessXKeys">    <bit>6</bit> </item>
949                 <item name="AccessXTimeout"> <bit>7</bit> </item>
950         </enum>
951
952         <struct name="SASetControls">
953                 <field name="type" type="CARD8" enum="SAType" />
954                 <pad bytes="3" />
955                 <field name="boolCtrlsHigh" type="CARD8" mask="BoolCtrlsHigh" />
956                 <field name="boolCtrlsLow"  type="CARD8" mask="BoolCtrlsLow" />
957                 <pad bytes="2" />
958         </struct>
959
960         <typedef oldname="SASetControls" newname="SALockControls" />
961
962         <enum name="ActionMessageFlag">
963                 <item name="OnPress">     <bit>0</bit> </item>
964                 <item name="OnRelease">   <bit>1</bit> </item>
965                 <item name="GenKeyEvent"> <bit>2</bit> </item>
966         </enum>
967
968         <struct name="SAActionMessage">
969                 <field name="type" type="CARD8" enum="SAType" />
970                 <field name="flags" type="CARD8" mask="ActionMessageFlag" />
971                 <list name="message" type="CARD8">
972                         <value>6</value>
973                 </list>
974         </struct>
975
976         <struct name="SARedirectKey">
977                 <field name="type" type="CARD8" enum="SAType" />
978                 <field name="newkey" type="KEYCODE" />
979                 <field name="mask" type="CARD8" mask="ModMask" />
980                 <field name="realModifiers" type="CARD8" mask="ModMask" />
981                 <field name="vmodsMaskHigh" type="CARD8" mask="VModsHigh"/>
982                 <field name="vmodsMaskLow" type="CARD8" mask="VModsLow"/>
983                 <field name="vmodsHigh" type="CARD8" mask="VModsHigh"/>
984                 <field name="vmodsLow" type="CARD8" mask="VModsLow"/>
985         </struct>
986
987         <struct name="SADeviceBtn">
988                 <field name="type" type="CARD8" enum="SAType" />
989                 <field name="flags" type="CARD8" />
990                 <field name="count" type="CARD8" />
991                 <field name="button" type="CARD8" />
992                 <field name="device" type="CARD8" />
993                 <pad bytes="3" />
994         </struct>
995
996         <enum name="LockDeviceFlags">
997                 <item name="NoLock">   <bit>0</bit> </item>
998                 <item name="NoUnlock"> <bit>1</bit> </item>
999         </enum>
1000
1001         <struct name="SALockDeviceBtn">
1002                 <field name="type" type="CARD8" enum="SAType" />
1003                 <field name="flags" type="CARD8" mask="LockDeviceFlags" />
1004                 <pad bytes="1" />
1005                 <field name="button" type="CARD8" />
1006                 <field name="device" type="CARD8" />
1007         </struct>
1008
1009         <enum name="SAValWhat">
1010                 <item name="IgnoreVal">      <value>0</value> </item>
1011                 <item name="SetValMin">      <value>1</value> </item>
1012                 <item name="SetValCenter">   <value>2</value> </item>
1013                 <item name="SetValMax">      <value>3</value> </item>
1014                 <item name="SetValRelative"> <value>4</value> </item>
1015                 <item name="SetValAbsolute"> <value>5</value> </item>
1016         </enum>
1017
1018         <struct name="SADeviceValuator">
1019                 <field name="type" type="CARD8" enum="SAType" />
1020                 <field name="device" type="CARD8" />
1021                 <field name="val1what" type="CARD8" enum="SAValWhat" />
1022                 <field name="val1index" type="CARD8" />
1023                 <field name="val1value" type="CARD8" />
1024                 <field name="val2what" type="CARD8" enum="SAValWhat" />
1025                 <field name="val2index" type="CARD8" />
1026                 <field name="val2value" type="CARD8" />
1027         </struct>
1028
1029         <struct name="SIAction">
1030                 <field name="type" type="CARD8" enum="SAType" />
1031                 <list name="data" type="CARD8">
1032                         <value>7</value>
1033                 </list>
1034         </struct>
1035
1036         <struct name="SymInterpret">
1037                 <field name="sym" type="KEYSYM" />
1038                 <field name="mods" type="CARD8" mask="ModMask" />
1039                 <!-- "match" may also have XkbSI_LevelOneOnly (0x80) or'd into it -->
1040                 <field name="match" type="CARD8" altenum="SymInterpretMatch" />
1041                 <field name="virtualMod" type="CARD8" mask="VModsLow" />
1042                 <field name="flags" type="CARD8" />
1043                 <field name="action" type="SIAction" />
1044         </struct>
1045
1046         <union name="Action">
1047                 <field name="noaction" type="SANoAction" />
1048                 <field name="setmods" type="SASetMods" />
1049                 <field name="latchmods" type="SALatchMods" />
1050                 <field name="lockmods" type="SALockMods" />
1051                 <field name="setgroup" type="SASetGroup" />
1052                 <field name="latchgroup" type="SALatchGroup" />
1053                 <field name="lockgroup" type="SALockGroup" />
1054                 <field name="moveptr" type="SAMovePtr" />
1055                 <field name="ptrbtn" type="SAPtrBtn" />
1056                 <field name="lockptrbtn" type="SALockPtrBtn" />
1057                 <field name="setptrdflt" type="SASetPtrDflt" />
1058                 <field name="isolock" type="SAIsoLock" />
1059                 <field name="terminate" type="SATerminate" />
1060                 <field name="switchscreen" type="SASwitchScreen" />
1061                 <field name="setcontrols" type="SASetControls" />
1062                 <field name="lockcontrols" type="SALockControls" />
1063                 <field name="message" type="SAActionMessage" />
1064                 <field name="redirect" type="SARedirectKey" />
1065                 <field name="devbtn" type="SADeviceBtn" />
1066                 <field name="lockdevbtn" type="SALockDeviceBtn" />
1067                 <field name="devval" type="SADeviceValuator" />
1068                 <field name="type" type="CARD8" enum="SAType" />
1069         </union>
1070
1071         <!-- Requests -->
1072
1073         <request name="UseExtension" opcode="0">
1074                 <field name="wantedMajor" type="CARD16" />
1075                 <field name="wantedMinor" type="CARD16" />
1076                 <reply>
1077                         <field name="supported" type="BOOL" />
1078                         <field name="serverMajor" type="CARD16" />
1079                         <field name="serverMinor" type="CARD16" />
1080                         <pad bytes="20" />
1081                 </reply>
1082         </request>
1083
1084         <request name="SelectEvents" opcode="1">
1085                 <field name="deviceSpec" type="DeviceSpec" />
1086                 <field name="affectWhich" type="CARD16" mask="EventType" />
1087                 <field name="clear" type="CARD16" mask="EventType" />
1088                 <field name="selectAll" type="CARD16" mask="EventType" />
1089                 <field name="affectMap" type="CARD16" mask="MapPart" />
1090                 <field name="map" type="CARD16" mask="MapPart" />
1091                 <switch name="details">
1092                         <op op="&amp;">
1093                                 <fieldref>affectWhich</fieldref>
1094                                 <op op="&amp;">
1095                                         <unop op="~"><fieldref>clear</fieldref></unop>
1096                                         <unop op="~"><fieldref>selectAll</fieldref></unop>
1097                                 </op>
1098                         </op>
1099                         <bitcase>
1100                                 <enumref ref="EventType">NewKeyboardNotify</enumref>
1101                                 <field name="affectNewKeyboard" type="CARD16" mask="NKNDetail" />
1102                                 <field name="newKeyboardDetails" type="CARD16" mask="NKNDetail" />
1103                         </bitcase>
1104                         <bitcase>
1105                                 <enumref ref="EventType">StateNotify</enumref>
1106                                 <field name="affectState" type="CARD16" mask="StatePart" />
1107                                 <field name="stateDetails" type="CARD16" mask="StatePart" />
1108                         </bitcase>
1109                         <bitcase>
1110                                 <enumref ref="EventType">ControlsNotify</enumref>
1111                                 <field name="affectCtrls" type="CARD32" mask="Control" />
1112                                 <field name="ctrlDetails" type="CARD32" mask="Control" />
1113                         </bitcase>
1114                         <bitcase>
1115                                 <enumref ref="EventType">IndicatorStateNotify</enumref>
1116                                 <field name="affectIndicatorState" type="CARD32" />
1117                                 <field name="indicatorStateDetails" type="CARD32" />
1118                         </bitcase>
1119                         <bitcase>
1120                                 <enumref ref="EventType">IndicatorMapNotify</enumref>
1121                                 <field name="affectIndicatorMap" type="CARD32" />
1122                                 <field name="indicatorMapDetails" type="CARD32" />
1123                         </bitcase>
1124                         <bitcase>
1125                                 <enumref ref="EventType">NamesNotify</enumref>
1126                                 <field name="affectNames" type="CARD16" mask="NameDetail" />
1127                                 <field name="namesDetails" type="CARD16" mask="NameDetail" />
1128                         </bitcase>
1129                         <bitcase>
1130                                 <enumref ref="EventType">CompatMapNotify</enumref>
1131                                 <field name="affectCompat" type="CARD8" mask="CMDetail" />
1132                                 <field name="compatDetails" type="CARD8" mask="CMDetail" />
1133                         </bitcase>
1134                         <bitcase>
1135                                 <enumref ref="EventType">BellNotify</enumref>
1136                                 <field name="affectBell" type="CARD8" />
1137                                 <field name="bellDetails" type="CARD8" />
1138                         </bitcase>
1139                         <bitcase>
1140                                 <enumref ref="EventType">ActionMessage</enumref>
1141                                 <field name="affectMsgDetails" type="CARD8" />
1142                                 <field name="msgDetails" type="CARD8" />
1143                         </bitcase>
1144                         <bitcase>
1145                                 <enumref ref="EventType">AccessXNotify</enumref>
1146                                 <field name="affectAccessX" type="CARD16" mask="AXNDetail" />
1147                                 <field name="accessXDetails" type="CARD16" mask="AXNDetail" />
1148                         </bitcase>
1149                         <bitcase>
1150                                 <enumref ref="EventType">ExtensionDeviceNotify</enumref>
1151                                 <field name="affectExtDev" type="CARD16" mask="XIFeature" />
1152                                 <field name="extdevDetails" type="CARD16" mask="XIFeature" />
1153                         </bitcase>
1154                 </switch>
1155         </request>
1156
1157         <request name="Bell" opcode="3">
1158                 <field name="deviceSpec" type="DeviceSpec" />
1159                 <field name="bellClass" type="BellClassSpec" />
1160                 <field name="bellID" type="IDSpec" />
1161                 <field name="percent" type="INT8" />
1162                 <field name="forceSound" type="BOOL" />
1163                 <field name="eventOnly" type="BOOL" />
1164                 <pad bytes="1" />
1165                 <field name="pitch" type="INT16" />
1166                 <field name="duration" type="INT16" />
1167                 <pad bytes="2" />
1168                 <field name="name" type="ATOM" />
1169                 <field name="window" type="WINDOW" />
1170         </request>
1171
1172         <request name="GetState" opcode="4">
1173                 <field name="deviceSpec" type="DeviceSpec" />
1174                 <pad bytes="2" />
1175                 <reply>
1176                         <field name="deviceID" type="CARD8" />
1177                         <field name="mods" type="CARD8" mask="ModMask" />
1178                         <field name="baseMods" type="CARD8" mask="ModMask" />
1179                         <field name="latchedMods" type="CARD8" mask="ModMask" />
1180                         <field name="lockedMods" type="CARD8" mask="ModMask" />
1181                         <field name="group" type="CARD8" enum="Group" />
1182                         <field name="lockedGroup" type="CARD8" enum="Group" />
1183                         <field name="baseGroup" type="INT16" />
1184                         <field name="latchedGroup" type="INT16" />
1185                         <field name="compatState" type="CARD8" mask="ModMask" />
1186                         <field name="grabMods" type="CARD8" mask="ModMask" />
1187                         <field name="compatGrabMods" type="CARD8" mask="ModMask" />
1188                         <field name="lookupMods" type="CARD8" mask="ModMask" />
1189                         <field name="compatLookupMods" type="CARD8" mask="ModMask" />
1190                         <pad bytes="1" />
1191                         <field name="ptrBtnState" type="CARD16" mask="KeyButMask" />
1192                         <pad bytes="6" />
1193                 </reply>
1194         </request>
1195
1196         <request name="LatchLockState" opcode="5">
1197                 <field name="deviceSpec" type="DeviceSpec" />
1198                 <field name="affectModLocks" type="CARD8" mask="ModMask" />
1199                 <field name="modLocks" type="CARD8" mask="ModMask" />
1200                 <field name="lockGroup" type="BOOL" />
1201                 <field name="groupLock" type="CARD8" enum="Group" />
1202                 <field name="affectModLatches" type="CARD8" mask="ModMask" />
1203                 <pad bytes="1" />
1204                 <field name="latchGroup" type="BOOL" />
1205                 <field name="groupLatch" type="CARD16" />
1206         </request>
1207
1208         <request name="GetControls" opcode="6">
1209                 <field name="deviceSpec" type="DeviceSpec" />
1210                 <pad bytes="2" />
1211                 <reply>
1212                         <field name="deviceID" type="CARD8" />
1213                         <field name="mouseKeysDfltBtn" type="CARD8" />
1214                         <field name="numGroups" type="CARD8" />
1215                         <field name="groupsWrap" type="CARD8" />
1216                         <field name="internalModsMask" type="CARD8" mask="ModMask" />
1217                         <field name="ignoreLockModsMask" type="CARD8" mask="ModMask" />
1218                         <field name="internalModsRealMods" type="CARD8" mask="ModMask" />
1219                         <field name="ignoreLockModsRealMods" type="CARD8" mask="ModMask" />
1220                         <pad bytes="1" />
1221                         <field name="internalModsVmods" type="CARD16" mask="VMod" />
1222                         <field name="ignoreLockModsVmods" type="CARD16" mask="VMod" />
1223                         <field name="repeatDelay" type="CARD16" />
1224                         <field name="repeatInterval" type="CARD16" />
1225                         <field name="slowKeysDelay" type="CARD16" />
1226                         <field name="debounceDelay" type="CARD16" />
1227                         <field name="mouseKeysDelay" type="CARD16" />
1228                         <field name="mouseKeysInterval" type="CARD16" />
1229                         <field name="mouseKeysTimeToMax" type="CARD16" />
1230                         <field name="mouseKeysMaxSpeed" type="CARD16" />
1231                         <field name="mouseKeysCurve" type="INT16" />
1232                         <field name="accessXOption" type="AXOption" />
1233                         <field name="accessXTimeout" type="CARD16" />
1234                         <field name="accessXTimeoutOptionsMask" type="AXOption" />
1235                         <field name="accessXTimeoutOptionsValues" type="AXOption" />
1236                         <pad bytes="2" />
1237                         <field name="accessXTimeoutMask" type="CARD32" mask="BoolCtrl" />
1238                         <field name="accessXTimeoutValues" type="CARD32" mask="BoolCtrl" />
1239                         <field name="enabledControls" type="CARD32" mask="BoolCtrl" />
1240                         <list name="perKeyRepeat" type="CARD8">
1241                                 <value>32</value>
1242                         </list>
1243                 </reply>
1244         </request>
1245
1246         <request name="SetControls" opcode="7">
1247                 <field name="deviceSpec" type="DeviceSpec" />
1248                 <field name="affectInternalRealMods" type="CARD8" mask="ModMask" />
1249                 <field name="internalRealMods" type="CARD8" mask="ModMask" />
1250                 <field name="affectIgnoreLockRealMods" type="CARD8" mask="ModMask" />
1251                 <field name="ignoreLockRealMods" type="CARD8" mask="ModMask" />
1252                 <field name="affectInternalVirtualMods" type="CARD16" mask="VMod" />
1253                 <field name="internalVirtualMods" type="CARD16" mask="VMod" />
1254                 <field name="affectIgnoreLockVirtualMods" type="CARD16" mask="VMod" />
1255                 <field name="ignoreLockVirtualMods" type="CARD16" mask="VMod" />
1256                 <field name="mouseKeysDfltBtn" type="CARD8" />
1257                 <field name="groupsWrap" type="CARD8" />
1258                 <field name="accessXOptions" type="AXOption" />
1259                 <pad bytes="2" />
1260                 <field name="affectEnabledControls" type="CARD32" mask="BoolCtrl" />
1261                 <field name="enabledControls" type="CARD32" mask="BoolCtrl" />
1262                 <field name="changeControls" type="CARD32" mask="Control" />
1263                 <field name="repeatDelay" type="CARD16" />
1264                 <field name="repeatInterval" type="CARD16" />
1265                 <field name="slowKeysDelay" type="CARD16" />
1266                 <field name="debounceDelay" type="CARD16" />
1267                 <field name="mouseKeysDelay" type="CARD16" />
1268                 <field name="mouseKeysInterval" type="CARD16" />
1269                 <field name="mouseKeysTimeToMax" type="CARD16" />
1270                 <field name="mouseKeysMaxSpeed" type="CARD16" />
1271                 <field name="mouseKeysCurve" type="INT16" />
1272                 <field name="accessXTimeout" type="CARD16" />
1273                 <field name="accessXTimeoutMask" type="CARD32" mask="BoolCtrl" />
1274                 <field name="accessXTimeoutValues" type="CARD32" mask="BoolCtrl" />
1275                 <field name="accessXTimeoutOptionsMask" type="AXOption" />
1276                 <field name="accessXTimeoutOptionsValues" type="AXOption" />
1277                 <list name="perKeyRepeat" type="CARD8">
1278                         <value>32</value>
1279                 </list>
1280         </request>
1281
1282         <request name="GetMap" opcode="8">
1283                 <field name="deviceSpec" type="DeviceSpec" />
1284                 <field name="full" type="CARD16" mask="MapPart" />
1285                 <field name="partial" type="CARD16" mask="MapPart" />
1286                 <field name="firstType" type="CARD8" />
1287                 <field name="nTypes" type="CARD8" />
1288                 <field name="firstKeySym" type="KEYCODE" />
1289                 <field name="nKeySyms" type="CARD8" />
1290                 <field name="firstKeyAction" type="KEYCODE" />
1291                 <field name="nKeyActions" type="CARD8" />
1292                 <field name="firstKeyBehavior" type="KEYCODE" />
1293                 <field name="nKeyBehaviors" type="CARD8" />
1294                 <field name="virtualMods" type="CARD16" mask="VMod" />
1295                 <field name="firstKeyExplicit" type="KEYCODE" />
1296                 <field name="nKeyExplicit" type="CARD8" />
1297                 <field name="firstModMapKey" type="KEYCODE" />
1298                 <field name="nModMapKeys" type="CARD8" />
1299                 <field name="firstVModMapKey" type="KEYCODE" />
1300                 <field name="nVModMapKeys" type="CARD8" />
1301                 <pad bytes="2" />
1302                 <reply>
1303                         <field name="deviceID" type="CARD8" />
1304                         <pad bytes="2" />
1305                         <field name="minKeyCode" type="KEYCODE" />
1306                         <field name="maxKeyCode" type="KEYCODE" />
1307                         <field name="present" type="CARD16" mask="MapPart" />
1308                         <field name="firstType" type="CARD8" />
1309                         <field name="nTypes" type="CARD8" />
1310                         <field name="totalTypes" type="CARD8" />
1311                         <field name="firstKeySym" type="KEYCODE" />
1312                         <field name="totalSyms" type="CARD16" />
1313                         <field name="nKeySyms" type="CARD8" />
1314                         <field name="firstKeyAction" type="KEYCODE" />
1315                         <field name="totalActions" type="CARD16" />
1316                         <field name="nKeyActions" type="CARD8" />
1317                         <field name="firstKeyBehavior" type="KEYCODE" />
1318                         <field name="nKeyBehaviors" type="CARD8" />
1319                         <field name="totalKeyBehaviors" type="CARD8" />
1320                         <field name="firstKeyExplicit" type="KEYCODE" />
1321                         <field name="nKeyExplicit" type="CARD8" />
1322                         <field name="totalKeyExplicit" type="CARD8" />
1323                         <field name="firstModMapKey" type="KEYCODE" />
1324                         <field name="nModMapKeys" type="CARD8" />
1325                         <field name="totalModMapKeys" type="CARD8" />
1326                         <field name="firstVModMapKey" type="KEYCODE" />
1327                         <field name="nVModMapKeys" type="CARD8" />
1328                         <field name="totalVModMapKeys" type="CARD8" />
1329                         <pad bytes="1" />
1330                         <field name="virtualMods" type="CARD16" mask="VMod" />
1331                         <switch name="map">
1332                                 <fieldref>present</fieldref>
1333                                 <bitcase>
1334                                         <enumref ref="MapPart">KeyTypes</enumref>
1335                                         <list name="types_rtrn" type="KeyType">
1336                                                 <fieldref>nTypes</fieldref>
1337                                         </list>
1338                                 </bitcase>
1339                                 <bitcase>
1340                                         <enumref ref="MapPart">KeySyms</enumref>
1341                                         <list name="syms_rtrn" type="KeySymMap">
1342                                                 <fieldref>nKeySyms</fieldref>
1343                                         </list>
1344                                 </bitcase>
1345                                 <bitcase>
1346                                         <enumref ref="MapPart">KeyActions</enumref>
1347                                         <list name="acts_rtrn_count" type="CARD8">
1348                                                 <fieldref>nKeyActions</fieldref>
1349                                         </list>
1350                                         <list type="CARD8" name="alignment_pad">
1351                                             <op op="-">
1352                                                 <op op="&amp;">
1353                                                     <op op="+">
1354                                                         <fieldref>nKeyActions</fieldref>
1355                                                         <value>3</value>
1356                                                     </op>
1357                                                     <unop op="~">
1358                                                         <value>3</value>
1359                                                     </unop>
1360                                                 </op>
1361                                                 <fieldref>nKeyActions</fieldref>
1362                                             </op>
1363                                         </list>
1364                                         <list name="acts_rtrn_acts" type="Action">
1365                                                 <fieldref>totalActions</fieldref>
1366                                         </list>
1367                                 </bitcase>
1368                                 <bitcase>
1369                                         <enumref ref="MapPart">KeyBehaviors</enumref>
1370                                         <list name="behaviors_rtrn" type="SetBehavior">
1371                                                 <fieldref>totalKeyBehaviors</fieldref>
1372                                         </list>
1373                                 </bitcase>
1374                                 <bitcase>
1375                                         <enumref ref="MapPart">VirtualMods</enumref>
1376                                         <list name="vmods_rtrn" type="CARD8" mask="ModMask">
1377                                                 <popcount><fieldref>virtualMods</fieldref></popcount>
1378                                         </list>
1379                                         <list type="CARD8" name="alignment_pad2">
1380                                             <op op="-">
1381                                                 <op op="&amp;">
1382                                                     <op op="+">
1383                                                         <popcount><fieldref>virtualMods</fieldref></popcount>
1384                                                         <value>3</value>
1385                                                     </op>
1386                                                     <unop op="~">
1387                                                         <value>3</value>
1388                                                     </unop>
1389                                                 </op>
1390                                                 <popcount><fieldref>virtualMods</fieldref></popcount>
1391                                             </op>
1392                                         </list>
1393                                 </bitcase>
1394                                 <bitcase>
1395                                         <enumref ref="MapPart">ExplicitComponents</enumref>
1396                                         <list name="explicit_rtrn" type="SetExplicit">
1397                                                 <fieldref>totalKeyExplicit</fieldref>
1398                                         </list>
1399                                         <list type="CARD16" name="alignment_pad3">
1400                                             <op op="-">
1401                                                 <op op="&amp;">
1402                                                     <op op="+">
1403                                                         <fieldref>totalKeyExplicit</fieldref>
1404                                                         <value>1</value>
1405                                                     </op>
1406                                                     <unop op="~">
1407                                                         <value>1</value>
1408                                                     </unop>
1409                                                 </op>
1410                                                 <fieldref>totalKeyExplicit</fieldref>
1411                                             </op>
1412                                         </list>
1413                                 </bitcase>
1414                                 <bitcase>
1415                                         <enumref ref="MapPart">ModifierMap</enumref>
1416                                         <list name="modmap_rtrn" type="KeyModMap">
1417                                                 <fieldref>totalModMapKeys</fieldref>
1418                                         </list>
1419                                         <list type="CARD16" name="alignment_pad4">
1420                                             <op op="-">
1421                                                 <op op="&amp;">
1422                                                     <op op="+">
1423                                                         <fieldref>totalModMapKeys</fieldref>
1424                                                         <value>1</value>
1425                                                     </op>
1426                                                     <unop op="~">
1427                                                         <value>1</value>
1428                                                     </unop>
1429                                                 </op>
1430                                                 <fieldref>totalModMapKeys</fieldref>
1431                                             </op>
1432                                         </list>
1433                                 </bitcase>
1434                                 <bitcase>
1435                                         <enumref ref="MapPart">VirtualModMap</enumref>
1436                                         <list name="vmodmap_rtrn" type="KeyVModMap">
1437                                                 <fieldref>totalVModMapKeys</fieldref>
1438                                         </list>
1439                                 </bitcase>
1440                         </switch>
1441                 </reply>
1442         </request>
1443
1444         <request name="SetMap" opcode="9">
1445                 <field name="deviceSpec" type="DeviceSpec" />
1446                 <field name="present" type="CARD16" mask="MapPart" />
1447                 <field name="flags" type="CARD16" mask="SetMapFlags" />
1448                 <field name="minKeyCode" type="KEYCODE" />
1449                 <field name="maxKeyCode" type="KEYCODE" />
1450                 <field name="firstType" type="CARD8" />
1451                 <field name="nTypes" type="CARD8" />
1452                 <field name="firstKeySym" type="KEYCODE" />
1453                 <field name="nKeySyms" type="CARD8" />
1454                 <field name="totalSyms" type="CARD16" />
1455                 <field name="firstKeyAction" type="KEYCODE" />
1456                 <field name="nKeyActions" type="CARD8" />
1457                 <field name="totalActions" type="CARD16" />
1458                 <field name="firstKeyBehavior" type="KEYCODE" />
1459                 <field name="nKeyBehaviors" type="CARD8" />
1460                 <field name="totalKeyBehaviors" type="CARD8" />
1461                 <field name="firstKeyExplicit" type="KEYCODE" />
1462                 <field name="nKeyExplicit" type="CARD8" />
1463                 <field name="totalKeyExplicit" type="CARD8" />
1464                 <field name="firstModMapKey" type="KEYCODE" />
1465                 <field name="nModMapKeys" type="CARD8" />
1466                 <field name="totalModMapKeys" type="CARD8" />
1467                 <field name="firstVModMapKey" type="KEYCODE" />
1468                 <field name="nVModMapKeys" type="CARD8" />
1469                 <field name="totalVModMapKeys" type="CARD8" />
1470                 <field name="virtualMods" type="CARD16" mask="VMod" />
1471                 <switch name="values">
1472                         <fieldref>present</fieldref>
1473                         <bitcase>
1474                                 <enumref ref="MapPart">KeyTypes</enumref>
1475                                 <list name="types" type="SetKeyType">
1476                                         <fieldref>nTypes</fieldref>
1477                                 </list>
1478                         </bitcase>
1479                         <bitcase>
1480                                 <enumref ref="MapPart">KeySyms</enumref>
1481                                 <list name="syms" type="KeySymMap">
1482                                         <fieldref>nKeySyms</fieldref>
1483                                 </list>
1484                         </bitcase>
1485                         <bitcase>
1486                                 <enumref ref="MapPart">KeyActions</enumref>
1487                                 <list name="actionsCount" type="CARD8">
1488                                         <fieldref>nKeyActions</fieldref>
1489                                 </list>
1490                                 <list name="actions" type="Action">
1491                                         <fieldref>totalActions</fieldref>
1492                                 </list>
1493                         </bitcase>
1494                         <bitcase>
1495                                 <enumref ref="MapPart">KeyBehaviors</enumref>
1496                                 <list name="behaviors" type="SetBehavior">
1497                                         <fieldref>totalKeyBehaviors</fieldref>
1498                                 </list>
1499                         </bitcase>
1500                         <bitcase>
1501                                 <enumref ref="MapPart">VirtualMods</enumref>
1502                                 <list name="vmods" type="CARD8">
1503                                         <popcount><fieldref>virtualMods</fieldref></popcount>
1504                                 </list>
1505                         </bitcase>
1506                         <bitcase>
1507                                 <enumref ref="MapPart">ExplicitComponents</enumref>
1508                                 <list name="explicit" type="SetExplicit">
1509                                         <fieldref>totalKeyExplicit</fieldref>
1510                                 </list>
1511                         </bitcase>
1512                         <bitcase>
1513                                 <enumref ref="MapPart">ModifierMap</enumref>
1514                                 <list name="modmap" type="KeyModMap">
1515                                         <fieldref>totalModMapKeys</fieldref>
1516                                 </list>
1517                         </bitcase>
1518                         <bitcase>
1519                                 <enumref ref="MapPart">VirtualModMap</enumref>
1520                                 <list name="vmodmap" type="KeyVModMap">
1521                                         <fieldref>totalVModMapKeys</fieldref>
1522                                 </list>
1523                         </bitcase>
1524                 </switch>
1525         </request>
1526
1527         <request name="GetCompatMap" opcode="10">
1528                 <field name="deviceSpec" type="DeviceSpec" />
1529                 <field name="groups" type="CARD8" mask="SetOfGroup" />
1530                 <field name="getAllSI" type="BOOL" />
1531                 <field name="firstSI" type="CARD16" />
1532                 <field name="nSI" type="CARD16" />
1533                 <reply>
1534                         <field name="deviceID" type="CARD8" />
1535                         <field name="groupsRtrn" type="CARD8" mask="SetOfGroup" />
1536                         <pad bytes="1" />
1537                         <field name="firstSIRtrn" type="CARD16" />
1538                         <field name="nSIRtrn" type="CARD16" />
1539                         <field name="nTotalSI" type="CARD16" />
1540                         <pad bytes="16" />
1541                         <list name="si_rtrn" type="SymInterpret">
1542                                 <fieldref>nSIRtrn</fieldref>
1543                         </list>
1544                         <list name="group_rtrn" type="ModDef">
1545                                 <popcount>
1546                                         <fieldref>groupsRtrn</fieldref>
1547                                 </popcount>
1548                         </list>
1549                 </reply>
1550         </request>
1551
1552         <request name="SetCompatMap" opcode="11">
1553                 <field name="deviceSpec" type="DeviceSpec" />
1554                 <pad bytes="1" />
1555                 <field name="recomputeActions" type="BOOL" />
1556                 <field name="truncateSI" type="BOOL" />
1557                 <field name="groups" type="CARD8" mask="SetOfGroup" />
1558                 <field name="firstSI" type="CARD16" />
1559                 <field name="nSI" type="CARD16" />
1560                 <pad bytes="2"/>
1561                 <list name="si" type="SymInterpret">
1562                         <fieldref>nSI</fieldref>
1563                 </list>
1564                 <list name="groupMaps" type="ModDef">
1565                         <popcount>
1566                                 <fieldref>groups</fieldref>
1567                         </popcount>
1568                 </list>
1569         </request>
1570
1571         <request name="GetIndicatorState" opcode="12">
1572                 <field name="deviceSpec" type="DeviceSpec" />
1573                 <pad bytes="2" />
1574                 <reply>
1575                         <field name="deviceID" type="CARD8" />
1576                         <field name="state" type="CARD32" />
1577                         <pad bytes="20" />
1578                 </reply>
1579         </request>
1580
1581         <request name="GetIndicatorMap" opcode="13">
1582                 <field name="deviceSpec" type="DeviceSpec" />
1583                 <pad bytes="2" />
1584                 <field name="which" type="CARD32" />
1585                 <reply>
1586                         <field name="deviceID" type="CARD8" />
1587                         <field name="which" type="CARD32" />
1588                         <field name="realIndicators" type="CARD32" />
1589                         <field name="nIndicators" type="CARD8" />
1590                         <pad bytes="15" />
1591                         <list name="maps" type="IndicatorMap">
1592                                 <popcount><fieldref>which</fieldref></popcount>
1593                         </list>
1594                 </reply>
1595         </request>
1596
1597         <request name="SetIndicatorMap" opcode="14">
1598                 <field name="deviceSpec" type="DeviceSpec" />
1599                 <pad bytes="2" />
1600                 <field name="which" type="CARD32" />
1601                 <list name="maps" type="IndicatorMap">
1602                         <popcount>
1603                                 <fieldref>which</fieldref>
1604                         </popcount>
1605                 </list>
1606         </request>
1607
1608         <request name="GetNamedIndicator" opcode="15">
1609                 <field name="deviceSpec" type="DeviceSpec" />
1610                 <field name="ledClass" type="LedClassSpec" enum="LedClass" />
1611                 <field name="ledID" type="IDSpec" altenum="ID" />
1612                 <pad bytes="2" />
1613                 <field name="indicator" type="ATOM" />
1614                 <reply>
1615                         <field name="deviceID" type="CARD8" />
1616                         <field name="indicator" type="ATOM" />
1617                         <field name="found" type="BOOL" />
1618                         <field name="on" type="BOOL" />
1619                         <field name="realIndicator" type="BOOL" />
1620                         <field name="ndx" type="CARD8" />
1621                         <field name="map_flags" type="CARD8" mask="IMFlag" />
1622                         <field name="map_whichGroups" type="CARD8" mask="IMGroupsWhich" />
1623                         <field name="map_groups" type="CARD8" mask="SetOfGroups" />
1624                         <field name="map_whichMods" type="CARD8" mask="IMModsWhich" />
1625                         <field name="map_mods" type="CARD8" mask="ModMask" />
1626                         <field name="map_realMods" type="CARD8" mask="ModMask" />
1627                         <field name="map_vmod" type="CARD16" mask="VMod" />
1628                         <field name="map_ctrls" type="CARD32" mask="BoolCtrl" />
1629                         <pad bytes="3" />
1630                 </reply>
1631         </request>
1632
1633         <request name="SetNamedIndicator" opcode="16" >
1634                 <field name="deviceSpec" type="DeviceSpec" />
1635                 <field name="ledClass" type="LedClassSpec" enum="LedClass" />
1636                 <field name="ledID" type="IDSpec" altenum="ID" />
1637                 <pad bytes="2" />
1638                 <field name="indicator" type="ATOM" />
1639                 <field name="setState" type="BOOL" />
1640                 <field name="on" type="BOOL" />
1641                 <field name="setMap" type="BOOL" />
1642                 <field name="createMap" type="BOOL" />
1643                 <pad bytes="1" />
1644                 <field name="map_flags" type="CARD8" mask="IMFlag" />
1645                 <field name="map_whichGroups" type="CARD8" mask="IMGroupsWhich" />
1646                 <field name="map_groups" type="CARD8" mask="SetOfGroups" />
1647                 <field name="map_whichMods" type="CARD8" mask="IMModsWhich" />
1648                 <field name="map_realMods" type="CARD8" mask="ModMask" />
1649                 <field name="map_vmods" type="CARD16" mask="VMod" />
1650                 <field name="map_ctrls" type="CARD32" mask="BoolCtrl" />
1651         </request>
1652
1653         <request name="GetNames" opcode="17">
1654                 <field name="deviceSpec" type="DeviceSpec" />
1655                 <pad bytes="2" />
1656                 <field name="which" type="CARD32" mask="NameDetail" />
1657                 <reply>
1658                         <field name="deviceID" type="CARD8" />
1659                         <field name="which" type="CARD32" mask="NameDetail" />
1660                         <field name="minKeyCode" type="KEYCODE" />
1661                         <field name="maxKeyCode" type="KEYCODE" />
1662                         <field name="nTypes" type="CARD8" />
1663                         <field name="groupNames" type="CARD8" mask="SetOfGroup" />
1664                         <field name="virtualMods" type="CARD16" mask="VMod" />
1665                         <field name="firstKey" type="KEYCODE" />
1666                         <field name="nKeys" type="CARD8" />
1667                         <field name="indicators" type="CARD32" />
1668                         <field name="nRadioGroups" type="CARD8" />
1669                         <field name="nKeyAliases" type="CARD8" />
1670                         <field name="nKTLevels" type="CARD16" />
1671                         <pad bytes="4" />
1672                         <switch name="valueList">
1673                                 <fieldref>which</fieldref>
1674                                 <bitcase>
1675                                         <enumref ref="NameDetail">Keycodes</enumref>
1676                                         <field name="keycodesName" type="ATOM" />
1677                                 </bitcase>
1678                                 <bitcase>
1679                                         <enumref ref="NameDetail">Geometry</enumref>
1680                                         <field name="geometryName" type="ATOM" />
1681                                 </bitcase>
1682                                 <bitcase>
1683                                         <enumref ref="NameDetail">Symbols</enumref>
1684                                         <field name="symbolsName" type="ATOM" />
1685                                 </bitcase>
1686                                 <bitcase>
1687                                         <enumref ref="NameDetail">PhysSymbols</enumref>
1688                                         <field name="physSymbolsName" type="ATOM" />
1689                                 </bitcase>
1690                                 <bitcase>
1691                                         <enumref ref="NameDetail">Types</enumref>
1692                                         <field name="typesName" type="ATOM" />
1693                                 </bitcase>
1694                                 <bitcase>
1695                                         <enumref ref="NameDetail">Compat</enumref>
1696                                         <field name="compatName" type="ATOM" />
1697                                 </bitcase>
1698                                 <bitcase>
1699                                         <enumref ref="NameDetail">KeyTypeNames</enumref>
1700                                         <list name="typeNames" type="ATOM">
1701                                                 <fieldref>nTypes</fieldref>
1702                                         </list>
1703                                 </bitcase>
1704                                 <bitcase>
1705                                         <enumref ref="NameDetail">KTLevelNames</enumref>
1706                                         <list name="nLevelsPerType" type="CARD8">
1707                                           <!-- Xlib uses NTypes here - 
1708                                                the spec says nKTLevels is correct, but
1709                                                it does not work in reality
1710                                                <fieldref>nKTLevels</fieldref> -->
1711                                                 <fieldref>nTypes</fieldref>
1712                                         </list>
1713                                         <list type="CARD8" name="alignment_pad">
1714                                             <op op="-">
1715                                                 <op op="&amp;">
1716                                                     <op op="+">
1717                                                         <fieldref>nTypes</fieldref>
1718                                                         <value>3</value>
1719                                                     </op>
1720                                                     <unop op="~">
1721                                                         <value>3</value>
1722                                                     </unop>
1723                                                 </op>
1724                                                 <fieldref>nTypes</fieldref>
1725                                             </op>
1726                                         </list>
1727                                         <list name="ktLevelNames" type="ATOM">
1728                                                 <sumof ref="nLevelsPerType" />
1729                                         </list>
1730                                 </bitcase>
1731                                 <bitcase>
1732                                         <enumref ref="NameDetail">IndicatorNames</enumref>
1733                                         <list name="indicatorNames" type="ATOM">
1734                                                 <popcount>
1735                                                         <fieldref>indicators</fieldref>
1736                                                 </popcount>
1737                                         </list>
1738                                 </bitcase>
1739                                 <bitcase>
1740                                         <enumref ref="NameDetail">VirtualModNames</enumref>
1741                                         <list name="virtualModNames" type="ATOM">
1742                                                 <popcount>
1743                                                         <fieldref>virtualMods</fieldref>
1744                                                 </popcount>
1745                                         </list>
1746                                 </bitcase>
1747                                 <bitcase>
1748                                         <enumref ref="NameDetail">GroupNames</enumref>
1749                                         <list name="groups" type="ATOM">
1750                                                 <popcount>
1751                                                         <fieldref>groupNames</fieldref>
1752                                                 </popcount>
1753                                         </list>
1754                                 </bitcase>
1755                                 <bitcase>
1756                                         <enumref ref="NameDetail">KeyNames</enumref>
1757                                         <list name="keyNames" type="KeyName">
1758                                                 <fieldref>nKeys</fieldref>
1759                                         </list>
1760                                 </bitcase>
1761                                 <bitcase>
1762                                         <enumref ref="NameDetail">KeyAliases</enumref>
1763                                         <list name="keyAliases" type="KeyAlias">
1764                                                 <fieldref>nKeyAliases</fieldref>
1765                                         </list>
1766                                 </bitcase>
1767                                 <bitcase>
1768                                         <enumref ref="NameDetail">RGNames</enumref>
1769                                         <list name="radioGroupNames" type="ATOM">
1770                                                 <fieldref>nRadioGroups</fieldref>
1771                                         </list>
1772                                 </bitcase>
1773                         </switch>
1774                 </reply>
1775         </request>
1776
1777         <request name="SetNames" opcode="18">
1778                 <field name="deviceSpec" type="DeviceSpec" />
1779                 <field name="virtualMods" type="CARD16" mask="VMod" />
1780                 <field name="which" type="CARD32" mask="NameDetail" />
1781                 <field name="firstType" type="CARD8" />
1782                 <field name="nTypes" type="CARD8" />
1783                 <field name="firstKTLevelt" type="CARD8" />
1784                 <field name="nKTLevels" type="CARD8" />
1785                 <field name="indicators" type="CARD32" />
1786                 <field name="groupNames" type="CARD8" mask="SetOfGroup" />
1787                 <field name="nRadioGroups" type="CARD8" />
1788                 <field name="firstKey" type="KEYCODE" />
1789                 <field name="nKeys" type="CARD8" />
1790                 <field name="nKeyAliases" type="CARD8"/>
1791                 <pad bytes="1" />
1792                 <field name="totalKTLevelNames" type="CARD16" />
1793                 <switch name="values">
1794                         <fieldref>which</fieldref>
1795                         <bitcase>
1796                                 <enumref ref="NameDetail">Keycodes</enumref>
1797                                 <field name="keycodesName" type="ATOM" />
1798                         </bitcase>
1799                         <bitcase>
1800                                 <enumref ref="NameDetail">Geometry</enumref>
1801                                 <field name="geometryName" type="ATOM" />
1802                         </bitcase>
1803                         <bitcase>
1804                                 <enumref ref="NameDetail">Symbols</enumref>
1805                                 <field name="symbolsName" type="ATOM" />
1806                         </bitcase>
1807                         <bitcase>
1808                                 <enumref ref="NameDetail">PhysSymbols</enumref>
1809                                 <field name="physSymbolsName" type="ATOM" />
1810                         </bitcase>
1811                         <bitcase>
1812                                 <enumref ref="NameDetail">Types</enumref>
1813                                 <field name="typesName" type="ATOM" />
1814                         </bitcase>
1815                         <bitcase>
1816                                 <enumref ref="NameDetail">Compat</enumref>
1817                                 <field name="compatName" type="ATOM" />
1818                         </bitcase>
1819                         <bitcase>
1820                                 <enumref ref="NameDetail">KeyTypeNames</enumref>
1821                                 <list name="typeNames" type="ATOM">
1822                                         <fieldref>nTypes</fieldref>
1823                                 </list>
1824                         </bitcase>
1825                         <bitcase>
1826                                 <enumref ref="NameDetail">KTLevelNames</enumref>
1827                                 <list name="nLevelsPerType" type="CARD8">
1828                                         <fieldref>nKTLevels</fieldref>
1829                                 </list>
1830                                 <list name="ktLevelNames" type="ATOM">
1831                                         <sumof ref="nLevelsPerType" />
1832                                 </list>
1833                         </bitcase>
1834                         <bitcase>
1835                                 <enumref ref="NameDetail">IndicatorNames</enumref>
1836                                 <list name="indicatorNames" type="ATOM">
1837                                         <popcount>
1838                                                 <fieldref>indicators</fieldref>
1839                                         </popcount>
1840                                 </list>
1841                         </bitcase>
1842                         <bitcase>
1843                                 <enumref ref="NameDetail">VirtualModNames</enumref>
1844                                 <list name="virtualModNames" type="ATOM">
1845                                         <popcount>
1846                                                 <fieldref>virtualMods</fieldref>
1847                                         </popcount>
1848                                 </list>
1849                         </bitcase>
1850                         <bitcase>
1851                                 <enumref ref="NameDetail">GroupNames</enumref>
1852                                 <list name="groups" type="ATOM">
1853                                         <popcount>
1854                                                 <fieldref>groupNames</fieldref>
1855                                         </popcount>
1856                                 </list>
1857                         </bitcase>
1858                         <bitcase>
1859                                 <enumref ref="NameDetail">KeyNames</enumref>
1860                                 <list name="keyNames" type="KeyName">
1861                                         <fieldref>nKeys</fieldref>
1862                                 </list>
1863                         </bitcase>
1864                         <bitcase>
1865                                 <enumref ref="NameDetail">KeyAliases</enumref>
1866                                 <list name="keyAliases" type="KeyAlias">
1867                                         <fieldref>nKeyAliases</fieldref>
1868                                 </list>
1869                         </bitcase>
1870                         <bitcase>
1871                                 <enumref ref="NameDetail">RGNames</enumref>
1872                                 <list name="radioGroupNames" type="ATOM">
1873                                         <fieldref>nRadioGroups</fieldref>
1874                                 </list>
1875                         </bitcase>
1876                 </switch>
1877         </request>
1878
1879         <request name="GetGeometry" opcode="19">
1880                 <field name="deviceSpec" type="DeviceSpec" />
1881                 <pad bytes="2" />
1882                 <field name="name" type="ATOM" />
1883                 <reply>
1884                         <field name="deviceID" type="CARD8" />
1885                         <field name="name" type="ATOM" />
1886                         <field name="found" type="BOOL" />
1887                         <pad bytes="1" />
1888                         <field name="widthMM" type="CARD16" />
1889                         <field name="heightMM" type="CARD16" />
1890                         <field name="nProperties" type="CARD16" />
1891                         <field name="nColors" type="CARD16" />
1892                         <field name="nShapes" type="CARD16" />
1893                         <field name="nSections" type="CARD16" />
1894                         <field name="nDoodads" type="CARD16" />
1895                         <field name="nKeyAliases" type="CARD16" />
1896                         <field name="baseColorNdx" type="CARD8" />
1897                         <field name="labelColorNdx" type="CARD8" />
1898                         <field name="labelFont" type="CountedString16" />
1899                         <list name="properties" type="Property">
1900                                 <fieldref>nProperties</fieldref>
1901                         </list>
1902                         <list name="colors" type="CountedString16">
1903                                 <fieldref>nColors</fieldref>
1904                         </list>
1905                         <list name="shapes" type="Shape">
1906                                 <fieldref>nShapes</fieldref>
1907                         </list>
1908                         <list name="sections" type="Section">
1909                                 <fieldref>nSections</fieldref>
1910                         </list>
1911                         <list name="doodads" type="Doodad">
1912                                 <fieldref>nDoodads</fieldref>
1913                         </list>
1914                         <list name="keyAliases" type="KeyAlias">
1915                                 <fieldref>nKeyAliases</fieldref>
1916                         </list>
1917                 </reply>
1918         </request>
1919
1920         <request name="SetGeometry" opcode="20">
1921                 <field name="deviceSpec" type="DeviceSpec" />
1922                 <field name="nShapes" type="CARD8" />
1923                 <field name="nSections" type="CARD8" />
1924                 <field name="name" type="ATOM" />
1925                 <field name="widthMM" type="CARD16" />
1926                 <field name="heightMM" type="CARD16" />
1927                 <field name="nProperties" type="CARD16" />
1928                 <field name="nColors" type="CARD16" />
1929                 <field name="nDoodads" type="CARD16" />
1930                 <field name="nKeyAliases" type="CARD16" />
1931                 <field name="baseColorNdx" type="CARD8" />
1932                 <field name="labelColorNdx" type="CARD8" />
1933                 <pad bytes="2" />
1934                 <field name="labelFont" type="CountedString16" />
1935                 <list name="properties" type="Property">
1936                         <fieldref>nProperties</fieldref>
1937                 </list>
1938                 <list name="colors" type="CountedString16">
1939                         <fieldref>nColors</fieldref>
1940                 </list>
1941                 <list name="shapes" type="Shape">
1942                         <fieldref>nShapes</fieldref>
1943                 </list>
1944                 <list name="sections" type="Section">
1945                         <fieldref>nSections</fieldref>
1946                 </list>
1947                 <list name="doodads" type="Doodad">
1948                         <fieldref>nDoodads</fieldref>
1949                 </list>
1950                 <list name="keyAliases" type="KeyAlias">
1951                         <fieldref>nKeyAliases</fieldref>
1952                 </list>
1953         </request>
1954
1955         <request name="PerClientFlags" opcode="21">
1956                 <field name="deviceSpec" type="DeviceSpec" />
1957                 <pad bytes="2" />
1958                 <field name="change" type="CARD32" mask="PerClientFlag" />
1959                 <field name="value" type="CARD32" mask="PerClientFlag" />
1960                 <field name="ctrlsToChange" type="CARD32" mask="BoolCtrl" />
1961                 <field name="autoCtrls" type="CARD32" mask="BoolCtrl" />
1962                 <field name="autoCtrlsValues" type="CARD32" mask="BoolCtrl" />
1963                 <reply>
1964                         <field name="deviceID" type="CARD8"/>
1965                         <field name="supported" type="CARD32" mask="PerClientFlag" />
1966                         <field name="value" type="CARD32" mask="PerClientFlag" />
1967                         <field name="autoCtrls" type="CARD32" mask="BoolCtrl" />
1968                         <field name="autoCtrlsValues" type="CARD32" mask="BoolCtrl" />
1969                         <pad bytes="8" />
1970                 </reply>
1971         </request>
1972
1973         <request name="ListComponents" opcode="22">
1974                 <field name="deviceSpec" type="DeviceSpec" />
1975                 <field name="maxNames" type="CARD16" />
1976                 <field name="keymapsSpecLen" type="CARD8" />
1977                 <list name="keymapsSpec" type="STRING8">
1978                         <fieldref>keymapsSpecLen</fieldref>
1979                 </list>
1980                 <field name="keycodesSpecLen" type="CARD8" />
1981                 <list name="keycodesSpec" type="STRING8">
1982                         <fieldref>keycodesSpecLen</fieldref>
1983                 </list>
1984                 <field name="typesSpecLen" type="CARD8" />
1985                 <list name="typesSpec" type="STRING8">
1986                         <fieldref>typesSpecLen</fieldref>
1987                 </list>
1988                 <field name="compatMapSpecLen" type="CARD8" />
1989                 <list name="compatMapSpec" type="STRING8">
1990                         <fieldref>compatMapSpecLen</fieldref>
1991                 </list>
1992                 <field name="symbolsSpecLen" type="CARD8" />
1993                 <list name="symbolsSpec" type="STRING8">
1994                         <fieldref>symbolsSpecLen</fieldref>
1995                 </list>
1996                 <field name="geometrySpecLen" type="CARD8" />
1997                 <list name="geometrySpec" type="STRING8">
1998                         <fieldref>geometrySpecLen</fieldref>
1999                 </list>
2000                 <reply>
2001                         <field name="deviceID" type="CARD8" />
2002                         <field name="nKeymaps" type="CARD16" />
2003                         <field name="nKeycodes" type="CARD16" />
2004                         <field name="nTypes" type="CARD16" />
2005                         <field name="nCompatMaps" type="CARD16" />
2006                         <field name="nSymbols" type="CARD16" />
2007                         <field name="nGeometries" type="CARD16" />
2008                         <field name="extra" type="CARD16" />
2009                         <pad bytes="10" />
2010                         <list name="keymaps" type="Listing">
2011                                 <fieldref>nKeymaps</fieldref>
2012                         </list>
2013                         <list name="keycodes" type="Listing">
2014                                 <fieldref>nKeycodes</fieldref>
2015                         </list>
2016                         <list name="types" type="Listing">
2017                                 <fieldref>nTypes</fieldref>
2018                         </list>
2019                         <list name="compatMaps" type="Listing">
2020                                 <fieldref>nCompatMaps</fieldref>
2021                         </list>
2022                         <list name="symbols" type="Listing">
2023                                 <fieldref>nSymbols</fieldref>
2024                         </list>
2025                         <list name="geometries" type="Listing">
2026                                 <fieldref>nGeometries</fieldref>
2027                         </list>
2028                 </reply>
2029         </request>
2030
2031         <request name="GetKbdByName" opcode="23">
2032                 <field name="deviceSpec" type="DeviceSpec" />
2033                 <field name="need" type="CARD16" mask="GBNDetail" />
2034                 <field name="want" type="CARD16" mask="GBNDetail" />
2035                 <field name="load" type="BOOL" />
2036                 <pad bytes="1" />
2037                 <field name="keymapsSpecLen" type="CARD8" />
2038                 <list name="keymapsSpec" type="STRING8">
2039                         <fieldref>keymapsSpecLen</fieldref>
2040                 </list>
2041                 <field name="keycodesSpecLen" type="CARD8" />
2042                 <list name="keycodesSpec" type="STRING8">
2043                         <fieldref>keycodesSpecLen</fieldref>
2044                 </list>
2045                 <field name="typesSpecLen" type="CARD8" />
2046                 <list name="typesSpec" type="STRING8">
2047                         <fieldref>typesSpecLen</fieldref>
2048                 </list>
2049                 <field name="compatMapSpecLen" type="CARD8" />
2050                 <list name="compatMapSpec" type="STRING8">
2051                         <fieldref>compatMapSpecLen</fieldref>
2052                 </list>
2053                 <field name="symbolsSpecLen" type="CARD8" />
2054                 <list name="symbolsSpec" type="STRING8">
2055                         <fieldref>symbolsSpecLen</fieldref>
2056                 </list>
2057                 <field name="geometrySpecLen" type="CARD8" />
2058                 <list name="geometrySpec" type="STRING8">
2059                         <fieldref>geometrySpecLen</fieldref>
2060                 </list>
2061                 <reply>
2062                         <field name="deviceID" type="CARD8" />
2063                         <field name="minKeyCode" type="KEYCODE" />
2064                         <field name="maxKeyCode" type="KEYCODE" />
2065                         <field name="loaded" type="BOOL" />
2066                         <field name="newKeyboard" type="BOOL" />
2067                         <field name="found" type="CARD16" mask="GBNDetail" />
2068                         <field name="reported" type="CARD16" mask="GBNDetail" />
2069                         <pad bytes="16" />
2070                         <switch name="replies">
2071                                 <fieldref>reported</fieldref>
2072                                 <bitcase name="types">
2073                                         <enumref ref="GBNDetail">Types</enumref>
2074                                         <enumref ref="GBNDetail">ClientSymbols</enumref>
2075                                         <enumref ref="GBNDetail">ServerSymbols</enumref>
2076                                         <!-- from the spec, this has to be a GetMap reply -->
2077                                         <field name="getmap_type" type="CARD8" />
2078                                         <!-- done 'emulating' GetMap reply header-->
2079                                         <field name="typeDeviceID" type="CARD8" />
2080                                         <!-- from the spec, this has to be a GetMap reply -->
2081                                         <field name="getmap_sequence" type="CARD16" />
2082                                         <field name="getmap_length" type="CARD32" />
2083                                         <!-- done 'emulating' GetMap reply header-->
2084                                         <pad bytes="2" />
2085                                         <field name="typeMinKeyCode" type="KEYCODE" />
2086                                         <field name="typeMaxKeyCode" type="KEYCODE" />
2087                                         <field name="present" type="CARD16" mask="MapPart" />
2088                                         <field name="firstType" type="CARD8" />
2089                                         <field name="nTypes" type="CARD8" />
2090                                         <field name="totalTypes" type="CARD8" />
2091                                         <field name="firstKeySym" type="KEYCODE" />
2092                                         <field name="totalSyms" type="CARD16" />
2093                                         <field name="nKeySyms" type="CARD8" />
2094                                         <field name="firstKeyAction" type="KEYCODE" />
2095                                         <field name="totalActions" type="CARD16" />
2096                                         <field name="nKeyActions" type="CARD8" />
2097                                         <field name="firstKeyBehavior" type="KEYCODE" />
2098                                         <field name="nKeyBehaviors" type="CARD8" />
2099                                         <field name="totalKeyBehaviors" type="CARD8" />
2100                                         <field name="firstKeyExplicit" type="KEYCODE" />
2101                                         <field name="nKeyExplicit" type="CARD8" />
2102                                         <field name="totalKeyExplicit" type="CARD8" />
2103                                         <field name="firstModMapKey" type="KEYCODE" />
2104                                         <field name="nModMapKeys" type="CARD8" />
2105                                         <field name="totalModMapKeys" type="CARD8" />
2106                                         <field name="firstVModMapKey" type="KEYCODE" />
2107                                         <field name="nVModMapKeys" type="CARD8" />
2108                                         <field name="totalVModMapKeys" type="CARD8" />
2109                                         <pad bytes="1" />
2110                                         <field name="virtualMods" type="CARD16" mask="VMod" />
2111                                         <switch name="map">
2112                                                 <fieldref>present</fieldref>
2113                                                 <bitcase>
2114                                                         <enumref ref="MapPart">KeyTypes</enumref>
2115                                                         <list name="types_rtrn" type="KeyType">
2116                                                                 <fieldref>nTypes</fieldref>
2117                                                         </list>
2118                                                 </bitcase>
2119                                                 <bitcase>
2120                                                         <enumref ref="MapPart">KeySyms</enumref>
2121                                                         <list name="syms_rtrn" type="KeySymMap">
2122                                                                 <fieldref>nKeySyms</fieldref>
2123                                                         </list>
2124                                                 </bitcase>
2125                                                 <bitcase>
2126                                                         <enumref ref="MapPart">KeyActions</enumref>
2127                                                         <list name="acts_rtrn_count" type="CARD8">
2128                                                                 <fieldref>nKeyActions</fieldref>
2129                                                         </list>
2130                                                         <list name="acts_rtrn_acts" type="Action">
2131                                                                 <fieldref>totalActions</fieldref>
2132                                                         </list>
2133                                                 </bitcase>
2134                                                 <bitcase>
2135                                                         <enumref ref="MapPart">KeyBehaviors</enumref>
2136                                                         <list name="behaviors_rtrn" type="SetBehavior">
2137                                                                 <fieldref>totalKeyBehaviors</fieldref>
2138                                                         </list>
2139                                                 </bitcase>
2140                                                 <bitcase>
2141                                                         <enumref ref="MapPart">VirtualMods</enumref>
2142                                                         <list name="vmods_rtrn" type="CARD8" mask="ModMask">
2143                                                                 <popcount><fieldref>virtualMods</fieldref></popcount>
2144                                                         </list>
2145                                                 </bitcase>
2146                                                 <bitcase>
2147                                                         <enumref ref="MapPart">ExplicitComponents</enumref>
2148                                                         <list name="explicit_rtrn" type="SetExplicit">
2149                                                                 <fieldref>totalKeyExplicit</fieldref>
2150                                                         </list>
2151                                                 </bitcase>
2152                                                 <bitcase>
2153                                                         <enumref ref="MapPart">ModifierMap</enumref>
2154                                                         <list name="modmap_rtrn" type="KeyModMap">
2155                                                                 <fieldref>totalModMapKeys</fieldref>
2156                                                         </list>
2157                                                 </bitcase>
2158                                                 <bitcase>
2159                                                         <enumref ref="MapPart">VirtualModMap</enumref>
2160                                                         <list name="vmodmap_rtrn" type="KeyVModMap">
2161                                                                 <fieldref>totalVModMapKeys</fieldref>
2162                                                         </list>
2163                                                 </bitcase>
2164                                         </switch>
2165                                 </bitcase>
2166                                 <bitcase name="compat_map">
2167                                         <enumref ref="GBNDetail">CompatMap</enumref>
2168                                         <!-- from the spec, this has to include a reply header -->
2169                                         <field name="compatmap_type" type="CARD8" />
2170                                         <field name="compatDeviceID" type="CARD8" />
2171                                         <field name="compatmap_sequence" type="CARD16" />
2172                                         <field name="compatmap_length" type="CARD32" />
2173                                         <!-- done 'emulating' reply header -->
2174                                         <field name="groupsRtrn" type="CARD8" mask="SetOfGroup" />
2175                                         <pad bytes="1" />
2176                                         <field name="firstSIRtrn" type="CARD16" />
2177                                         <field name="nSIRtrn" type="CARD16" />
2178                                         <field name="nTotalSI" type="CARD16" />
2179                                         <pad bytes="16" />
2180                                         <list name="si_rtrn" type="SymInterpret">
2181                                                 <fieldref>nSIRtrn</fieldref>
2182                                         </list>
2183                                         <list name="group_rtrn" type="ModDef">
2184                                                 <popcount>
2185                                                         <fieldref>groupsRtrn</fieldref>
2186                                                 </popcount>
2187                                         </list>
2188                                 </bitcase>
2189                                 <bitcase name="indicator_maps">
2190                                         <enumref ref="GBNDetail">IndicatorMaps</enumref>
2191                                         <!-- from the spec, this has to include a reply header -->
2192                                         <field name="indicatormap_type" type="CARD8" />
2193                                         <field name="indicatorDeviceID" type="CARD8" />
2194                                         <field name="indicatormap_sequence" type="CARD16" />
2195                                         <field name="indicatormap_length" type="CARD32" />
2196                                         <!-- done 'emulating' reply header -->
2197                                         <field name="which" type="CARD32" />
2198                                         <field name="realIndicators" type="CARD32" />
2199                                         <field name="nIndicators" type="CARD8" />
2200                                         <pad bytes="15" />
2201                                         <list name="maps" type="IndicatorMap">
2202                                                 <fieldref>nIndicators</fieldref>
2203                                         </list>
2204                                 </bitcase>
2205                                 <bitcase name="key_names">
2206                                         <enumref ref="GBNDetail">KeyNames</enumref>
2207                                         <enumref ref="GBNDetail">OtherNames</enumref>
2208                                         <!-- from the spec, this has to include a reply header -->
2209                                         <field name="keyname_type" type="CARD8" />
2210                                         <field name="keyDeviceID" type="CARD8" />
2211                                         <field name="keyname_sequence" type="CARD16" />
2212                                         <field name="keyname_length" type="CARD32" />
2213                                         <!-- done 'emulating' reply header -->
2214                                         <field name="which" type="CARD32" mask="NameDetail" />
2215                                         <field name="keyMinKeyCode" type="KEYCODE" />
2216                                         <field name="keyMaxKeyCode" type="KEYCODE" />
2217                                         <field name="nTypes" type="CARD8" />
2218                                         <field name="groupNames" type="CARD8" mask="SetOfGroup" />
2219                                         <field name="virtualMods" type="CARD16" mask="VMod" />
2220                                         <field name="firstKey" type="KEYCODE" />
2221                                         <field name="nKeys" type="CARD8" />
2222                                         <field name="indicators" type="CARD32" />
2223                                         <field name="nRadioGroups" type="CARD8" />
2224                                         <field name="nKeyAliases" type="CARD8" />
2225                                         <field name="nKTLevels" type="CARD16" />
2226                                         <pad bytes="4" />
2227                                         <switch name="valueList">
2228                                                 <fieldref>which</fieldref>
2229                                                 <bitcase>
2230                                                         <enumref ref="NameDetail">Keycodes</enumref>
2231                                                         <field name="keycodesName" type="ATOM" />
2232                                                 </bitcase>
2233                                                 <bitcase>
2234                                                         <enumref ref="NameDetail">Geometry</enumref>
2235                                                         <field name="geometryName" type="ATOM" />
2236                                                 </bitcase>
2237                                                 <bitcase>
2238                                                         <enumref ref="NameDetail">Symbols</enumref>
2239                                                         <field name="symbolsName" type="ATOM" />
2240                                                 </bitcase>
2241                                                 <bitcase>
2242                                                         <enumref ref="NameDetail">PhysSymbols</enumref>
2243                                                         <field name="physSymbolsName" type="ATOM" />
2244                                                 </bitcase>
2245                                                 <bitcase>
2246                                                         <enumref ref="NameDetail">Types</enumref>
2247                                                         <field name="typesName" type="ATOM" />
2248                                                 </bitcase>
2249                                                 <bitcase>
2250                                                         <enumref ref="NameDetail">Compat</enumref>
2251                                                         <field name="compatName" type="ATOM" />
2252                                                 </bitcase>
2253                                                 <bitcase>
2254                                                         <enumref ref="NameDetail">KeyTypeNames</enumref>
2255                                                         <list name="typeNames" type="ATOM">
2256                                                                 <fieldref>nTypes</fieldref>
2257                                                         </list>
2258                                                 </bitcase>
2259                                                 <bitcase>
2260                                                         <enumref ref="NameDetail">KTLevelNames</enumref>
2261                                                         <list name="nLevelsPerType" type="CARD8">
2262                                                                 <fieldref>nKTLevels</fieldref>
2263                                                         </list>
2264                                                         <list name="ktLevelNames" type="ATOM">
2265                                                                 <sumof ref="nLevelsPerType" />
2266                                                         </list>
2267                                                 </bitcase>
2268                                                 <bitcase>
2269                                                         <enumref ref="NameDetail">IndicatorNames</enumref>
2270                                                         <list name="indicatorNames" type="ATOM">
2271                                                                 <popcount>
2272                                                                         <fieldref>indicators</fieldref>
2273                                                                 </popcount>
2274                                                         </list>
2275                                                 </bitcase>
2276                                                 <bitcase>
2277                                                         <enumref ref="NameDetail">VirtualModNames</enumref>
2278                                                         <list name="virtualModNames" type="ATOM">
2279                                                                 <popcount>
2280                                                                         <fieldref>virtualMods</fieldref>
2281                                                                 </popcount>
2282                                                         </list>
2283                                                 </bitcase>
2284                                                 <bitcase>
2285                                                         <enumref ref="NameDetail">GroupNames</enumref>
2286                                                         <list name="groups" type="ATOM">
2287                                                                 <popcount>
2288                                                                         <fieldref>groupNames</fieldref>
2289                                                                 </popcount>
2290                                                         </list>
2291                                                 </bitcase>
2292                                                 <bitcase>
2293                                                         <enumref ref="NameDetail">KeyNames</enumref>
2294                                                         <list name="keyNames" type="KeyName">
2295                                                                 <fieldref>nKeys</fieldref>
2296                                                         </list>
2297                                                 </bitcase>
2298                                                 <bitcase>
2299                                                         <enumref ref="NameDetail">KeyAliases</enumref>
2300                                                         <list name="keyAliases" type="KeyAlias">
2301                                                                 <fieldref>nKeyAliases</fieldref>
2302                                                         </list>
2303                                                 </bitcase>
2304                                                 <bitcase>
2305                                                         <enumref ref="NameDetail">RGNames</enumref>
2306                                                         <list name="radioGroupNames" type="ATOM">
2307                                                                 <fieldref>nRadioGroups</fieldref>
2308                                                         </list>
2309                                                 </bitcase>
2310                                         </switch>
2311                                 </bitcase>
2312                                 <bitcase name="geometry">
2313                                         <enumref ref="GBNDetail">Geometry</enumref>
2314                                         <!-- from the spec, this has to include a reply header -->
2315                                         <field name="geometry_type" type="CARD8" />
2316                                         <field name="geometryDeviceID" type="CARD8" />
2317                                         <field name="geometry_sequence" type="CARD16" />
2318                                         <field name="geometry_length" type="CARD32" />
2319                                         <!-- done 'emulating' reply header -->
2320                                         <field name="name" type="ATOM" />
2321                                         <field name="geometryFound" type="BOOL" />
2322                                         <pad bytes="1" />
2323                                         <field name="widthMM" type="CARD16" />
2324                                         <field name="heightMM" type="CARD16" />
2325                                         <field name="nProperties" type="CARD16" />
2326                                         <field name="nColors" type="CARD16" />
2327                                         <field name="nShapes" type="CARD16" />
2328                                         <field name="nSections" type="CARD16" />
2329                                         <field name="nDoodads" type="CARD16" />
2330                                         <field name="nKeyAliases" type="CARD16" />
2331                                         <field name="baseColorNdx" type="CARD8" />
2332                                         <field name="labelColorNdx" type="CARD8" />
2333                                         <field name="labelFont" type="CountedString16" />
2334                                         <list name="properties" type="Property">
2335                                                 <fieldref>nProperties</fieldref>
2336                                         </list>
2337                                         <list name="colors" type="CountedString16">
2338                                                 <fieldref>nColors</fieldref>
2339                                         </list>
2340                                         <list name="shapes" type="Shape">
2341                                                 <fieldref>nShapes</fieldref>
2342                                         </list>
2343                                         <list name="sections" type="Section">
2344                                                 <fieldref>nSections</fieldref>
2345                                         </list>
2346                                         <list name="doodads" type="Doodad">
2347                                                 <fieldref>nDoodads</fieldref>
2348                                         </list>
2349                                         <list name="keyAliases" type="KeyAlias">
2350                                                 <fieldref>nKeyAliases</fieldref>
2351                                         </list>
2352                                 </bitcase>
2353                         </switch>
2354                 </reply>
2355         </request>
2356
2357         <request name="GetDeviceInfo" opcode="24">
2358                 <field name="deviceSpec" type="DeviceSpec" />
2359                 <field name="wanted" type="CARD16" mask="XIFeature" />
2360                 <field name="allButtons" type="BOOL" />
2361                 <field name="firstButton" type="CARD8" />
2362                 <field name="nButtons" type="CARD8" />
2363                 <pad bytes="1" />
2364                 <field name="ledClass" type="LedClassSpec" enum="LedClass" />
2365                 <field name="ledID" type="IDSpec" altenum="ID" />
2366                 <reply>
2367                         <field name="deviceID" type="CARD8" />
2368                         <field name="present" type="CARD16" mask="XIFeature" />
2369                         <field name="supported" type="CARD16" mask="XIFeature" />
2370                         <field name="unsupported" type="CARD16" mask="XIFeature" />
2371                         <field name="nDeviceLedFBs" type="CARD16" />
2372                         <field name="firstBtnWanted" type="CARD8" />
2373                         <field name="nBtnsWanted" type="CARD8" />
2374                         <field name="firstBtnRtrn" type="CARD8" />
2375                         <field name="nBtnsRtrn" type="CARD8" />
2376                         <field name="totalBtns" type="CARD8" />
2377                         <field name="hasOwnState" type="BOOL" />
2378                         <field name="dfltKbdFB" type="CARD16" altenum="ID" />
2379                         <field name="dfltLedFB" type="CARD16" altenum="ID" />
2380                         <pad bytes="2" />
2381                         <field name="devType" type="ATOM" />
2382                         <field name="nameLen" type="CARD16" />
2383                         <list name="name" type="STRING8">
2384                                 <fieldref>nameLen</fieldref>
2385                         </list>
2386                         <list name="btnActions" type="Action">
2387                                 <fieldref>nBtnsRtrn</fieldref>
2388                         </list>
2389                         <list name="leds" type="DeviceLedInfo">
2390                                 <fieldref>nDeviceLedFBs</fieldref>
2391                         </list>
2392                 </reply>
2393         </request>
2394
2395
2396         <request name="SetDeviceInfo" opcode="25">
2397                 <field name="deviceSpec" type="DeviceSpec" />
2398                 <field name="firstBtn" type="CARD8" />
2399                 <field name="nBtns" type="CARD8" />
2400                 <field name="change" type="CARD16" mask="XIFeature" />
2401                 <field name="nDeviceLedFBs" type="CARD16" />
2402                 <list name="btnActions" type="Action">
2403                         <fieldref>nBtns</fieldref>
2404                 </list>
2405                 <list name="leds" type="DeviceLedInfo">
2406                         <fieldref>nDeviceLedFBs</fieldref>
2407                 </list>
2408         </request>
2409
2410         <request name="SetDebuggingFlags" opcode="101">
2411                 <field name="msgLength" type="CARD16" />
2412                 <pad bytes="2" />
2413                 <field name="affectFlags" type="CARD32" />
2414                 <field name="flags" type="CARD32" />
2415                 <field name="affectCtrls" type="CARD32" />
2416                 <field name="ctrls" type="CARD32" />
2417                 <list name="message" type="STRING8">
2418                         <fieldref>msgLength</fieldref>
2419                 </list>
2420                 <reply>
2421                         <pad bytes="1" />
2422                         <field name="currentFlags" type="CARD32" />
2423                         <field name="currentCtrls" type="CARD32" />
2424                         <field name="supportedFlags" type="CARD32" />
2425                         <field name="supportedCtrls" type="CARD32" />
2426                         <pad bytes="8" />
2427                 </reply>
2428         </request>
2429
2430         <!-- Events -->
2431
2432         <event name="NewKeyboardNotify" number="0">
2433                 <field name="xkbType" type="CARD8" />
2434                 <field name="time" type="TIMESTAMP" />
2435                 <field name="deviceID" type="CARD8" />
2436                 <field name="oldDeviceID" type="CARD8" />
2437                 <field name="minKeyCode" type="KEYCODE" />
2438                 <field name="maxKeyCode" type="KEYCODE" />
2439                 <field name="oldMinKeyCode" type="KEYCODE" />
2440                 <field name="oldMaxKeyCode" type="KEYCODE" />
2441                 <field name="requestMajor" type="CARD8" />
2442                 <field name="requestMinor" type="CARD8" />
2443                 <field name="changed" type="CARD16" mask="NKNDetail" />
2444                 <pad bytes="14" />
2445         </event>
2446
2447         <event name="MapNotify" number="1">
2448                 <field name="xkbType" type="CARD8" />
2449                 <field name="time" type="TIMESTAMP" />
2450                 <field name="deviceID" type="CARD8" />
2451                 <field name="ptrBtnActions" type="CARD8" />
2452                 <field name="changed" type="CARD16" mask="MapPart" />
2453                 <field name="minKeyCode" type="KEYCODE" />
2454                 <field name="maxKeyCode" type="KEYCODE" />
2455                 <field name="firstType" type="CARD8" />
2456                 <field name="nTypes" type="CARD8" />
2457                 <field name="firstKeySym" type="KEYCODE" />
2458                 <field name="nKeySyms" type="CARD8" />
2459                 <field name="firstKeyAct" type="KEYCODE" />
2460                 <field name="nKeyActs" type="CARD8" />
2461                 <field name="firstKeyBehavior" type="KEYCODE" />
2462                 <field name="nKeyBehavior" type="CARD8" />
2463                 <field name="firstKeyExplicit" type="KEYCODE" />
2464                 <field name="nKeyExplicit" type="CARD8" />
2465                 <field name="firstModMapKey" type="KEYCODE" />
2466                 <field name="nModMapKeys" type="CARD8" />
2467                 <field name="firstVModMapKey" type="KEYCODE" />
2468                 <field name="nVModMapKeys" type="CARD8" />
2469                 <field name="virtualMods" type="CARD16" mask="VMod" />
2470                 <pad bytes="2" />
2471         </event>
2472
2473         <event name="StateNotify" number="2">
2474                 <field name="xkbType" type="CARD8" />
2475                 <field name="time" type="TIMESTAMP" />
2476                 <field name="deviceID" type="CARD8" />
2477                 <field name="mods" type="CARD8" mask="ModMask" />
2478                 <field name="baseMods" type="CARD8" mask="ModMask" />
2479                 <field name="latchedMods" type="CARD8" mask="ModMask" />
2480                 <field name="lockedMods" type="CARD8" mask="ModMask" />
2481                 <field name="group" type="CARD8" enum="Group" />
2482                 <field name="baseGroup" type="INT16" />
2483                 <field name="latchedGroup" type="INT16" />
2484                 <field name="lockedGroup" type="CARD8" enum="Group" />
2485                 <field name="compatState" type="CARD8" mask="ModMask" />
2486                 <field name="grabMods" type="CARD8" mask="ModMask" />
2487                 <field name="compatGrabMods" type="CARD8" mask="ModMask" />
2488                 <field name="lookupMods" type="CARD8" mask="ModMask" />
2489                 <field name="compatLoockupMods" type="CARD8" mask="ModMask" />
2490                 <field name="ptrBtnState" type="CARD16" mask="KeyButMask" />
2491                 <field name="changed" type="CARD16" mask="StatePart" />
2492                 <field name="keycode" type="KEYCODE" />
2493                 <field name="eventType" type="CARD8" />
2494                 <field name="requestMajor" type="CARD8" />
2495                 <field name="requestMinor" type="CARD8" />
2496         </event>
2497
2498         <event name="ControlsNotify" number="3">
2499                 <field name="xkbType" type="CARD8" />
2500                 <field name="time" type="TIMESTAMP" />
2501                 <field name="deviceID" type="CARD8" />
2502                 <field name="numGroups" type="CARD8" />
2503                 <pad bytes="2" />
2504                 <field name="changedControls" type="CARD32" mask="Control" />
2505                 <field name="enabledControls" type="CARD32" mask="BoolCtrl" />
2506                 <field name="enabledControlChanges" type="CARD32" mask="BoolCtrl" />
2507                 <field name="keycode" type="KEYCODE" />
2508                 <field name="eventType" type="CARD8" />
2509                 <field name="requestMajor" type="CARD8" />
2510                 <field name="requestMinor" type="CARD8" />
2511                 <pad bytes="4" />
2512         </event>
2513
2514         <event name="IndicatorStateNotify" number="4">
2515                 <field name="xkbType" type="CARD8" />
2516                 <field name="time" type="TIMESTAMP" />
2517                 <field name="deviceID" type="CARD8" />
2518                 <pad bytes="3" />
2519                 <field name="state" type="CARD32" />
2520                 <field name="stateChanged" type="CARD32" />
2521                 <pad bytes="12" />
2522         </event>
2523
2524         <event name="IndicatorMapNotify" number="5">
2525                 <field name="xkbType" type="CARD8" />
2526                 <field name="time" type="TIMESTAMP" />
2527                 <field name="deviceID" type="CARD8" />
2528                 <pad bytes="3" />
2529                 <field name="state" type="CARD32" />
2530                 <field name="mapChanged" type="CARD32" />
2531                 <pad bytes="12" />
2532         </event>
2533
2534         <event name="NamesNotify" number="6">
2535                 <field name="xkbType" type="CARD8" />
2536                 <field name="time" type="TIMESTAMP" />
2537                 <field name="deviceID" type="CARD8" />
2538                 <pad bytes="1" />
2539                 <field name="changed" type="CARD16" mask="NameDetail" />
2540                 <field name="firstType" type="CARD8" />
2541                 <field name="nTypes" type="CARD8" />
2542                 <field name="firstLevelName" type="CARD8" />
2543                 <field name="nLevelNames" type="CARD8" />
2544                 <pad bytes="1" />
2545                 <field name="nRadioGroups" type="CARD8" />
2546                 <field name="nKeyAliases" type="CARD8" />
2547                 <field name="changedGroupNames" type="CARD8" mask="SetOfGroup" />
2548                 <field name="changedVirtualMods" type="CARD16" mask="VMod" />
2549                 <field name="firstKey" type="KEYCODE" />
2550                 <field name="nKeys" type="CARD8" />
2551                 <field name="changedIndicators" type="CARD32" />
2552                 <pad bytes="4" />
2553         </event>
2554
2555         <event name="CompatMapNotify" number="7">
2556                 <field name="xkbType" type="CARD8" />
2557                 <field name="time" type="TIMESTAMP" />
2558                 <field name="deviceID" type="CARD8" />
2559                 <field name="changedGroups" type="CARD8" mask="SetOfGroup" />
2560                 <field name="firstSI" type="CARD16" />
2561                 <field name="nSI" type="CARD16" />
2562                 <field name="nTotalSI" type="CARD16" />
2563                 <pad bytes="16" />
2564         </event>
2565
2566         <event name="BellNotify" number="8">
2567                 <field name="xkbType" type="CARD8" />
2568                 <field name="time" type="TIMESTAMP" />
2569                 <field name="deviceID" type="CARD8" />
2570                 <field name="bellClass" type="CARD8" enum="BellClassResult" />
2571                 <field name="bellID" type="CARD8" />
2572                 <field name="percent" type="CARD8" />
2573                 <field name="pitch" type="CARD16" />
2574                 <field name="duration" type="CARD16" />
2575                 <field name="name" type="ATOM" />
2576                 <field name="window" type="WINDOW" />
2577                 <field name="eventOnly" type="BOOL" />
2578                 <pad bytes="7" />
2579         </event>
2580
2581         <event name="ActionMessage" number="9">
2582                 <field name="xkbType" type="CARD8" />
2583                 <field name="time" type="TIMESTAMP" />
2584                 <field name="deviceID" type="CARD8" />
2585                 <field name="keycode" type="KEYCODE" />
2586                 <field name="press" type="BOOL" />
2587                 <field name="keyEventFollows" type="BOOL" />
2588                 <field name="mods" type="CARD8" mask="ModMask" />
2589                 <field name="group" type="CARD8" enum="Group" />
2590                 <list name="message" type="STRING8">
2591                         <value>8</value>
2592                 </list>
2593                 <pad bytes="10" />
2594         </event>
2595
2596         <event name="AccessXNotify" number="10">
2597                 <field name="xkbType" type="CARD8" />
2598                 <field name="time" type="TIMESTAMP" />
2599                 <field name="deviceID" type="CARD8" />
2600                 <field name="keycode" type="KEYCODE" />
2601                 <field name="detailt" type="CARD16" mask="AXNDetail" />
2602                 <field name="slowKeysDelay" type="CARD16" />
2603                 <field name="debounceDelay" type="CARD16" />
2604                 <pad bytes="16" />
2605         </event>
2606
2607         <event name="ExtensionDeviceNotify" number="11">
2608                 <field name="xkbType" type="CARD8" />
2609                 <field name="time" type="TIMESTAMP" />
2610                 <field name="deviceID" type="CARD8" />
2611                 <pad bytes="1" />
2612                 <field name="reason" type="CARD16" mask="XIFeature" />
2613                 <field name="ledClass" type="CARD16" enum="LedClassResult" />
2614                 <field name="ledID" type="CARD8" />
2615                 <field name="ledsDefined" type="CARD32" />
2616                 <field name="ledState" type="CARD32" />
2617                 <field name="firstButton" type="CARD8" />
2618                 <field name="nButtons" type="CARD8" />
2619                 <field name="supported" type="CARD16" mask="XIFeature" />
2620                 <field name="unsupported" type="CARD16" mask="XIFeature" />
2621                 <pad bytes="2" />
2622         </event>
2623 </xcb>