+ <switch name="data">
+ <fieldref>type</fieldref>
+ <case name="key">
+ <enumref ref="DeviceClassType">Key</enumref>
+ <field type="CARD16" name="num_keys" />
+ <list type="CARD32" name="keys">
+ <fieldref>num_keys</fieldref>
+ </list>
+ </case>
+ <case name="button">
+ <enumref ref="DeviceClassType">Button</enumref>
+ <field type="CARD16" name="num_buttons" />
+ <list type="CARD32" name="state">
+ <op op="/">
+ <op op="+">
+ <fieldref>num_buttons</fieldref>
+ <value>31</value>
+ </op>
+ <value>32</value>
+ </op>
+ </list>
+ <list type="ATOM" name="labels">
+ <fieldref>num_buttons</fieldref>
+ </list>
+ </case>
+ <case name="valuator">
+ <enumref ref="DeviceClassType">Valuator</enumref>
+ <field type="CARD16" name="number" />
+ <field type="ATOM" name="label" />
+ <field type="FP3232" name="min" />
+ <field type="FP3232" name="max" />
+ <field type="FP3232" name="value" />
+ <field type="CARD32" name="resolution" />
+ <field type="CARD8" name="mode" enum="ValuatorMode" />
+ <pad bytes="3" />
+ </case>
+ <case name="scroll">
+ <enumref ref="DeviceClassType">Scroll</enumref>
+ <field type="CARD16" name="number" />
+ <field type="CARD16" name="scroll_type" enum="ScrollType" />
+ <pad bytes="2" />
+ <field type="CARD32" name="flags" mask="ScrollFlags" />
+ <field type="FP3232" name="increment" />
+ </case>
+ <case name="touch">
+ <enumref ref="DeviceClassType">Touch</enumref>
+ <field type="CARD8" name="mode" enum="TouchMode" />
+ <field type="CARD8" name="num_touches" />
+ </case>
+ </switch>