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