1ea1d6981Smrg<chapter id='Interactions_Between_XKB_and_the_X_Input_Extension'> 2ea1d6981Smrg<title>Interactions Between XKB and the X Input Extension</title> 3ea1d6981Smrg 4ea1d6981Smrg<para> 5ea1d6981SmrgAll XKB interactions with the input extension are optional; implementors are 6ea1d6981Smrgfree to restrict the effects of the X Keyboard Extension to the core keyboard 7ea1d6981Smrgdevice. The <emphasis> 8ea1d6981SmrgXkbGetExtensionDeviceInfo</emphasis> 9ea1d6981Smrg request reports whether or not an XKB implementation supports a particular 10ea1d6981Smrgcapability for input extension devices. 11ea1d6981Smrg</para> 12ea1d6981Smrg 13ea1d6981Smrg 14ea1d6981Smrg<para> 15ea1d6981SmrgXKB recognizes the following interactions with the X Input Extension: 16ea1d6981Smrg</para> 17ea1d6981Smrg 18ea1d6981Smrg<informaltable frame='topbot'> 19ea1d6981Smrg<?dbfo keep-together="always" ?> 20ea1d6981Smrg<tgroup cols='2' align='left' colsep='0' rowsep='0'> 21ea1d6981Smrg<colspec colname='c1' colwidth='1.0*'/> 22ea1d6981Smrg<colspec colname='c2' colwidth='3.0*'/> 23ea1d6981Smrg<thead> 24ea1d6981Smrg <row rowsep='1'> 25ea1d6981Smrg <entry>Name</entry> 26ea1d6981Smrg <entry>Capability</entry> 27ea1d6981Smrg </row> 28ea1d6981Smrg</thead> 29ea1d6981Smrg<tbody> 30ea1d6981Smrg <row> 31ea1d6981Smrg <entry>XI_Keyboards</entry> 32ea1d6981Smrg <entry>If set, applications can use all XKB requests and events with 33ea1d6981Smrgextension keyboards.</entry> 34ea1d6981Smrg </row> 35ea1d6981Smrg <row> 36ea1d6981Smrg <entry>XI_ButtonActions</entry> 37ea1d6981Smrg <entry>If set, clients can assign key actions to buttons, even on input 38ea1d6981Smrgextension devices that are not keyboards.</entry> 39ea1d6981Smrg </row> 40ea1d6981Smrg <row> 41ea1d6981Smrg <entry>XI_IndicatorNames</entry> 42ea1d6981Smrg <entry>If set, clients can assign names to indicators on non-keyboard 43ea1d6981Smrgextension devices.</entry> 44ea1d6981Smrg </row> 45ea1d6981Smrg <row> 46ea1d6981Smrg <entry>XI_IndicatorMaps</entry> 47ea1d6981Smrg <entry>If set, clients can assign indicator maps to indicators on 48ea1d6981Smrgnon-keyboard extension devices. </entry> 49ea1d6981Smrg </row> 50ea1d6981Smrg <row> 51ea1d6981Smrg <entry>XI_IndicatorState</entry> 52ea1d6981Smrg <entry>If set, clients can change the state of device indicators using the 53ea1d6981Smrg<emphasis> 54ea1d6981SmrgXkbSetExtensionDeviceInfo</emphasis> 55ea1d6981Smrg request.</entry> 56ea1d6981Smrg </row> 57ea1d6981Smrg</tbody> 58ea1d6981Smrg</tgroup> 59ea1d6981Smrg</informaltable> 60ea1d6981Smrg 61ea1d6981Smrg<para> 62ea1d6981SmrgAttempts to use an XKB feature with an extension device fail with a <emphasis> 63ea1d6981SmrgKeyboard</emphasis> 64ea1d6981Smrg error if the server does not support the <emphasis> 65ea1d6981SmrgXkbXI_Keyboards</emphasis> 66ea1d6981Smrg optional feature. If a capability particular capability other than <emphasis> 67ea1d6981SmrgXkbXI_Keyboards</emphasis> 68ea1d6981Smrg is not supported, attempts to use it fail silently. The replies for most 69ea1d6981Smrgrequests that can use one of the other optional features include a field to 70ea1d6981Smrgreport whether or not the request was successful, but such requests do not 71ea1d6981Smrgcause an error condition. 72ea1d6981Smrg</para> 73ea1d6981Smrg 74ea1d6981Smrg 75ea1d6981Smrg<para> 76ea1d6981SmrgClients can also request an <emphasis> 77ea1d6981SmrgXkbExtensionDeviceNotify</emphasis> 78ea1d6981Smrg event. This event notifies interested clients of changes to any of the 79ea1d6981Smrgsupported XKB features for extension devices, or if a request from the client 80ea1d6981Smrgthat is receiving the event attempted to use an unsupported feature. 81ea1d6981Smrg</para> 82ea1d6981Smrg 83ea1d6981Smrg<sect1 id='Using_XKB_Functions_with_Input_Extension_Keyboards'> 84ea1d6981Smrg<title>Using XKB Functions with Input Extension Keyboards</title> 85ea1d6981Smrg 86ea1d6981Smrg<para> 87ea1d6981SmrgAll XKB requests and events include a device identifier which can refer to an 88ea1d6981Smrginput extension <emphasis> 89ea1d6981SmrgKeyClass</emphasis> 90ea1d6981Smrg device, if the implementation allows XKB to control extension devices. If the 91ea1d6981Smrgimplementation does not support XKB manipulation of extension devices, the 92ea1d6981Smrgdevice identifier is ignored but it must be either <emphasis> 93ea1d6981Smrg0</emphasis> 94ea1d6981Smrg or <emphasis> 95ea1d6981SmrgUseCoreKbd</emphasis> 96ea1d6981Smrg. 97ea1d6981Smrg</para> 98ea1d6981Smrg 99ea1d6981Smrg 100ea1d6981Smrg<para> 101ea1d6981SmrgImplementations which do not support the use of XKB functions with extension 102ea1d6981Smrgkeyboards must not set the <emphasis> 103ea1d6981SmrgXkbXI_Keyboards</emphasis> 104ea1d6981Smrg flag. Attempts to use XKB features on an extension keyboard with an 105ea1d6981Smrgimplementation that does not support this feature yield a <emphasis> 106ea1d6981SmrgKeyboard</emphasis> 107ea1d6981Smrg error. 108ea1d6981Smrg</para> 109ea1d6981Smrg 110ea1d6981Smrg 111ea1d6981Smrg</sect1> 112ea1d6981Smrg<sect1 id='Pointer_and_Device_Button_Actions'> 113ea1d6981Smrg<title>Pointer and Device Button Actions</title> 114ea1d6981Smrg 115ea1d6981Smrg<para> 116ea1d6981SmrgThe XKB extension optionally allows clients to assign any key action (see 117ea1d6981Smrg<link linkend='Key_Actions'>Key Actions</link>) to core 118ea1d6981Smrgpointer or input extension device buttons. This makes it possible to control 119ea1d6981Smrgthe keyboard or generate keyboard key events from extension devices or from the 120ea1d6981Smrgcore pointer. 121ea1d6981Smrg</para> 122ea1d6981Smrg 123ea1d6981Smrg 124ea1d6981Smrg<para> 125ea1d6981SmrgXKB implementations are required to support actions for the buttons of the core 126ea1d6981Smrgpointer device, but support for actions on extension devices is optional. 127ea1d6981SmrgImplementations which do not support button actions for extension devices must 128ea1d6981Smrgnot set the <emphasis> 129ea1d6981SmrgXkbXI_ButtonActions</emphasis> 130ea1d6981Smrg flag. 131ea1d6981Smrg</para> 132ea1d6981Smrg 133ea1d6981Smrg 134ea1d6981Smrg<para> 135ea1d6981SmrgAttempts to query or assign button actions with an implementation that does not 136ea1d6981Smrgsupport this feature report failure in the request reply and might cause the 137ea1d6981Smrgserver to send an <emphasis> 138ea1d6981SmrgXkbExtensionDeviceNotify</emphasis> 139ea1d6981Smrg event to the client which issued the request that failed. Such requests never 140ea1d6981Smrgcause an error condition. 141ea1d6981Smrg</para> 142ea1d6981Smrg 143ea1d6981Smrg 144ea1d6981Smrg</sect1> 145ea1d6981Smrg<sect1 id='Indicator_Maps_for_Extension_Devices'> 146ea1d6981Smrg<title>Indicator Maps for Extension Devices</title> 147ea1d6981Smrg 148ea1d6981Smrg<para> 149ea1d6981SmrgThe XKB extension allows applications to assign indicator maps to the 150ea1d6981Smrgindicators of non-keyboard extension devices. If supported, maps can be 151ea1d6981Smrgassigned to all extension device indicators, whether they are part of a 152ea1d6981Smrgkeyboard feedback or part of an indicator feedback. 153ea1d6981Smrg</para> 154ea1d6981Smrg 155ea1d6981Smrg 156ea1d6981Smrg<para> 157ea1d6981SmrgImplementations which do not support indicator maps for extension devices must 158ea1d6981Smrgnot set the <emphasis> 159ea1d6981SmrgXkbXI_IndicatorMaps</emphasis> 160ea1d6981Smrg flag. 161ea1d6981Smrg</para> 162ea1d6981Smrg 163ea1d6981Smrg 164ea1d6981Smrg<para> 165ea1d6981SmrgAttempts to query or assign indicator maps with an implementation that does not 166ea1d6981Smrgsupport this feature report failure in the request reply and might cause the 167ea1d6981Smrgserver to send an <emphasis> 168ea1d6981SmrgXkbExtensionDeviceNotify</emphasis> 169ea1d6981Smrg event to the client which issued the request that failed. Such requests never 170ea1d6981Smrgcause an error condition. 171ea1d6981Smrg</para> 172ea1d6981Smrg 173ea1d6981Smrg 174ea1d6981Smrg<para> 175ea1d6981SmrgIf this feature is supported, the maps for the default indicators on the core 176ea1d6981Smrgkeyboard device are visible both as extension indicators and as the core 177ea1d6981Smrgindicators. Changes made with <emphasis> 178ea1d6981SmrgXkbSetDeviceInfo</emphasis> 179ea1d6981Smrg are visible via <emphasis> 180ea1d6981SmrgXkbGetIndicatorMap</emphasis> 181ea1d6981Smrg and changes made with <emphasis> 182ea1d6981SmrgXkbSetIndicatorMap</emphasis> 183ea1d6981Smrg are visible via <emphasis> 184ea1d6981SmrgXkbGetDeviceInfo</emphasis> 185ea1d6981Smrg. 186ea1d6981Smrg</para> 187ea1d6981Smrg 188ea1d6981Smrg 189ea1d6981Smrg</sect1> 190ea1d6981Smrg<sect1 id='Indicator_Names_for_Extension_Devices'> 191ea1d6981Smrg<title>Indicator Names for Extension Devices</title> 192ea1d6981Smrg 193ea1d6981Smrg<para> 194ea1d6981SmrgThe XKB extension allows applications to assign symbolic names to the 195ea1d6981Smrgindicators of non-keyboard extension devices. If supported, symbolic names can 196ea1d6981Smrgbe assigned to all extension device indicators, whether they are part of a 197ea1d6981Smrgkeyboard feedback or part of an indicator feedback. 198ea1d6981Smrg</para> 199ea1d6981Smrg 200ea1d6981Smrg 201ea1d6981Smrg<para> 202ea1d6981SmrgImplementations which do not support indicator maps for extension devices must 203ea1d6981Smrgnot set the <emphasis> 204ea1d6981SmrgXkbXI_IndicatorMaps</emphasis> 205ea1d6981Smrg flag. 206ea1d6981Smrg</para> 207ea1d6981Smrg 208ea1d6981Smrg 209ea1d6981Smrg<para> 210ea1d6981SmrgAttempts to query or assign indicator names with an implementation that does 211ea1d6981Smrgnot support this feature report failure in the request reply and might cause 212ea1d6981Smrgthe server to send an <emphasis> 213ea1d6981SmrgXkbExtensionDeviceNotify</emphasis> 214ea1d6981Smrg event to the client which issued the request that failed. Such requests never 215ea1d6981Smrgcause an error condition. 216ea1d6981Smrg</para> 217ea1d6981Smrg 218ea1d6981Smrg 219ea1d6981Smrg<para> 220ea1d6981SmrgIf this feature is supported, the names for the default indicators on the core 221ea1d6981Smrgkeyboard device are visible both as extension indicators and as the core 222ea1d6981Smrgindicators. Changes made with <emphasis> 223ea1d6981SmrgXkbSetDeviceInfo</emphasis> 224ea1d6981Smrg are visible via <emphasis> 225ea1d6981SmrgXkbGetNames</emphasis> 226ea1d6981Smrg and changes made with <emphasis> 227ea1d6981SmrgXkbSetNames</emphasis> 228ea1d6981Smrg are visible via <emphasis> 229ea1d6981SmrgXkbGetDeviceInfo</emphasis> 230ea1d6981Smrg. 231ea1d6981Smrg</para> 232ea1d6981Smrg</sect1> 233ea1d6981Smrg</chapter> 234