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