2 <chapter id='XKB_Protocol_Requests'>
3 <title>XKB Protocol Requests</title>
6 This document uses the syntactic conventions and common types defined by the
7 specification of the core X protocol with a number of additions, which are
15 If a client attempts to use any other XKB request except <emphasis>
16 XkbUseExtension</emphasis>
17 before the extension is properly initialized, XKB reports an <emphasis>
19 error and ignores the request. XKB is properly initialized once <emphasis>
20 XkbUseExtension</emphasis>
21 reports that the client has asked for a supported or compatible version of the
26 <sect2 id='Keyboard_Errors'>
27 <title>Keyboard Errors</title>
30 In addition to all of the errors defined by the core protocol, the X Keyboard
31 Extension defines a single error, <emphasis>
33 , which indicates that some request specified an illegal device identifier or
34 an extension device that is not a member of an appropriate. Unless otherwise
35 noted, any request with an argument of type KB_DEVICESPEC can cause <emphasis>
37 errors if an illegal or inappropriate device is specified.
42 When the extension reports a Keyboard error, the most significant byte of the
44 resource_id</emphasis>
45 is a further refinement of the error cause, as defined in the table below. The
46 least significant byte contains the device, class, or feedback id as indicated:
49 <informaltable frame='topbot'>
50 <?dbfo keep-together="always" ?>
51 <tgroup cols='4' align='left' colsep='0' rowsep='0'>
52 <colspec colname='c1' colwidth='2.0*'/>
53 <colspec colname='c2' colwidth='1.0*'/>
54 <colspec colname='c3' colwidth='3.0*'/>
55 <colspec colname='c4' colwidth='2.0*'/>
58 <entry>high-order byte</entry>
60 <entry>meaning</entry>
61 <entry>low-order byte</entry>
66 <entry>XkbErr_BadDevice</entry>
68 <entry>device not found</entry>
69 <entry>device id</entry>
72 <entry>XkbErr_BadClass</entry>
74 <entry>device found, but is the wrong class</entry>
75 <entry>class id</entry>
78 <entry>XkbErr_BadId</entry>
80 <entry>device found, class ok, but device does not have a feedback with the
82 <entry>feedback id</entry>
89 <sect2 id='Side_Effects_of_Errors'>
90 <title>Side-Effects of Errors</title>
93 With the exception of <emphasis>
96 Implementation</emphasis>
97 errors, which might result in an inconsistent internal state, no XKB request
98 that reports an error condition has any effect. Unless otherwise stated,
99 requests which update some aspect of the keyboard description will not apply
100 only part of a request — if part of a request fails, the whole thing is
107 <sect1 id='Common_Types'>
108 <title>Common Types</title>
111 The following types are used in the request and event definitions in subsequent
115 <informaltable frame='topbot'>
116 <?dbfo keep-together="auto" ?>
117 <tgroup cols='2' align='left' colsep='0' rowsep='0'>
118 <colspec colname='c1' colwidth='1.0*'/>
119 <colspec colname='c2' colwidth='2.0*'/>
128 <entry>LISTofITEMs</entry>
129 <entry> The type LISTofITEMs is special. It is similar to the
130 LISTofVALUE defined by the core protocol, but the elements of a LISTofITEMs are
131 not necessarily all the same size. The use of a BITMASK to indicate which
132 members are present is optional for a LISTofITEMs — it is possible for the
133 set of elements to be derived from one or more fields of the request.</entry>
136 <entry>KB_DEVICESPEC</entry>
137 <entry>8 bit unsigned integer, <emphasis>
138 UseCoreKbd, or UseCorePtr</emphasis>
142 <entry>KB_LEDCLASSSPEC</entry>
144 KbdFeedbackClass</emphasis>
146 LedFeedbackClass</emphasis>
148 DfltXIClass</emphasis>
150 AllXIClasses</emphasis>
156 <entry>KB_BELLCLASSSPEC</entry>
158 KbdFeedbackClass</emphasis>
160 BellFeedbackClass</emphasis>
162 DfltXIClass</emphasis>
164 AllXIClasses</emphasis>
168 <entry>KB_IDSPEC</entry>
169 <entry>8 bit unsigned integer or <emphasis>
174 <entry>KB_VMODMASK</entry>
175 <entry> CARD16, each bit corresponds to a virtual modifier</entry>
178 <entry>KB_GROUPMASK</entry>
190 <entry>KB_GROUPSWRAP</entry>
192 WrapIntoRange</emphasis>
194 ClampIntoRange</emphasis>
196 RedirectIntoRange</emphasis>
200 <entry>KB_GROUPINFO</entry>
201 <entry>{ groupsWrap: KB_GROUPSWRAP
203 numGroups: 1…4 }</entry>
206 <entry>KB_NKNDETAILSMASK</entry>
208 NKN_Keycodes</emphasis>
209 , NKN_Geometry, <emphasis>
210 NKN_DeviceID</emphasis>
214 <entry>KB_STATEMASK</entry>
215 <entry> KEYBUTMASK or KB_GROUPMASK</entry>
218 <entry>KB_STATEPARTMASK</entry>
220 ModifierState</emphasis>
222 ModifierBase</emphasis>
224 ModifierLatch</emphasis>
226 ModifierLock</emphasis>
228 GroupState</emphasis>
232 GroupLatch</emphasis>
236 CompatState</emphasis>
240 CompatGrabMods</emphasis>
242 LookupMods</emphasis>
244 CompatLookupMods</emphasis>
246 PointerButtons</emphasis>
250 <entry>KB_BOOLCTRLMASK</entry>
252 RepeatKeys</emphasis>
256 BounceKeys</emphasis>
258 StickyKeys</emphasis>
262 MouseKeysAccel</emphasis>
264 AccessXKeys</emphasis>
266 AccessXTimeout</emphasis>
268 AccessXFeedback</emphasis>
270 AudibleBell</emphasis>
276 IgnoreGroupLock</emphasis>
280 <entry>KB_CONTROLSMASK</entry>
282 GroupsWrap, InternalMods</emphasis>
284 IgnoreLockMods</emphasis>
286 PerKeyRepeat</emphasis>
288 ControlsEnabled</emphasis>
289 } or KB_BOOLCTRLMASK</entry>
292 <entry>KB_MAPPARTMASK</entry>
298 ModifierMap</emphasis>
300 ExplicitComponents</emphasis>
302 KeyActions</emphasis>
304 KeyBehaviors</emphasis>
306 VirtualMods</emphasis>
308 VirtualModMap</emphasis>
312 <entry>KB_CMDETAILMASK</entry>
316 GroupCompat</emphasis>
320 <entry>KB_NAMEDETAILMASK</entry>
322 KeycodesName</emphasis>
324 GeometryName</emphasis>
326 SymbolsName</emphasis>
329 PhysSymbolsName</emphasis>
333 CompatName</emphasis>
335 KeyTypeNames</emphasis>
337 KTLevelNames</emphasis>
339 IndicatorNames</emphasis>
343 KeyAliases</emphasis>
345 VirtualModNames</emphasis>
347 GroupNames</emphasis>
353 <entry>KB_AXNDETAILMASK</entry>
355 AXN_SKPress</emphasis>
357 AXN_SKAccept</emphasis>
359 AXN_SKReject</emphasis>
361 AXN_SKRelease, AXN_BKAccept, AXN_BKReject, AXN_AXKWarning </emphasis>
365 <entry>KB_AXSKOPTSMASK</entry>
367 AX_TwoKeys</emphasis>
369 AX_LatchToLock</emphasis>
373 <entry>KB_AXFBOPTSMASK</entry>
375 AX_SKPressFB</emphasis>
377 AX_SKAcceptFB</emphasis>
379 AX_FeatureFB</emphasis>
381 AX_SlowWarnFB</emphasis>
383 AX_IndicatorFB</emphasis>
385 AX_StickyKeysFB</emphasis>
387 AX_SKReleaseFB</emphasis>
389 AX_SKRejectFB</emphasis>
391 AX_BKRejectFB</emphasis>
393 AX_DumbBellFB</emphasis>
397 <entry>KB_AXOPTIONSMASK</entry>
398 <entry> KB_AXFBOPTSMASK or KB_AXSKOPTSMASK</entry>
401 <entry>KB_GBNDETAILMASK</entry>
405 GBN_CompatMap</emphasis>
407 GBN_ClientSymbols</emphasis>
409 GBN_ServerSymbols</emphasis>
411 GBN_IndicatorMap</emphasis>
413 GBN_KeyNames</emphasis>
415 GBN_Geometry</emphasis>
417 GBN_OtherNames</emphasis>
421 <entry>KB_BELLDETAILMASK</entry>
423 XkbAllBellNotifyEvents</emphasis>
427 <entry>KB_MSGDETAILMASK</entry>
429 XkbAllActionMessages</emphasis>
433 <entry>KB_EVENTTYPE</entry>
435 XkbNewKeyboardNotify</emphasis>
437 XkbMapNotify</emphasis>
439 XkbStateNotify</emphasis>
441 XkbControlsNotify</emphasis>
443 XkbIndicatorStateNotify</emphasis>
445 XkbIndicatorMapNotify</emphasis>
447 XkbNamesNotify</emphasis>
449 XkbCompatMapNotify</emphasis>
451 XkbBellNotify</emphasis>
453 XkbActionMessage</emphasis>
455 XkbAccessXNotify</emphasis>
457 XkbExtensionDeviceNotify</emphasis>
461 <entry>KB_ACTION</entry>
463 data: LISTofCARD8 ]</entry>
466 <entry>KB_BEHAVIOR</entry>
467 <entry>[ type: CARD8, data: CARD 8 ]</entry>
470 <entry>KB_MODDEF</entry>
471 <entry>[ mask: KEYMASK,
473 vmods: KB_VMODMASK ]</entry>
476 <entry>KB_KTMAPENTRY</entry>
477 <entry>[ active: BOOL,
479 mods: KB_MODDEF ]</entry>
482 <entry>KB_KTSETMAPENTRY</entry>
483 <entry>[ level: CARD8,
484 mods: KB_MODDEF ]</entry>
487 <entry>KB_KEYTYPE</entry>
488 <entry>[ mods: KB_MODDEF,
490 map: LISTofKB_KTMAPENTRY,
491 preserve: LISTofKB_MODDEF ]</entry>
494 <entry>KB_SETKEYTYPE</entry>
495 <entry>[ realMods: KEYMASK,
498 map: LISTofKB_KTSETMAPENTRY,
499 preserve: LISTofKB_MODDEF ]</entry>
502 <entry>KB_KEYSYMMAP</entry>
503 <entry>[ ktIndex: LISTofCARD8, width: CARD8
505 groupsWrap: KB_GROUPSWRAP,
507 syms: LISTofKEYSYM ]</entry>
510 <entry>KB_KEYVMODMAP</entry>
511 <entry>[ key: KEYCODE, vmods: CARD16 ]</entry>
514 <entry>KB_KEYMODMAP</entry>
515 <entry>[ key: KEYCODE, mods: KEYMASK ]</entry>
518 <entry>KB_EXPLICITMASK</entry>
520 ExplicitKeyType1</emphasis>
522 ExplicitKeyType2</emphasis>
524 ExplicitKeyType3</emphasis>
526 ExplicitKeyType4</emphasis>
528 ExplicitInterpret</emphasis>
530 ExplicitAutoRepeat</emphasis>
532 ExplicitBehavior</emphasis>
534 ExplicitVModMap</emphasis>
538 <entry>KB_INDICATORMASK</entry>
539 <entry> CARD32, each bit corresponds to an indicator</entry>
542 <entry>KB_IMFLAGS</entry>
544 IM_NoExplicit</emphasis>
546 IM_NoAutomatic</emphasis>
548 IM_LEDDrivesKB</emphasis>
552 <entry>KB_IMMODSWHICH</entry>
554 IM_UseNone</emphasis>
556 IM_UseBase</emphasis>
558 IM_UseLatched</emphasis>
560 IM_UseLocked</emphasis>
562 IM_UseEffective</emphasis>
564 IM_UseCompat</emphasis>
568 <entry>KB_IMGROUPSWHICH</entry>
570 IM_UseNone</emphasis>
572 IM_UseBase</emphasis>
574 IM_UseLatched</emphasis>
576 IM_UseLocked</emphasis>
578 IM_UseEffective</emphasis>
582 <entry>KB_INDICATORMAP</entry>
583 <entry>[ flags: CARD8,
586 groups: KB_GROUPMASK,
588 ctrls: KB_BOOLCTRLMASK ]</entry>
591 <entry>KB_SYMINTERPMATCH</entry>
595 SI_AnyOfOrNone</emphasis>
601 SI_Exactly</emphasis>
605 <entry>KB_SYMINTERP</entry>
606 <entry>[ sym: KEYSYM,
609 match: KB_SYMINTERPMATCH,
612 lockingKey: BOOL ]</entry>
615 <entry>KB_PCFMASK</entry>
617 PCF_DetectableAutorepeat</emphasis>
619 PCF_GrabsUseXkbState</emphasis>
621 PCF_AutoResetControls</emphasis>
623 PCF_LookupStateWhenGrabbed</emphasis>
625 PCF_SendEventUsesXKBState</emphasis>
629 <entry>KB_LCFLAGSMASK</entry>
633 LC_Default</emphasis>
635 LC_Partial</emphasis>
639 <entry>KB_LCSYMFLAGSMASK</entry>
641 LC_AlphanumericKeys</emphasis>
643 LC_ModifierKeys</emphasis>
645 LC_KeypadKeys</emphasis>
647 LC_FunctionKeys</emphasis>
649 LC_AlternateGroup</emphasis>
657 These types are used by the <emphasis>
658 XkbGetGeometry</emphasis>
660 XkbSetGeometry</emphasis>
664 <informaltable frame='topbot'>
665 <?dbfo keep-together="auto" ?>
666 <tgroup cols='2' align='left' colsep='0' rowsep='0'>
667 <colspec colname='c1' colwidth='1.0*'/>
668 <colspec colname='c2' colwidth='2.0*'/>
677 <entry>KB_PROPERTY</entry>
678 <entry>[ name, value: STRING8 ]</entry>
681 <entry>KB_POINT</entry>
682 <entry>[ x, y: CARD16 ]</entry>
685 <entry>KB_OUTLINE</entry>
686 <entry>[ cornerRadius: CARD8, points: LISTofKB_POINT ]</entry>
689 <entry>KB_SHAPE</entry>
690 <entry>[ name: ATOM, outlines: LISTofKB_OUTLINE
691 primaryNdx, approxNdx: CARD8 ]</entry>
694 <entry>KB_KEYNAME</entry>
695 <entry>[ name: LISTofCHAR ]</entry>
698 <entry>KB_KEYALIAS</entry>
699 <entry>[ real: LISTofCHAR, alias: LISTofCHAR ]</entry>
702 <entry>KB_KEY</entry>
703 <entry>[ name: KB_KEYNAME, gap: INT16,
704 shapeNdx, colorNdx: CARD8 ]</entry>
707 <entry>KB_ROW</entry>
708 <entry>[ top, left: INT16, vertical: BOOL, keys LISTofKB_KEY ]</entry>
711 <entry>KB_OVERLAYKEY</entry>
712 <entry>[ over, under: KB_KEYNAME ]</entry>
715 <entry>KB_OVERLAYROW</entry>
716 <entry>[ rowUnder: CARD8, keys: LISTofKB_OVERLAYKEY ]</entry>
719 <entry>KB_OVERLAY</entry>
720 <entry>[ sectionUnder: CARD8,
721 rows: LISTofKB_OVERLAYROW ]</entry>
724 <entry>KB_SHAPEDOODAD</entry>
725 <entry>[ name: ATOM, priority: CARD8, top, left: INT16,
726 type: { SolidDoodad, OutlineDoodad },
727 angle: INT16, width, height: CARD16
728 colorNdx, shapeNdx: CARD8 ]</entry>
731 <entry>KB_TEXTDOODAD</entry>
732 <entry>[ name: ATOM, priority: CARD8, top, left: INT16,
733 angle: INT16, width, height: CARD16,
734 colorNdx: CARD8, text: STRING8, font: STRING8 ]</entry>
737 <entry>KB_INDICATORDOODAD</entry>
738 <entry>[ name: ATOM, priority: CARD8, top, left: INT16,
740 shapeNdx, onColorNdx, offColorNdx: CARD8 ]</entry>
743 <entry>KB_LOGODOODAD</entry>
744 <entry>[ name: ATOM, priority: CARD8, top, left: INT16,
745 angle: INT16, colorNdx, shapeNdx: CARD8,
746 logoName: STRING8 ]</entry>
749 <entry>KB_DOODAD</entry>
750 <entry>KB_SHAPEDOODAD, or KB_TEXTDOODAD, or KB_INDICATORDOODAD, or
751 KB_LOGODOODAD</entry>
754 <entry>KB_SECTION</entry>
756 top, left, angle: INT16,
757 width, height: CARD16,
760 doodads: LISTofKB_DOODAD,
761 overlays: LISTofKB_OVERLAY ]</entry>
768 These types are used by <emphasis>
769 XkbGetDeviceInfo</emphasis>
771 XkbSetDeviceInfo</emphasis>
775 <informaltable frame='topbot'>
776 <?dbfo keep-together="always" ?>
777 <tgroup cols='2' align='left' colsep='0' rowsep='0'>
778 <colspec colname='c1' colwidth='1.0*'/>
779 <colspec colname='c2' colwidth='2.0*'/>
788 <entry>KB_XIDEVFEATUREMASK</entry>
790 XI_ButtonActions</emphasis>
792 XI_IndicatorNames</emphasis>
794 XI_IndicatorMaps</emphasis>
796 XI_IndicatorState</emphasis>
800 <entry>KB_XIFEATUREMASK</entry>
801 <entry>{ KB_XIDEVFEATURES or <emphasis>
802 XI_Keyboards</emphasis>
806 <entry>KB_XIDETAILMASK</entry>
807 <entry> { KB_XIFEATURES or <emphasis>
808 XI_UnsupportedFeature</emphasis>
814 <entry>KB_DEVICELEDINFO</entry>
815 <entry>[ ledClass: KB_LEDCLASSSPEC,
817 physIndicators: CARD32,
820 maps: LISTofKB_INDICATORMAP ]</entry>
827 <sect1 id='Requests'>
828 <title>Requests</title>
831 This section lists all of the requests supported by the X Keyboard Extension,
832 separated into categories of related requests.
836 <sect2 id='Initializing_the_X_Keyboard_Extension'>
837 <title>Initializing the X Keyboard Extension</title>
840 <informaltable frame='none' tabstyle='proto'>
841 <?dbfo keep-together="always" ?>
842 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
843 <colspec colname='c1' colwidth='1.0*'/>
846 <entry role='protoname'>XkbUseExtension</entry>
851 <entry role='protoargs'>wantedMajor, wantedMinor: CARD16</entry>
854 <entry role='protoreply'>
859 <entry role='protoreply'>
860 serverMajor, serverMinor: CARD16</entry>
867 This request enables XKB extension capabilities for the client that issues the
868 request; the <emphasis>
869 wantedMajor</emphasis>
871 wantedMinor</emphasis>
872 fields specify the extension version in use by the requesting client. The
877 if the server supports a compatible version, <emphasis>
879 otherwise. The <emphasis>
880 serverMajor</emphasis>
882 serverMinor</emphasis>
883 fields return the actual version supported by the server.
888 Until a client explicitly and successfully requests the XKB extension, an XKB
889 capable server reports compatibility state in all core protocol events and
890 requests. Once a client asks for XKB extension semantics by issuing this
891 request, the server reports the extended XKB keyboard state in some core
892 protocol events and requests, as described in the overview section of this
898 Clients should issue an <emphasis>
899 XkbUseExtension</emphasis>
900 request before using any other extension requests.
905 <sect2 id='Selecting_Events'>
906 <title>Selecting Events</title>
909 <informaltable frame='none' tabstyle='proto'>
910 <?dbfo keep-together="always" ?>
911 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
912 <colspec colname='c1' colwidth='1.0*'/>
915 <entry role='protoname'>XkbSelectEvents</entry>
920 <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
923 <entry role='protoname'>
924 affectWhich, clear, selectAll: KB_EVENTTYPE</entry>
927 <entry role='protoname'>
928 affectMap, map: KB_MAPPARTMASK</entry>
931 <entry role='protoname'>
932 details: LISTofITEMs</entry>
936 <entry role='protoerror'>Errors: <emphasis>
950 This request updates the event masks of the keyboard indicated by <emphasis>
951 deviceSpec</emphasis>
952 for this client. If <emphasis>
953 deviceSpec</emphasis>
954 specifies an illegal device, a <emphasis>
965 fields specify changes to the event details mask for the <emphasis>
966 XkbMapNotify</emphasis>
967 event. If any map components are set in <emphasis>
969 but not in <emphasis>
973 error results. Otherwise, any map components that are set in <emphasis>
975 are set or cleared in the map notify details mask, depending on the value of
976 the corresponding field in <emphasis>
984 affectWhich</emphasis>
989 fields specify changes to any other event details masks. If any event types
990 are set in both <emphasis>
996 error results; if any event types are specified in either <emphasis>
1000 but not in <emphasis>
1001 affectWhich</emphasis>
1004 error results. Otherwise, the detail masks for any event types specified in
1006 affectWhich</emphasis>
1007 field of this request are changed as follows:
1012 <para>If the event type is also set in <emphasis>
1014 , the detail mask for the corresponding event is set to <emphasis>
1022 <para>If the event type is also set in <emphasis>
1023 selectAll</emphasis>
1024 , the detail mask for the corresponding event is set to include all legal
1025 detail values for that type.
1029 <para>If the event type is not set in either <emphasis>
1032 selectAll</emphasis>
1033 , the corresponding element of <emphasis>
1035 lists a set of explicit changes to the details mask for the event, as
1042 Each entry of the <emphasis>
1044 list specifies changes to the event details mask for a single type of event,
1045 and consists of an <emphasis>
1047 mask and a <emphasis>
1049 mask. All details that are specified in <emphasis>
1051 are set to the corresponding value from <emphasis>
1053 ; if any details are listed in <emphasis>
1055 but not in <emphasis>
1064 The details list contains entries only for those event types, if any, that are
1065 listed in the <emphasis>
1066 affectWhich</emphasis>
1067 mask and not in either <emphasis>
1070 selectAll</emphasis>
1071 . When present, the items of the <emphasis>
1073 list appear in the following order:
1076 <informaltable frame='none'>
1077 <?dbfo keep-together="auto" ?>
1078 <tgroup cols='3' align='left' colsep='0' rowsep='0'>
1079 <colspec colname='c1' colwidth='1.0*'/>
1080 <colspec colname='c2' colwidth='1.0*'/>
1081 <colspec colname='c3' colwidth='1.0*'/>
1084 <entry>Event Type</entry>
1085 <entry>Legal Details</entry>
1092 XkbNewKeyboardNotify</emphasis>
1095 KB_NKNDETAILSMASK</emphasis>
1103 XkbStateNotify</emphasis>
1106 KB_STATEPARTMASK</emphasis>
1114 XkbControlsNotify</emphasis>
1117 KB_CONTROLMASK</emphasis>
1125 XkbIndicatorMapNotify</emphasis>
1128 KB_INDICATORMASK</emphasis>
1136 XkbIndicatorStateNotify</emphasis>
1139 KB_INDICATORMASK</emphasis>
1147 XkbNamesNotify</emphasis>
1150 KB_NAMEDETAILMASK</emphasis>
1158 XkbCompatMapNotify</emphasis>
1161 KB_CMDETAILMASK</emphasis>
1169 XkbBellNotify</emphasis>
1172 KB_BELLDETAILMASK</emphasis>
1180 XkbActionMessage</emphasis>
1183 KB_MSGDETAILMASK</emphasis>
1191 XkbAccessXNotify</emphasis>
1194 KB_AXNDETAILMASK</emphasis>
1202 XkbExtensionDeviceNotify</emphasis>
1205 KB_XIDETAILMASK</emphasis>
1216 Detail masks for event types that are not specified in <emphasis>
1217 affectWhich</emphasis>
1223 If any components are specified in a client’s event masks, the X server sends
1224 the client an appropriate event whenever any of those components change state.
1225 Unless explicitly modified, all event detail masks are empty. <link linkend='Events'>Events</link> describes all XKB events
1226 and the conditions under which the server generates them.
1231 <sect2 id='Generating_Named_Keyboard_Bells'>
1232 <title>Generating Named Keyboard Bells</title>
1235 <informaltable frame='none' tabstyle='proto'>
1236 <?dbfo keep-together="always" ?>
1237 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
1238 <colspec colname='c1' colwidth='1.0*'/>
1241 <entry role='protoname'>XkbBell</entry>
1246 <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
1249 <entry role='protoname'>
1250 bellClass: KB_BELLCLASSSPEC</entry>
1253 <entry role='protoname'>
1254 bellID: KB_IDSPEC</entry>
1257 <entry role='protoname'>
1258 percent: INT8</entry>
1261 <entry role='protoname'>
1262 forceSound: BOOL</entry>
1265 <entry role='protoname'>
1266 eventOnly: BOOL</entry>
1269 <entry role='protoname'>
1270 pitch, duration: INT16</entry>
1273 <entry role='protoname'>
1277 <entry role='protoname'>
1278 window: WINDOW</entry>
1282 <entry role='protoerror'>Errors: <emphasis>
1296 This request generates audible bells and/or <emphasis>
1297 XkbBellNotify</emphasis>
1298 events for the bell specified by the <emphasis>
1299 bellClass</emphasis>
1302 on the device specified by <emphasis>
1303 deviceSpec</emphasis>
1304 at the specified <emphasis>
1308 and volume (<emphasis>
1310 ). If deviceSpec specifies a device that does not have a bell or keyboard
1311 feedback, a <emphasis>
1319 forceSound</emphasis>
1321 eventOnly</emphasis>
1322 are set, this request yields a <emphasis>
1324 error. Otherwise, if <emphasis>
1325 forceSound</emphasis>
1328 , this request always generates a sound and never generates an event; if
1330 eventOnly</emphasis>
1333 , it causes an event but no sound. If neither <emphasis>
1334 forceSound</emphasis>
1336 eventOnly</emphasis>
1339 , this request always generates an event; if the keyboard’s global <emphasis>
1340 AudibleBell</emphasis>
1341 control is enabled, it also generates a sound.
1346 Any bell event generated by this request contains all of the information about
1347 the bell that was requested, including the symbolic name specified by <emphasis>
1349 and the event window specified by window. The <emphasis>
1353 are not directly interpreted by XKB, but they must have the value <emphasis>
1355 or specify a legal Atom or Window, respectively. <emphasis>
1356 XkbBellNotify</emphasis>
1357 events generated in response to core protocol or X input extension bell
1358 requests always report <emphasis>
1368 bellClass</emphasis>
1373 fields are interpreted as for the X input extension <emphasis>
1374 DeviceBell</emphasis>
1375 request. If <emphasis>
1379 are zero, the server uses the corresponding values for that bell from the core
1380 protocol or input extension, otherwise <emphasis>
1384 are interpreted as for the core protocol <emphasis>
1385 ChangeKeyboardControl</emphasis>
1386 request; if they do not include legal values, a <emphasis>
1388 error results. The <emphasis>
1390 field must specify a legal Window or have the value <emphasis>
1394 error results. The name field must specify a legal Atom or have the value
1399 error results. If an error occurs, this request has no other effect (i.e. does
1400 not cause a sound or generate an event).
1411 are suggested values for the bell, but XKB does not require the server to
1417 <sect2 id='Querying_and_Changing_Keyboard_State'>
1418 <title>Querying and Changing Keyboard State</title>
1421 <informaltable frame='none' tabstyle='proto'>
1422 <?dbfo keep-together="always" ?>
1423 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
1424 <colspec colname='c1' colwidth='1.0*'/>
1427 <entry role='protoname'>XkbGetState</entry>
1432 <entry role='protoargs'>deviceSpec: KB_DEVICESPEC
1436 <entry role='protoreply'>
1441 <entry role='protoreply'>
1442 mods, baseMods, latchedMods, lockedMods: KEYMASK
1446 <entry role='protoreply'>
1447 group, lockedGroup: KB_GROUP
1451 <entry role='protoreply'>
1452 baseGroup, latchedGroup: INT16
1456 <entry role='protoreply'>
1457 compatState: KEYMASK
1461 <entry role='protoreply'>
1462 grabMods, compatGrabMods: KB_GROUP
1466 <entry role='protoreply'>
1467 lookupMods, compatLookupMods: KEYMASK
1471 <entry role='protoreply'>
1472 ptrBtnState: BUTMASK</entry>
1475 <entry role='protoerror'>Errors: <emphasis>
1485 This request returns a detailed description of the current state of the
1486 keyboard specified by <emphasis>
1487 deviceSpec</emphasis>
1495 return value contains the input extension identifier for the specified device,
1498 if the server does not support the input extension.
1505 return value reports the modifiers that are set because one or more modifier
1506 keys are logically down. The <emphasis>
1507 latchedMods</emphasis>
1509 lockedMods</emphasis>
1510 return values report the modifiers that are latched or locked respectively.
1513 return value reports the effective modifier mask which results from the
1514 current combination of base, latched and locked modifiers.
1520 baseGroup</emphasis>
1521 return value reports the group state selected by group shift keys that are
1522 logically down. The <emphasis>
1523 latchedGroup</emphasis>
1525 lockedGroup</emphasis>
1526 return values detail the effects of latching or locking group shift keys and
1528 XkbLatchLockState</emphasis>
1529 requests. The <emphasis>
1531 return value reports the effective keyboard group which results from the
1532 current combination of base, latched and locked group values.
1538 lookupMods</emphasis>
1539 return value reports the lookup modifiers, which consist of the current
1540 effective modifiers minus any server internal modifiers. The <emphasis>
1542 return value reports the grab modifiers, which consist of the lookup modifiers
1543 minus any members of the ignore locks mask that are not either latched or
1544 logically depressed. <link linkend='Keyboard_State'>Keyboard
1545 State</link> describes the lookup modifiers and grab modifiers in more detail.
1551 ptrBtnState</emphasis>
1552 return value reports the current logical state of up to five buttons on the
1553 core pointer device.
1559 compatState</emphasis>
1560 return value reports the compatibility state that corresponds to the effective
1561 keyboard group and modifier state. The <emphasis>
1562 compatLookupMods</emphasis>
1564 compatGrabMods</emphasis>
1565 return values report the core protocol compatibility states that correspond to
1566 the XKB lookup and grab state. All of the compatibility states are computed by
1567 applying the group compatibility mapping to the corresponding XKB modifier and
1568 group states, as described in <link linkend='Group_Compatibility_Map'>
1569 Group Compatibility Map</link>.
1574 <informaltable frame='none' tabstyle='proto'>
1575 <?dbfo keep-together="always" ?>
1576 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
1577 <colspec colname='c1' colwidth='1.0*'/>
1580 <entry role='protoname'>XkbLatchLockState</entry>
1585 <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
1588 <entry role='protoname'>
1589 affectModLocks, modLocks: KEYMASK</entry>
1592 <entry role='protoname'>
1593 lockGroup: BOOL</entry>
1596 <entry role='protoname'>
1597 groupLock: KB_GROUP</entry>
1600 <entry role='protoname'>
1601 affectModLatches,modLatches: KEYMASK</entry>
1604 <entry role='protoname'>
1605 latchGroup: BOOL</entry>
1608 <entry role='protoname'>
1609 groupLatch: INT16</entry>
1613 <entry role='protoerror'>Errors: <emphasis>
1625 This request locks or latches keyboard modifiers and group state for the device
1626 specified by <emphasis>
1627 deviceSpec</emphasis>
1629 deviceSpec</emphasis>
1630 specifies an illegal or non-keyboard device, a <emphasis>
1637 The locked state of any modifier specified in the <emphasis>
1638 affectModLocks</emphasis>
1639 mask is set to the corresponding value from <emphasis>
1642 lockGroup</emphasis>
1645 , the locked keyboard group is set to the group specified by <emphasis>
1646 groupLock</emphasis>
1647 . If any modifiers are set in <emphasis>
1650 affectModLocks</emphasis>
1658 The latched state of any modifier specified in the <emphasis>
1659 affectModLatches</emphasis>
1660 mask is set to the corresponding value from <emphasis>
1661 modLatches</emphasis>
1663 latchGroup</emphasis>
1666 , the latched keyboard group is set to the group specified by <emphasis>
1667 groupLatch</emphasis>
1668 . if any modifiers are set in <emphasis>
1669 modLatches</emphasis>
1670 but not in <emphasis>
1671 affectModLatches</emphasis>
1679 If the locked group exceeds the maximum number of groups permitted for the
1680 specified keyboard, it is wrapped or truncated back into range as specified by
1681 the global <emphasis>
1682 GroupsWrap</emphasis>
1685 control. No error results from an out-of-range group specification.
1690 After changing the locked and latched modifiers and groups as specified, the X
1691 server recalculates the effective and compatibility keyboard state and
1692 generates <emphasis>
1693 XkbStateNotify</emphasis>
1694 events as appropriate if any state components have changed. Changing the
1695 keyboard state might also turn indicators on or off which can cause <emphasis>
1696 XkbIndicatorStateNotify</emphasis>
1702 If any errors occur, this request has no effect.
1707 <sect2 id='Querying_and_Changing_Keyboard_Controls'>
1708 <title>Querying and Changing Keyboard Controls</title>
1711 <informaltable frame='none' tabstyle='proto'>
1712 <?dbfo keep-together="always" ?>
1713 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
1714 <colspec colname='c1' colwidth='1.0*'/>
1717 <entry role='protoname'>XkbGetControls</entry>
1722 <entry role='protoargs'>deviceSpec: KB_DEVICESPEC
1726 <entry role='protoreply'>
1731 <entry role='protoreply'>
1732 mouseKeysDfltBtn: CARD8
1736 <entry role='protoreply'>
1741 <entry role='protoreply'>
1742 groupsWrap: KB_GROUPINFO
1746 <entry role='protoreply'>
1747 internalMods,ignoreLockMods: KB_MODDEF
1751 <entry role='protoreply'>
1752 repeatDelay,repeatInterval: CARD16
1756 <entry role='protoreply'>
1757 slowKeysDelay, debounceDelay: CARD16
1761 <entry role='protoreply'>
1762 mouseKeysDelay, mouseKeysInterval: CARD16
1766 <entry role='protoreply'>
1767 mouseKeysTimeToMax, mouseKeysMaxSpeed: CARD16
1771 <entry role='protoreply'>
1772 mouseKeysCurve: INT16
1776 <entry role='protoreply'>
1777 accessXOptions: KB_AXOPTIONMASK
1781 <entry role='protoreply'>
1782 accessXTimeout: CARD16
1786 <entry role='protoreply'>
1787 accessXTimeoutOptionsMask, accessXTimeoutOptionValues: CARD16
1791 <entry role='protoreply'>
1792 accessXTimeoutMask,accessXTimeoutValues: CARD32
1796 <entry role='protoreply'>
1797 enabledControls: KB_BOOLCTRLMASK
1801 <entry role='protoreply'>
1802 perKeyRepeat: LISTofCARD8</entry>
1806 <entry role='protoerror'>Errors: <emphasis>
1816 This request returns the current values and status of all controls for the
1817 keyboard specified by <emphasis>
1818 deviceSpec</emphasis>
1820 deviceSpec</emphasis>
1821 specifies an illegal device a <emphasis>
1823 error results. On return, the <emphasis>
1825 specifies the identifier of the requested device or zero if the server does
1826 not support the input extension.
1832 numGroups</emphasis>
1833 return value reports the current number of groups, and <emphasis>
1834 groupsWrap</emphasis>
1835 reports the treatment of out-of-range groups, as described in <link linkend='Key_Symbol_Map'>Key Symbol Map</link>. The <emphasis>
1836 internalMods</emphasis>
1838 ignoreLockMods</emphasis>
1839 return values report the current values of the server internal and ignore
1840 locks modifiers as described in <link linkend='Keyboard_State'>
1841 Keyboard State</link>. Both are modifier definitions (
1842 <link linkend='Modifier_Definitions'>Modifier Definitions</link>) which
1843 report the real modifiers, virtual modifiers, and the resulting combination of
1844 real modifiers that are bound to the corresponding control.
1850 repeatDelay</emphasis>
1852 repeatInterval</emphasis>
1854 slowKeysDelay</emphasis>
1856 debounceDelay</emphasis>
1857 fields report the current values of the for the autorepeat delay, autorepeat
1858 interval, slow keys delay and bounce keys timeout, respectively. The <emphasis>
1859 mouseKeysDelay</emphasis>
1861 mouseKeysInterval</emphasis>
1863 mouseKeysTimeToMax</emphasis>
1865 mouseKeysMaxSpeed</emphasis>
1867 mouseKeysCurve</emphasis>
1868 return values report the current acceleration applied to mouse keys, as
1869 described in <link linkend='The_MouseKeysAccel_Control'>The MouseKeysAccel
1870 Control</link>. All times are reported in milliseconds.
1876 mouseKeysDfltBtn</emphasis>
1877 return value reports the current default pointer button for which events are
1878 synthesized by the mouse keys server actions.
1884 accessXOptions</emphasis>
1885 return value reports the current settings of the various AccessX options flags
1886 which govern the behavior of the <emphasis>
1887 StickyKeys</emphasis>
1888 control and of AccessX feedback.
1894 accessXTimeout</emphasis>
1895 return value reports the length of time, in seconds, that the keyboard must
1896 remain idle before AccessX controls are automatically changed; an <emphasis>
1897 accessXTimeout</emphasis>
1900 indicates that AccessX controls are not automatically changed. The <emphasis>
1901 accessXTimeoutMask</emphasis>
1902 specifies the boolean controls to be changed if the AccessX timeout expires;
1904 accessXTimeoutValues</emphasis>
1905 field specifies new values for all of the controls in the timeout mask. The
1907 accessXTimeoutOptionsMask</emphasis>
1908 field specifies the AccessX options to be changed when the AccessX timeout
1909 expires; the <emphasis>
1910 accessXTimeoutOptionValues</emphasis>
1911 return value reports the values to which they will be set.
1917 enabledControls</emphasis>
1918 return value reports the current state of all of the global boolean controls.
1924 perKeyRepeat</emphasis>
1925 array consists of one bit per key and reports the current autorepeat behavior
1926 of each keyboard key; if a bit is set in <emphasis>
1927 perKeyRepeat</emphasis>
1928 , the corresponding key repeats if it is held down while global keyboard
1929 autorepeat is enabled. This array parallels the core protocol and input
1930 extension keyboard controls, if the autorepeat behavior of a key is changed via
1931 the core protocol or input extension, those changes are automatically reflected
1933 perKeyRepeat</emphasis>
1939 <informaltable frame='none' tabstyle='proto'>
1940 <?dbfo keep-together="always" ?>
1941 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
1942 <colspec colname='c1' colwidth='1.0*'/>
1945 <entry role='protoname'>XkbSetControls</entry>
1950 <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
1953 <entry role='protoname'>
1954 affectInternalRealMods, internalRealMods: KEYMASK</entry>
1957 <entry role='protoname'>
1958 affectInternalVirtualMods,internalVirtualMods: KB_VMODMASK</entry>
1961 <entry role='protoname'>
1962 affectIgnoreLockRealMods,ignoreLockRealMods: KB_MODMASK</entry>
1965 <entry role='protoname'>
1966 affectIgnoreLockVirtualMods,ignoreLockVirtualMods: KB_VMODMASK</entry>
1969 <entry role='protoname'>
1970 mouseKeysDfltBtn: CARD8</entry>
1973 <entry role='protoname'>
1974 groupsWrap: KB_GROUPINFO</entry>
1977 <entry role='protoname'>
1978 accessXOptions: CARD16</entry>
1981 <entry role='protoname'>
1982 affectEnabledControls: KB_BOOLCTRLMASK</entry>
1985 <entry role='protoname'>
1986 enabledControls: KB_BOOLCTRLMASK</entry>
1989 <entry role='protoname'>
1990 changeControls: KB_CONTROLMASK</entry>
1993 <entry role='protoname'>
1994 repeatDelay,repeatInterval: CARD16</entry>
1997 <entry role='protoname'>
1998 slowKeysDelay, debounceDelay: CARD16</entry>
2001 <entry role='protoname'>
2002 mouseKeysDelay, mouseKeysInterval: CARD16</entry>
2005 <entry role='protoname'>
2006 mouseKeysTimeToMax, mouseKeysMaxSpeed: CARD16</entry>
2009 <entry role='protoname'>
2010 mouseKeysCurve: INT16</entry>
2013 <entry role='protoname'>
2014 accessXTimeout: CARD16</entry>
2017 <entry role='protoname'>
2018 accessXTimeoutMask, accessXTimeoutValues: KB_BOOLCTRLMASK</entry>
2021 <entry role='protoname'>
2022 accessXTimeoutOptionsMask,accessXTimeoutOptionsValues: CARD16</entry>
2025 <entry role='protoname'>
2026 perKeyRepeat: LISTofCARD8</entry>
2030 <entry role='protoerror'>Errors:<emphasis>
2042 This request sets the keyboard controls indicated in <emphasis>
2043 changeControls</emphasis>
2044 for the keyboard specified by <emphasis>
2045 deviceSpec</emphasis>
2046 . Each bit that is set in <emphasis>
2047 changeControls</emphasis>
2048 indicates that one or more of the other request fields should be applied, as
2052 <informaltable frame='topbot'>
2053 <?dbfo keep-together="always" ?>
2054 <tgroup cols='2' align='left' colsep='0' rowsep='0'>
2055 <colspec colname='c1' colwidth='1.0*'/>
2056 <colspec colname='c2' colwidth='2.0*'/>
2059 <entry>Bit in changeControls</entry>
2060 <entry>Field(s) to be Applied</entry>
2066 XkbRepeatKeysMask</emphasis>
2069 repeatDelay</emphasis>
2071 repeatInterval</emphasis>
2076 XkbSlowKeysMask</emphasis>
2079 slowKeysDelay</emphasis>
2084 XkbStickyKeysMask</emphasis>
2087 accessXOptions</emphasis>
2088 (only the <emphasis>
2089 XkbAX_TwoKeys</emphasis>
2093 XkbAX_LatchToLock</emphasis>
2094 options are affected)</entry>
2098 XkbBounceKeysMask</emphasis>
2101 debounceDelay</emphasis>
2106 XkbMouseKeysMask</emphasis>
2109 mouseKeysDfltBtn</emphasis>
2114 XkbMouseKeysAccelMask</emphasis>
2117 mouseKeysDelay</emphasis>
2119 mouseKeysInterval</emphasis>
2121 mouseKeysCurve</emphasis>
2123 mouseKeysTimeToMax</emphasis>
2125 mouseKeysMaxSpeed</emphasis>
2130 XkbAccessXKeysMask</emphasis>
2133 accessXOptions (all options)</emphasis>
2138 XkbAccessXTimeoutMask</emphasis>
2141 accessXTimeout</emphasis>
2143 accessXTimeoutMask</emphasis>
2145 accessXTimeoutValues</emphasis>
2147 accessXTimeoutOptionsMask</emphasis>
2149 accessXTimeoutOptionsValues</emphasis>
2153 <entry>XkbAccessXFeedbackMask</entry>
2155 accessXOptions</emphasis>
2156 (all options except those affected by the <emphasis>
2157 XkbStickyKeysMask</emphasis>
2162 XkbGroupsWrapMask</emphasis>
2165 groupsWrap</emphasis>
2170 XkbInternalModsMask</emphasis>
2173 affectInternalRealMods</emphasis>
2175 internalRealMods</emphasis>
2177 affectInternalVirtualMods</emphasis>
2179 internalVirtualMods</emphasis>
2184 XkbIgnoreLockModsMask</emphasis>
2187 affectIgnoreLockRealMods</emphasis>
2189 ignoreLockRealMods</emphasis>
2191 affectIgnoreLockVirtualMods</emphasis>
2193 ignoreLockVirtualMods</emphasis>
2198 XkbPerKeyRepeatMask</emphasis>
2201 perKeyRepeat</emphasis>
2206 XkbControlsEnabledMask</emphasis>
2209 affectEnabledControls</emphasis>
2211 enabledControls</emphasis>
2219 If any other bits are set in <emphasis>
2220 changeControls</emphasis>
2223 error results. If any of the bits listed above are not set in <emphasis>
2224 changeControls</emphasis>
2225 , the corresponding fields must have the value <emphasis>
2234 If applied, <emphasis>
2235 repeatDelay</emphasis>
2237 repeatInterval</emphasis>
2238 change the autorepeat characteristics of the keyboard, as described in
2239 <link linkend='The_RepeatKeys_Control'>The RepeatKeys Control</link>. If
2240 specified, <emphasis>
2241 repeatDelay</emphasis>
2243 repeatInterval</emphasis>
2244 must both be non-zero or a <emphasis>
2251 If applied, the <emphasis>
2252 slowKeysDelay</emphasis>
2253 field specifies a new delay for the <emphasis>
2255 control, as defined in <link linkend='The_SlowKeys_Control'>The
2256 SlowKeys Control</link>. If specified, <emphasis>
2257 slowKeysDelay</emphasis>
2258 must be non-zero, or a <emphasis>
2265 If applied, the <emphasis>
2266 debounceDelay</emphasis>
2267 field specifies a new delay for the <emphasis>
2268 BounceKeys</emphasis>
2269 control, as described in <link linkend='The_BounceKeys_Control'>The
2270 BounceKeys Control</link>. If present, the <emphasis>
2271 debounceDelay</emphasis>
2272 must be non-zero or a <emphasis>
2279 If applied, the <emphasis>
2280 mouseKeysDfltBtn</emphasis>
2281 field specifies the core pointer button for which events are generated
2282 whenever a <emphasis>
2283 SA_PtrBtn</emphasis>
2285 SA_LockPtrBtn</emphasis>
2286 key action is activated. If present, <emphasis>
2287 mouseKeysDfltBtn</emphasis>
2288 must specify a legal button for the core pointer device, or a <emphasis>
2290 error results. <link linkend='Key_Actions'>Key
2291 Actions</link> describes the <emphasis>
2292 SA_PtrBtn</emphasis>
2294 SA_LockPtrBtn</emphasis>
2295 actions in more detail.
2300 If applied, the <emphasis>
2301 mouseKeysDelay</emphasis>
2303 mouseKeysInterval</emphasis>
2305 mouseKeysTimeToMax</emphasis>
2307 mouseKeysMaxSpeed</emphasis>
2309 mouseKeysCurve</emphasis>
2310 fields change the rate at which the pointer moves when a key which generates a
2312 SA_MovePtr</emphasis>
2313 action is held down. <link linkend='The_MouseKeysAccel_Control'>The
2314 MouseKeysAccel Control</link> describes these <emphasis>
2315 MouseKeysAccel</emphasis>
2316 parameters in more detail. If defined, the <emphasis>
2317 mouseKeysDelay</emphasis>
2319 mouseKeysInterval</emphasis>
2321 mouseKeysTimeToMax</emphasis>
2323 mouseKeysMaxSpeed</emphasis>
2324 values must all be greater than zero, or a <emphasis>
2326 error results. The <emphasis>
2327 mouseKeysCurve</emphasis>
2328 value must be greater than <emphasis>
2337 If applied, the <emphasis>
2338 accessXOptions</emphasis>
2339 field sets the AccessX options, which are described in detail in
2340 <link linkend='The_AccessXKeys_Control'>The AccessXKeys Control</link>. If
2341 either one of <emphasis>
2342 XkbStickyKeysMask</emphasis>
2344 XkbAccessXFeedbackMask</emphasis>
2345 are set in <emphasis>
2346 changeControls</emphasis>
2348 XkbAccessXKeysMask</emphasis>
2349 is not, only a subset of the AccessX options are changed, as described in the
2350 table above; if both are set or if the <emphasis>
2351 AccessXKeys</emphasis>
2352 bit is set in <emphasis>
2353 changeControls</emphasis>
2354 , all of the AccessX options are updated. Any bit in <emphasis>
2355 accessXOptions</emphasis>
2356 whose interpretation is undefined must be zero, or a <emphasis>
2363 If applied, the <emphasis>
2364 accessXTimeout</emphasis>
2366 accessXTimeoutMask</emphasis>
2368 accessXTimeoutValues</emphasis>
2370 accessXTimeoutOptionsMask</emphasis>
2372 accessXTimeoutOptionsValues</emphasis>
2373 fields change the behavior of the AccessX Timeout control, as described in
2374 <link linkend='The_AccessXTimeout_Control'>The AccessXTimeout
2375 Control</link>. The <emphasis>
2376 accessXTimeout</emphasis>
2377 must be greater than zero, or a <emphasis>
2379 error results. The <emphasis>
2380 accessXTimeoutMask</emphasis>
2382 accessXTimeoutValues</emphasis>
2383 fields must specify only legal boolean controls, or a <emphasis>
2385 error results. The <emphasis>
2386 accessXTimeoutOptionsMask</emphasis>
2388 accessXTimeoutOptionsValues</emphasis>
2389 fields must contain only legal AccessX options or a <emphasis>
2391 error results. If any bits are set in either values field but not in the
2392 corresponding mask, a <emphasis>
2399 If present, the <emphasis>
2400 groupsWrap</emphasis>
2401 field specifies the treatment of out-of-range keyboard groups, as described in
2402 <link linkend='Key_Symbol_Map'>Key Symbol Map</link>. If the
2404 groupsWrap</emphasis>
2405 field does not specify a legal treatment for out-of-range groups, a <emphasis>
2412 If present, the <emphasis>
2413 affectInternalRealMods</emphasis>
2414 field specifies the set of real modifiers to be changed in the internal
2415 modifier definition and the <emphasis>
2416 internalRealMods</emphasis>
2417 field specifies new values for those modifiers. The <emphasis>
2418 affectInternalVirtualMods</emphasis>
2420 internalVirtualMods</emphasis>
2421 fields update the virtual modifier component of the modifier definition that
2422 describes the internal modifiers in the same way. If any bits are set in either
2423 values field but not in the corresponding mask field, a <emphasis>
2430 If present, the <emphasis>
2431 affectIgnoreLockRealMods</emphasis>
2432 field specifies the set of real modifiers to be changed in the ignore locks
2433 modifier definition and the <emphasis>
2434 ignoreLockRealMods</emphasis>
2435 field specifies new values for those modifiers. The <emphasis>
2436 affectIgnoreLockVirtualMods</emphasis>
2438 ignoreLockVirtualMods</emphasis>
2439 fields update the virtual modifier component of the ignore locks modifier
2440 definition in the same way. If any bits are set in either values field but not
2441 in the corresponding mask field, a <emphasis>
2448 If present, the <emphasis>
2449 perKeyRepeat</emphasis>
2450 array specifies the repeat behavior of the individual keyboard keys. The
2451 corresponding core protocol or input extension per-key autorepeat information
2452 is updated to reflect any changes specified in <emphasis>
2453 perKeyRepeat</emphasis>
2454 . If the bits that correspond to any out-of-range keys are set in <emphasis>
2455 perKeyRepeat</emphasis>
2463 If present, the <emphasis>
2464 affectEnabledControls</emphasis>
2466 enabledControls</emphasis>
2467 field enable and disable global boolean controls. Any controls set in both
2468 fields are enabled; any controls that are set in <emphasis>
2469 affectEnabledControls</emphasis>
2470 but not in <emphasis>
2471 enabledControls</emphasis>
2472 are disabled. Controls that are not set in either field are not affected. If
2473 any controls are specified in <emphasis>
2474 enabledControls</emphasis>
2475 but not in <emphasis>
2476 affectEnabledControls</emphasis>
2479 error results. If either field contains anything except boolean controls, a
2487 <sect2 id='Querying_and_Changing_the_Keyboard_Mapping'>
2488 <title>Querying and Changing the Keyboard Mapping</title>
2491 <informaltable frame='none' tabstyle='proto'>
2492 <?dbfo keep-together="always" ?>
2493 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
2494 <colspec colname='c1' colwidth='1.0*'/>
2497 <entry role='protoname'>XkbGetMap</entry>
2502 <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
2505 <entry role='protoname'>
2506 full, partial: KB_MAPPARTMASK</entry>
2509 <entry role='protoname'>
2510 firstType, nTypes: CARD8</entry>
2513 <entry role='protoname'>
2514 firstKeySym, firstKeyAction: KEYCODE</entry>
2517 <entry role='protoname'>
2518 nKeySyms, nKeyActions: CARD8</entry>
2521 <entry role='protoname'>
2522 firstKeyBehavior,firstKeyExplicit: KEYCODE</entry>
2525 <entry role='protoname'>
2526 nKeyBehaviors,nKeyExplicit: CARD8</entry>
2529 <entry role='protoname'>
2530 firstModMapKey,firstVModMapKey: KEYCODE</entry>
2533 <entry role='protoname'>
2534 nModMapKeys, nVModMapKeys: CARD8</entry>
2537 <entry role='protoname'>
2538 virtualMods: KB_VMODMASK
2542 <entry role='protoreply'>
2547 <entry role='protoreply'>
2548 minKeyCode, maxKeyCode: KEYCODE
2552 <entry role='protoreply'>
2553 present: KB_MAPPARTMASK
2557 <entry role='protoreply'>
2558 firstType, nTypes, nTotalTypes: CARD8
2562 <entry role='protoreply'>
2563 firstKeySym, firstKeyAction: KEYCODE
2567 <entry role='protoreply'>
2568 nKeySyms, nKeyActions: CARD8
2572 <entry role='protoreply'>
2573 totalSyms, totalActions: CARD16
2577 <entry role='protoreply'>
2578 firstKeyBehavior, firstKeyExplicit: KEYCODE
2582 <entry role='protoreply'>
2583 nKeyBehaviors, nKeyExplicit: CARD8
2587 <entry role='protoreply'>
2588 totalKeyBehaviors, totalKeyExplicit: CARD8
2592 <entry role='protoreply'>
2593 firstModMapKey, firstVModMapKey: KEYCODE
2597 <entry role='protoreply'>
2598 nModMapKeys, nVModMapKeys: CARD8
2602 <entry role='protoreply'>
2603 totalModMapKeys, totalVModMapKeys: CARD8
2607 <entry role='protoreply'>
2608 virtualMods: KB_VMODMASK
2612 <entry role='protoreply'>
2613 typesRtrn: LISTofKB_KEYTYPE
2617 <entry role='protoreply'>
2618 symsRtrn: LISTofKB_KEYSYMMAP
2622 <entry role='protoreply'>
2623 actsRtrn: { count: LISTofCARD8, acts: LISTofKB_ACTION }
2627 <entry role='protoreply'>
2628 behaviorsRtrn: LISTofKB_SETBEHAVIOR
2632 <entry role='protoreply'>
2633 vmodsRtrn: LISTofSETofKEYMASK
2637 <entry role='protoreply'>
2638 explicitRtrn: LISTofKB_SETEXPLICIT
2642 <entry role='protoreply'>
2643 modmapRtrn: LISTofKB_KEYMODMAP
2647 <entry role='protoreply'>
2648 vmodMapRtrn: LISTofKB_KEYVMODMAP
2652 <entry role='protoerror'>
2668 This request returns the indicated components of the server and client maps of
2669 the keyboard specified by <emphasis>
2670 deviceSpec</emphasis>
2673 mask specifies the map components to be returned in full; the <emphasis>
2675 mask specifies the components for which some subset of the legal elements are
2676 to be returned. The server returns a <emphasis>
2678 error if any component is specified in both <emphasis>
2684 error if any undefined bits are set in either <emphasis>
2693 Each bit in the <emphasis>
2695 mask controls the interpretation of one or more of the other request fields,
2699 <informaltable frame='topbot'>
2700 <?dbfo keep-together="always" ?>
2701 <tgroup cols='3' align='left' colsep='0' rowsep='0'>
2702 <colspec colname='c1' colwidth='1.5*'/>
2703 <colspec colname='c2' colwidth='1.0*'/>
2704 <colspec colname='c3' colwidth='1.5*'/>
2707 <entry>Bit in the Partial Mask</entry>
2709 <entry>Corresponding Field(s)</entry>
2715 XkbKeyTypesMask</emphasis>
2717 <entry>key types</entry>
2719 firstType</emphasis>
2726 XkbKeySymsMask</emphasis>
2728 <entry>keycodes</entry>
2730 firstKeySym</emphasis>
2737 XkbKeyActionsMask</emphasis>
2739 <entry>keycodes</entry>
2741 firstKeyAction</emphasis>
2743 nKeyActions</emphasis>
2748 XkbKeyBehaviorsMask</emphasis>
2750 <entry>keycodes</entry>
2752 firstKeyBehavior</emphasis>
2754 nKeyBehaviors</emphasis>
2759 XkbExplicitComponentsMask</emphasis>
2761 <entry>keycodes</entry>
2763 firstKeyExplicit</emphasis>
2765 nKeyExplicit</emphasis>
2770 XkbModifierMapMask</emphasis>
2772 <entry>keycodes</entry>
2774 firstModMapKey</emphasis>
2776 nModMapKeys</emphasis>
2781 XkbVirtualModMapMask</emphasis>
2783 <entry>keycodes</entry>
2785 firstVModMapKey</emphasis>
2787 nVModMapKeys</emphasis>
2792 XkbVirtualModsMask</emphasis>
2794 <entry>virtual modifiers</entry>
2796 virtualMods</emphasis>
2804 If any of these keyboard map components are specified in <emphasis>
2806 , the corresponding values must specify a valid subset of the requested
2807 components or this request reports a <emphasis>
2809 error. If a keyboard map component is not specified in <emphasis>
2811 , the corresponding fields must contain zeroes, or a <emphasis>
2818 If any error is generated, the request aborts and does not report any values.
2823 On successful return, the <emphasis>
2825 field reports the X input extension device ID of the keyboard for which
2826 information is being returned, or <emphasis>
2828 if the server does not support the X input extension. The <emphasis>
2829 minKeyCode</emphasis>
2831 maxKeyCode</emphasis>
2832 return values report the minimum and maximum keycodes that are legal for the
2833 keyboard in question.
2840 return value lists all of the keyboard map components contained in the reply.
2841 The bits in <emphasis>
2843 affect the interpretation of the other return values as follows:
2849 XkbKeyTypesMask</emphasis>
2850 is set in <emphasis>
2858 firstType</emphasis>
2861 specify the types reported in the reply.
2866 nTotalTypes</emphasis>
2867 reports the total number of types defined for the keyboard
2872 typesRtrn</emphasis>
2875 elements of type KB_KEYTYPE which describe consecutive key types starting from
2877 firstType</emphasis>
2885 XkbKeySymsMask</emphasis>
2886 is set in <emphasis>
2894 firstKeySym</emphasis>
2897 specify the subset of the keyboard keys for which symbols will be reported.
2902 totalSyms</emphasis>
2903 reports the total number of keysyms bound to the keys returned in this reply.
2911 elements of type KB_KEYSYMMAP, which describe the symbols bound to consecutive
2912 keys starting from <emphasis>
2913 firstKeySym</emphasis>
2921 XkbKeyActionsMask</emphasis>
2922 is set in <emphasis>
2930 firstKeyAction</emphasis>
2932 nKeyActions</emphasis>
2933 specify the subset of the keys for which actions are reported.
2938 totalActions</emphasis>
2939 reports the total number of actions bound to the returned keys.
2943 <para>The <emphasis>
2945 field of the <emphasis>
2947 return value has <emphasis>
2948 nKeyActions</emphasis>
2949 entries of type CARD8, which specify the number of actions bound to
2950 consecutive keys starting from <emphasis>
2951 firstKeyAction</emphasis>
2957 totalActions</emphasis>
2958 elements of type KB_ACTION and specifies the actions bound to the keys.
2965 XkbKeyBehaviorsMask</emphasis>
2966 is set in <emphasis>
2973 <para>The <emphasis>
2974 firstKeyBehavior</emphasis>
2976 nKeyBehaviors</emphasis>
2977 return values report the range of keyboard keys for which behaviors will be
2982 <para>The <emphasis>
2983 totalKeyBehaviors</emphasis>
2984 return value reports the number of keys in the range to be reported that have
2989 <para>The <emphasis>
2990 behaviorsRtrn</emphasis>
2991 value has <emphasis>
2992 totalKeyBehaviors</emphasis>
2993 entries of type KB_BEHAVIOR. Each entry specifies a key in the range for which
2994 behaviors are being reported and the behavior associated with that key. Any
2995 keys in that range that do not have an entry in <emphasis>
2996 behaviorsRtrn</emphasis>
2997 have the default behavior, <emphasis>
2998 KB_Default</emphasis>
3006 XkbExplicitComponentsMask</emphasis>
3007 is set in <emphasis>
3014 <para>The <emphasis>
3015 firstKeyExplicit</emphasis>
3017 nKeyExplicit</emphasis>
3018 return values report the range of keyboard keys for which the set of explicit
3019 components is to be returned.
3023 <para>The <emphasis>
3024 totalKeyExplicit</emphasis>
3025 return value reports the number of keys in the range specified by <emphasis>
3026 firstKeyExplicit</emphasis>
3028 nKeyExplicit</emphasis>
3029 that have one or more explicit components.
3033 <para>The <emphasis>
3034 explicitRtrn</emphasis>
3035 return value has <emphasis>
3036 totalKeyExplicit</emphasis>
3037 entries of type KB_KEYEXPLICIT. Each entry specifies the a key in the range
3038 for which explicit components are being reported and the explicit components
3039 that are bound to it. Any keys in that range that do not have an entry in
3041 explicitRtrn</emphasis>
3042 have no explicit components.
3049 XkbModifierMapMask</emphasis>
3050 is set in <emphasis>
3057 <para>The <emphasis>
3058 firstModMapKey</emphasis>
3060 nModMapKeys</emphasis>
3061 return values report the range of keyboard keys for which the modifier map is
3066 <para>The <emphasis>
3067 totalModMapKeys</emphasis>
3068 return value reports the number of keys in the range specified by <emphasis>
3069 firstModMapKey</emphasis>
3071 nModMapKeys</emphasis>
3072 that are bound with to one or more modifiers.
3076 <para>The <emphasis>
3077 modmapRtrn</emphasis>
3078 return value has <emphasis>
3079 totalModMapKeys</emphasis>
3080 entries of type KB_KEYMODMAP. Each entry specifies the a key in the range for
3081 which the modifier map is being reported and the set of modifiers that are
3082 bound to that key. Any keys in that range that do not have an entry in
3084 modmapRtrn</emphasis>
3085 are not associated with any modifiers by the modifier mapping.
3092 XkbVirtualModMapMask</emphasis>
3093 is set in <emphasis>
3100 <para>The <emphasis>
3101 firstVModMapKey</emphasis>
3103 nVModMapKeys</emphasis>
3104 return values report the range of keyboard keys for which the virtual modifier
3105 map is to be reported.
3109 <para>The <emphasis>
3110 totalVModMapKeys</emphasis>
3111 return value reports the number of keys in the range specified by <emphasis>
3112 firstVModMapKey</emphasis>
3114 nVModMapKeys</emphasis>
3115 that are bound with to or more virtual modifiers.
3119 <para>The <emphasis>
3120 vmodmapRtrn</emphasis>
3121 return value has <emphasis>
3122 totalVModMapKeys</emphasis>
3123 entries of type KB_KEYVMODMAP. Each entry specifies the a key in the range for
3124 which the virtual modifier map is being reported and the set of virtual
3125 modifiers that are bound to that key. Any keys in that range that do not have
3126 an entry in <emphasis>
3127 vmodmapRtrn</emphasis>
3128 are not associated with any virtual modifiers,
3135 XkbVirtualModsMask</emphasis>
3136 is set in <emphasis>
3143 <para>The <emphasis>
3144 virtualMods</emphasis>
3145 return value is a mask with one bit per virtual modifier which specifies the
3146 virtual modifiers for which a set of corresponding real modifiers is to be
3151 <para>The <emphasis>
3152 vmodsRtrn</emphasis>
3153 return value is a list with one entry of type KEYBUTMASK for each virtual
3154 modifier that is specified in <emphasis>
3155 virtualMods</emphasis>
3156 . The entries in <emphasis>
3157 vmodsRtrn</emphasis>
3158 contain the real modifier bindings for the specified virtual modifiers,
3159 beginning with the lowest-numbered virtual modifier that is present in
3161 virtualMods</emphasis>
3162 and proceeding to the highest.
3168 If any of these bits are not set in <emphasis>
3170 , the corresponding numeric fields all have the value zero, and the
3171 corresponding lists are all of length zero.
3176 <informaltable frame='none' tabstyle='proto'>
3177 <?dbfo keep-together="always" ?>
3178 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
3179 <colspec colname='c1' colwidth='1.0*'/>
3182 <entry role='protoname'>XkbSetMap</entry>
3187 <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
3190 <entry role='protoname'>
3192 SetMapResizeTypes, SetMapRecomputeActions </emphasis>
3196 <entry role='protoname'>
3197 present: KB_MAPPARTMASK</entry>
3200 <entry role='protoname'>
3201 minKeyCode, maxKeyCode: KEYCODE</entry>
3204 <entry role='protoname'>
3205 firstType, nTypes: CARD8</entry>
3208 <entry role='protoname'>
3209 firstKeySym, firstKeyAction: KEYCODE</entry>
3212 <entry role='protoname'>
3213 nKeySyms, nKeyActions: CARD8</entry>
3216 <entry role='protoname'>
3217 totalSyms, totalActions: CARD16</entry>
3220 <entry role='protoname'>
3221 firstKeyBehavior, firstKeyExplicit: KEYCODE</entry>
3224 <entry role='protoname'>
3225 nKeyBehaviors, nKeyExplicit: CARD8</entry>
3228 <entry role='protoname'>
3229 totalKeyBehaviors, totalKeyExplicit: CARD8</entry>
3232 <entry role='protoname'>
3233 firstModMapKey, firstVModMapKey: KEYCODE</entry>
3236 <entry role='protoname'>
3237 nModMapKeys, nVModMapKeys: CARD8</entry>
3240 <entry role='protoname'>
3241 totalModMapKeys, totalVModMapKeys: CARD8</entry>
3244 <entry role='protoname'>
3245 virtualMods: VMODMASK</entry>
3248 <entry role='protoname'>
3249 types: LISTofKB_KEYTYPE</entry>
3252 <entry role='protoname'>
3253 syms: LISTofKB_KEYSYMMAP</entry>
3256 <entry role='protoname'>
3257 actions: { count: LISTofCARD8, actions: LISTofKB_ACTION }</entry>
3260 <entry role='protoname'>
3261 behaviors: LISTofKB_BEHAVIOR</entry>
3264 <entry role='protoname'>
3265 vmods: LISTofKEYMASK</entry>
3268 <entry role='protoname'>
3269 explicit: LISTofKB_EXPLICIT</entry>
3272 <entry role='protoname'>
3273 modmap: LISTofKB_KEYMODMAP</entry>
3276 <entry role='protoname'>
3277 vmodmap: LISTofKB_KEYVMODMAP</entry>
3281 <entry role='protoerror'>Errors: <emphasis>
3297 This request changes the indicated parts of the keyboard specified by <emphasis>
3298 deviceSpec</emphasis>
3299 . With XKB, the effect of a key release is independent of the keyboard mapping
3300 at the time of the release, so this request can be processed regardless of the
3301 logical state of the modifier keys at the time of the request.
3308 field specifies the keyboard map components contained to be changed. The bits
3311 affect the interpretation of the other fields as follows:
3317 XkbKeyTypesMask</emphasis>
3318 is set in <emphasis>
3321 firstType</emphasis>
3324 specify a subset of the key types bound to the keyboard to be changed or
3325 created. The index of the first key type to be changed must be less than or
3326 equal to the unmodified length of the list of key types or a <emphasis>
3334 XkbKeyTypesMask</emphasis>
3335 is set in <emphasis>
3338 SetMapResizeTypes</emphasis>
3339 is set in <emphasis>
3341 , the server resizes the list of key types bound to the keyboard so that the
3342 last key type specified by this request is the last element in the list. If the
3343 list of key types is shrunk, any existing key definitions that use key types
3344 that eliminated are automatically assigned key types from the list of canonical
3345 key types as described in <link linkend='Assigning_Types_To_Groups_of_Symbols_for_a_Key'>
3346 Assigning Types To Groups of Symbols for a Key</link>. The list of key types
3347 bound to a keyboard must always include the four canonical types and cannot
3348 have more than <emphasis>
3349 XkbMaxTypesPerKey</emphasis>
3350 (32) types; any attempt to reduce the number of types bound to a keyboard
3351 below four or above <emphasis>
3352 XkbMaxTypesPerKey</emphasis>
3355 error. Symbolic names for newly created key types or levels within a key type
3356 are initialized to <emphasis>
3364 XkbKeyTypesMask</emphasis>
3365 is set in <emphasis>
3367 , the types list has <emphasis>
3369 entries of type KB_KEYTYPE.Each key type specified in <emphasis>
3371 must be valid or a <emphasis>
3373 error results. To be valid a key type definition must meet the following
3379 <para>The <emphasis>
3380 numLevels</emphasis>
3381 for the type must be greater than zero.
3385 <para>If the key type is <emphasis>
3386 ONE_LEVEL</emphasis>
3387 (i.e. index zero in the list of key types), <emphasis>
3388 numLevels</emphasis>
3393 <para>If the key type is <emphasis>
3394 TWO_LEVEL</emphasis>
3398 ALPHABETIC</emphasis>
3399 (i.e. index one, two, or three in the lest of key types) group width must be
3406 Each key type in types must also be internally consistent, or a Match error
3407 results. To be internally consistent, a key type definition must meet the
3413 <para>Each map entry must specify a resulting level that is legal for the
3418 <para>Any real or virtual modifiers specified in any of the map entries must
3419 also be specified in the <emphasis>
3428 XkbKeySymsMask</emphasis>
3429 is set in <emphasis>
3432 firstKeySym</emphasis>
3435 specify a subset of the keyboard keys to which new symbols are to be assigned
3437 totalSyms</emphasis>
3438 specifies the total number of symbols to be assigned to those keys. If any of
3439 the keys specified by <emphasis>
3440 firstKeySym</emphasis>
3443 are not legal, a <emphasis>
3445 error results. The <emphasis>
3449 elements of type KB_KEYSYMMAP. Each key in the resulting key symbol map must
3450 be valid and internally consistent or a <emphasis>
3452 error results. To be valid and internally consistent, a key symbol map must
3453 meet the following criteria:
3458 <para>The key type indices must specify legal result key types.
3462 <para>The number of groups specified by <emphasis>
3463 groupInfo</emphasis>
3464 must be in the range <emphasis>
3470 <para>The <emphasis>
3472 of the key symbol map must be equal to <emphasis>
3473 numLevels</emphasis>
3474 of the widest key type bound to the key.
3478 <para>The number of symbols, <emphasis>
3480 , must equal the number of groups times <emphasis>
3489 XkbKeyActionsMask</emphasis>
3490 is set in <emphasis>
3493 firstKeyAction</emphasis>
3495 nKeyActions</emphasis>
3496 specify a subset of the keyboard keys to which new actions are to be assigned
3498 totalActions</emphasis>
3499 specifies the total number of actions to be assigned to those keys. If any of
3500 the keys specified by <emphasis>
3501 firstKeyAction</emphasis>
3503 nKeyActions</emphasis>
3504 are not legal, a <emphasis>
3506 error results. The <emphasis>
3508 field of the <emphasis>
3510 return value has <emphasis>
3511 nKeyActions</emphasis>
3512 elements of type CARD8; each element of <emphasis>
3514 specifies the number of actions bound to the corresponding key. The <emphasis>
3516 list in the <emphasis>
3518 field has <emphasis>
3519 totalActions</emphasis>
3520 elements of type KB_ACTION. These actions are assigned to each target key in
3521 turn, as specified by <emphasis>
3523 . The list of actions assigned to each key must either be empty or have exactly
3524 as many actions as the key has symbols, or a <emphasis>
3532 XkbKeyBehaviorsMask</emphasis>
3533 is set in <emphasis>
3536 firstKeyBehavior</emphasis>
3538 nKeyBehaviors</emphasis>
3539 specify a subset of the keyboard keys to which new behaviors are to be
3540 assigned, and <emphasis>
3541 totalKeyBehaviors</emphasis>
3542 specifies the total number of keys in that range to be assigned non-default
3543 behavior. If any of the keys specified by <emphasis>
3544 firstKeyBehavior</emphasis>
3546 nKeyBehaviors</emphasis>
3547 are not legal, a <emphasis>
3549 error results. The <emphasis>
3550 behaviors</emphasis>
3552 totalKeyBehaviors</emphasis>
3553 elements of type KB_BEHAVIOR; each entry of <emphasis>
3554 behaviors</emphasis>
3555 specifies a key in the specified range and a new behavior for that key; any
3556 key that falls in the range specified by <emphasis>
3557 firstBehavior</emphasis>
3559 nBehaviors</emphasis>
3560 for which no behavior is specified in <emphasis>
3561 behaviors</emphasis>
3562 is assigned the default behavior, <emphasis>
3563 KB_Default</emphasis>
3564 . The new behaviors must be legal, or a <emphasis>
3566 error results. To be legal, the behavior specified in the <emphasis>
3567 XkbSetMap</emphasis>
3573 <para>Specify a key in the range indicated by <emphasis>
3574 firstKeyBehavior</emphasis>
3576 nKeyBehaviors</emphasis>
3581 <para>Not specify the <emphasis>
3582 permanent</emphasis>
3583 flag; permanent behaviors cannot be set or changed using the <emphasis>
3584 XkbSetMap</emphasis>
3589 <para>If present, the <emphasis>
3590 KB_Overlay1</emphasis>
3592 KB_Overlay2</emphasis>
3593 behaviors must specify a keycode for the overlay key that is valid for the
3598 <para>If present, the <emphasis>
3599 KB_RadioGroup</emphasis>
3600 behavior must specify a legal index (0…31) for the radio group to which the
3607 Key behaviors that are not recognized by the server are accepted but ignored.
3608 Attempts to replace a "permanent" behavior are silently ignored; the behavior
3609 is not replaced, but not error is generated and any other components specified
3611 XkbSetMap</emphasis>
3612 request are updated, as appropriate.
3618 XkbVirtualModsMask</emphasis>
3619 is set in <emphasis>
3622 virtualMods</emphasis>
3623 is a mask which specifies the virtual modifiers to be rebound. The <emphasis>
3625 list specifies the real modifiers that are bound to each of the virtual
3626 modifiers specified in <emphasis>
3627 virtualMods</emphasis>
3628 , starting from the lowest numbered virtual modifier and progressing upward.
3629 Any virtual modifier that is not specified in <emphasis>
3630 virtualMods</emphasis>
3631 has no corresponding entry in <emphasis>
3635 list has one entry for each bit that is set in <emphasis>
3636 virtualMods</emphasis>
3643 XkbExplicitComponentsMask</emphasis>
3644 is set in <emphasis>
3647 firstKeyExplicit</emphasis>
3649 nKeyExplicit</emphasis>
3650 specify a subset of the keyboard keys to which new explicit components are to
3651 be assigned, and <emphasis>
3652 totalKeyExplicit</emphasis>
3653 specifies the total number of keys in that range that have at least one
3654 explicit component. The <emphasis>
3657 totalKeyExplicit</emphasis>
3658 elements of type KB_KEYEXPLICIT; each entry of <emphasis>
3660 specifies a key in the specified range and a new set of explicit components
3661 for that key. Any key that falls in the range specified by <emphasis>
3662 firstKeyExplicit</emphasis>
3664 nKeyExplicit</emphasis>
3665 that is not assigned some value in <emphasis>
3667 has no explicit components.
3673 XkbModifierMapMask</emphasis>
3674 is set in <emphasis>
3677 firstModMapKey</emphasis>
3679 nModMapKeys</emphasis>
3680 specify a subset of the keyboard keys for which new modifier mappings are to
3681 be assigned, and <emphasis>
3682 totalModMapKeys</emphasis>
3683 specifies the total number of keys in that range to which at least one
3684 modifier is bound. The <emphasis>
3687 totalModMapKeys</emphasis>
3688 elements of type KB_KEYMODMAP; each entry of <emphasis>
3690 specifies a key in the specified range and a new set of modifiers to be
3691 associated with that key. Any key that falls in the range specified by
3693 firstModMapKey</emphasis>
3695 nModMapKeys</emphasis>
3696 that is not assigned some value in <emphasis>
3698 has no associated modifiers.
3703 If the modifier map is changed by the <emphasis>
3704 XkbSetMap</emphasis>
3705 request, any changes are also reflected in the core protocol modifier mapping.
3706 Changes to the core protocol modifier mapping are reported to XKB-unaware
3707 clients via <emphasis>
3708 MappingNotify</emphasis>
3709 events and can be retrieved with the core protocol <emphasis>
3710 GetModifierMapping</emphasis>
3717 XkbVirtualModMapMask</emphasis>
3718 is set in <emphasis>
3721 firstVModMapKey</emphasis>
3723 nVModMapKeys</emphasis>
3724 specify a subset of the keyboard keys for which new modifier mappings are to
3725 be assigned, and <emphasis>
3726 totalVModMapKeys</emphasis>
3727 specifies the total number of keys in that range to which at least one virtual
3728 modifier is bound. The <emphasis>
3731 totalVModMapKeys</emphasis>
3732 elements of type KB_KEYVMODMAP; each entry of <emphasis>
3734 specifies a key in the specified range and a new set of virtual modifiers to
3735 be associated with that key. Any key that falls in the range specified by
3737 firstVModMapKey</emphasis>
3739 nVModMapKeys</emphasis>
3740 that is not assigned some value in <emphasis>
3742 has no associated virtual modifiers.
3747 If the resulting keyboard map is legal, the server updates the keyboard map.
3748 Changes to some keyboard components have indirect effects on others:
3754 XkbSetMapRecomputeActions</emphasis>
3755 bit is set in <emphasis>
3757 , the actions associated with any keys for which symbol or modifier bindings
3758 were changed by this request are recomputed as described in
3759 <link linkend='Assigning_Actions_To_Keys'>Assigning Actions To Keys</link>. Note
3760 that actions are recomputed <emphasis>
3762 any actions specified in this request are bound to keys, so the actions
3763 specified in this request might be clobbered by the automatic assignment of
3769 If the group width of an existing key type is changed, the list of symbols
3770 associated with any keys of the changed type might be resized accordingly. If
3771 the list increases in size, any unspecified new symbols are initialized to
3779 If the list of actions associated with a key is not empty, changing the key
3780 type of the key resizes the list. Unspecified new actions are calculated by
3781 applying any keyboard symbol interpretations to the corresponding symbols.
3786 The number of groups global to the keyboard is always equal to the largest
3787 number of groups specified by any of the key symbol maps. Changing the number
3788 of groups in one or more key symbol maps may change the number of groups global
3794 Assigning key behavior <emphasis>
3795 KB_RadioGroup</emphasis>
3796 to a key adds that key as a member of the specified radio group. Changing a
3797 key with the existing behavior <emphasis>
3798 KB_RadioGroup</emphasis>
3799 removes that key from the group. Changing the elements of a radio group can
3800 cause synthetic key press or key release events if the key to be added or
3801 removed is logically down at the time of the change.
3806 Changing a key with behavior <emphasis>
3808 causes a synthetic key release event if the key is logically but not
3809 physically down at the time of the change.
3814 This request sends an <emphasis>
3815 XkbMapNotify</emphasis>
3816 event which reflects both explicit and indirect map changes to any interested
3817 clients. If any symbolic names are changed, it sends a <emphasis>
3818 XkbNamesNotify</emphasis>
3819 reflecting the changes to any interested clients. XKB-unaware clients are
3820 notified of keyboard changes via core protocol <emphasis>
3821 MappingNotify</emphasis>
3827 Key press and key release events caused by changing key behavior may cause
3828 additional <emphasis>
3829 XkbStateNotify</emphasis>
3831 XkbIndicatorStateNotify</emphasis>
3837 <sect2 id='Querying_and_Changing_the_Compatibility_Map'>
3838 <title>Querying and Changing the Compatibility Map</title>
3841 <informaltable frame='none' tabstyle='proto'>
3842 <?dbfo keep-together="always" ?>
3843 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
3844 <colspec colname='c1' colwidth='1.0*'/>
3847 <entry role='protoname'>XkbGetCompatMap</entry>
3852 <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
3855 <entry role='protoname'>
3856 groups: KB_GROUPMASK</entry>
3859 <entry role='protoname'>
3860 getAllSI: BOOL</entry>
3863 <entry role='protoname'>
3864 firstSI, nSI: CARD16
3868 <entry role='protoreply'>
3873 <entry role='protoreply'>
3874 groupsRtrn: KB_GROUPMASK
3878 <entry role='protoreply'>
3879 firstSIRtrn, nSIRtrn, nTotalSI: CARD16
3883 <entry role='protoreply'>
3884 siRtrn: LISTofKB_SYMINTERP
3888 <entry role='protoreply'>
3889 groupRtrn: LISTofKB_MODDEF</entry>
3892 <entry role='protoerror'>Errors: <emphasis>
3906 This request returns the listed compatibility map components for the keyboard
3907 specified by <emphasis>
3908 deviceSpec</emphasis>
3910 deviceSpec</emphasis>
3911 does not specify a valid keyboard device, a <emphasis>
3913 Error results. On return, <emphasis>
3915 reports the input extension identifier of the keyboard device or <emphasis>
3917 if the server does not support the input extension.
3930 specify a subset of the symbol interpretations to be returned; if used,
3933 must be greater than <emphasis>
3935 and all of the elements specified by <emphasis>
3939 must be defined or a <emphasis>
3941 error results. If <emphasis>
3942 getAllSyms</emphasis>
3945 , the server ignores <emphasis>
3949 and returns all of the symbol interpretations defined for the keyboard.
3956 mask specifies the groups for which compatibility maps are to be returned.
3963 return value reports the total number of symbol interpretations defined for
3964 the keyboard. On successful return, the <emphasis>
3966 return list contains the definitions for <emphasis>
3968 symbol interpretations beginning at <emphasis>
3969 firstSIRtrn</emphasis>
3976 groupRtrn</emphasis>
3977 return values report the entries in the group compatibility map for any groups
3978 specified in the <emphasis>
3979 groupsRtrn</emphasis>
3985 <informaltable frame='none' tabstyle='proto'>
3986 <?dbfo keep-together="always" ?>
3987 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
3988 <colspec colname='c1' colwidth='1.0*'/>
3991 <entry role='protoname'>XkbSetCompatMap</entry>
3996 <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
3999 <entry role='protoname'>
4000 recomputeActions: BOOL</entry>
4003 <entry role='protoname'>
4004 truncateSI: BOOL</entry>
4007 <entry role='protoname'>
4008 groups: KB_GROUPMASK</entry>
4011 <entry role='protoname'>
4012 firstSI, nSI: CARD16</entry>
4015 <entry role='protoname'>
4016 si: LISTofKB_SYMINTERPRET</entry>
4019 <entry role='protoname'>
4020 groupMaps: LISTofKB_MODDEF</entry>
4024 <entry role='protoerror'>Errors: <emphasis>
4040 This request changes a specified subset of the compatibility map of the
4041 keyboard indicated by <emphasis>
4042 deviceSpec</emphasis>
4044 deviceSpec</emphasis>
4045 specifies an invalid device, a <emphasis>
4047 error results and nothing is changed.
4056 fields specify a subset of the keyboard symbol interpretations to be changed.
4059 list specifies new values for each of the interpretations in that range.
4064 The first symbol interpretation to be changed, <emphasis>
4066 , must be less than or equal to the unchanged length of the list of symbol
4067 interpretations, or a <emphasis>
4069 error results. If the resulting list would be larger than the unchanged list,
4070 it server list of symbol interpretations is automatically increased in size.
4071 Otherwise, if <emphasis>
4072 truncateSyms</emphasis>
4075 , the server deletes any symbol interpretations after the last element changed
4076 by this request, and reduces the length of the list accordingly.
4082 groupMaps</emphasis>
4083 fields contain new definitions for a subset of the group compatibility map;
4086 specifies the group compatibility map entries to be updated from <emphasis>
4087 groupMaps</emphasis>
4093 All changed compatibility maps and symbol interpretations must either ignore
4094 group state or specify a legal range of groups, or a <emphasis>
4102 recomputeActions</emphasis>
4105 , the server regenerates recalculates the actions bound to all keyboard keys by
4106 applying the new symbol interpretations to the entire key symbol map, as
4107 described in <link linkend='Assigning_Actions_To_Keys'>Assigning Actions To
4113 <sect2 id='Querying_and_Changing_Indicators'>
4114 <title>Querying and Changing Indicators</title>
4117 <informaltable frame='none' tabstyle='proto'>
4118 <?dbfo keep-together="always" ?>
4119 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
4120 <colspec colname='c1' colwidth='1.0*'/>
4123 <entry role='protoname'>XkbGetIndicatorState</entry>
4128 <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
4131 <entry role='protoreply'>
4133 state: KB_INDICATORMASK</entry>
4137 <entry role='protoerror'>Errors: <emphasis>
4147 This request reports the current state of the indicators for the keyboard
4148 specified by <emphasis>
4149 deviceSpec</emphasis>
4151 deviceSpec</emphasis>
4152 does not specify a valid keyboard, a <emphasis>
4159 On successful return, the <emphasis>
4161 field reports the input extension identifier of the keyboard or <emphasis>
4163 if the server does not support the input extension. The <emphasis>
4165 return value reports the state of each of the thirty-two indicators on the
4166 specified keyboard. The least-significant bit corresponds to indicator 0, the
4167 most significant bit to indicator 31; if a bit is set, the corresponding
4173 <informaltable frame='none' tabstyle='proto'>
4174 <?dbfo keep-together="always" ?>
4175 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
4176 <colspec colname='c1' colwidth='1.0*'/>
4179 <entry role='protoname'>XkbGetIndicatorMap</entry>
4184 <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
4187 <entry role='protoname'>
4188 which: KB_INDICATORMASK
4192 <entry role='protoreply'>
4197 <entry role='protoreply'>
4198 which: KB_INDICATORMASK
4202 <entry role='protoreply'>
4203 realIndicators: KB_INDICATORMASK
4207 <entry role='protoreply'>
4212 <entry role='protoreply'>
4213 maps: LISTofKB_INDICATORMAP</entry>
4216 <entry role='protoerror'>Errors: <emphasis>
4227 This request returns a subset of the maps for the indicators on the keyboard
4228 specified by <emphasis>
4229 deviceSpec</emphasis>
4231 deviceSpec</emphasis>
4232 does not specify a valid keyboard device, a <emphasis>
4241 field specifies the subset to be returned; a set bit in the which field
4242 indicates that the map for the corresponding indicator should be returned.
4247 On successful return, the <emphasis>
4249 field reports the input extension identifier of the keyboard or <emphasis>
4251 if the server does not support the input extension. Any indicators specified
4253 realIndicators</emphasis>
4254 are actually present on the keyboard; the rest are virtual indicators. Virtual
4255 indicators do not directly cause any visible or audible effect when they change
4256 state, but they do cause <emphasis>
4257 XkbIndicatorStateNotify</emphasis>
4265 return value reports the requested indicator maps. Indicator maps are
4266 described in <link linkend='Indicator_Maps'>Indicator Maps</link>
4271 <informaltable frame='none' tabstyle='proto'>
4272 <?dbfo keep-together="always" ?>
4273 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
4274 <colspec colname='c1' colwidth='1.0*'/>
4277 <entry role='protoname'>XkbSetIndicatorMap</entry>
4282 <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
4285 <entry role='protoname'>
4286 which: KB_INDICATORMASK</entry>
4289 <entry role='protoname'>
4290 maps: LISTofKB_INDICATORMAP</entry>
4294 <entry role='protoerror'>Errors: <emphasis>
4306 This request changes a subset of the maps on the keyboard specified by
4308 deviceSpec</emphasis>
4310 deviceSpec</emphasis>
4311 does not specify a valid keyboard device, a <emphasis>
4320 field specifies the subset to be changed; the <emphasis>
4322 field contains the new definitions.
4327 If successful, the new indicator maps are applied immediately. If any
4328 indicators change state as a result of the new maps, the server generates
4330 XkbIndicatorStateNotify</emphasis>
4331 events as appropriate.
4336 <informaltable frame='none' tabstyle='proto'>
4337 <?dbfo keep-together="always" ?>
4338 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
4339 <colspec colname='c1' colwidth='1.0*'/>
4342 <entry role='protoname'>XkbGetNamedIndicator</entry>
4347 <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
4350 <entry role='protoname'>
4351 ledClass: KB_LEDCLASSSPEC</entry>
4354 <entry role='protoname'>
4355 ledID: KB_IDSPEC</entry>
4358 <entry role='protoname'>
4363 <entry role='protoreply'>
4368 <entry role='protoreply'>
4373 <entry role='protoreply'>
4378 <entry role='protoreply'>
4383 <entry role='protoreply'>
4388 <entry role='protoreply'>
4393 <entry role='protoreply'>
4398 <entry role='protoreply'>
4399 map: KB_INDICATORMAP</entry>
4403 <entry role='protoerror'>Errors: <emphasis>
4417 This request returns information about the indicator specified by <emphasis>
4422 indicator</emphasis>
4423 on the keyboard specified by <emphasis>
4424 deviceSpec</emphasis>
4426 indicator</emphasis>
4427 field specifies the name of the indicator for which information is to be
4434 deviceSpec</emphasis>
4435 does not specify a device with indicators, a <emphasis>
4437 error results. If <emphasis>
4439 does not have the value <emphasis>
4440 DfltXIClass</emphasis>
4442 LedFeedbackClass</emphasis>
4444 KbdFeedbackClass</emphasis>
4447 error results. If <emphasis>
4449 does not have the value <emphasis>
4451 or specify the identifier of a feedback of the class specified by <emphasis>
4453 on the device specified by <emphasis>
4454 deviceSpec</emphasis>
4457 error results. If <emphasis>
4458 indicator</emphasis>
4459 is not a valid ATOM other than <emphasis>
4468 This request is always supported with default class and identifier on the core
4469 keyboard device. If the request specifies a device other than the core keyboard
4470 device or a feedback class and identifier other than the defaults, and the
4471 server does not support indicator names or indicator maps for extension
4472 devices, the <emphasis>
4473 supported</emphasis>
4474 return value is <emphasis>
4476 and the values of the other fields in the reply are undefined. If the client
4477 which issued the unsupported request has also selected to do so, it will also
4478 receive an <emphasis>
4479 XkbExtensionDeviceNotify</emphasis>
4480 event which reports the attempt to use an unsupported feature, in this case
4481 one or both of <emphasis>
4482 XkbXI_IndicatorMaps</emphasis>
4484 XkbXI_IndicatorNames</emphasis>
4490 Otherwise, <emphasis>
4491 supported</emphasis>
4496 field reports the input extension identifier of the keyboard or <emphasis>
4498 if the server does not support the input extension. The <emphasis>
4499 indicator</emphasis>
4500 return value reports the name for which information was requested and the
4503 return value is <emphasis>
4505 if an indicator with the specified name was found on the device.
4510 If a matching indicator was found:
4515 <para>The <emphasis>
4517 return value reports the state of the indicator at the time of the request.
4521 <para>The <emphasis>
4522 realIndicator</emphasis>
4523 return value is <emphasis>
4525 if the requested indicator is actually present on the keyboard or <emphasis>
4531 <para>The <emphasis>
4533 return value reports the index of the indicator in the requested feedback.
4537 <para>The <emphasis>
4539 return value reports the indicator map used by to automatically change the
4540 state of the specified indicator in response to changes in keyboard state or
4547 If no matching indicator is found, the <emphasis>
4549 return value is <emphasis>
4551 , and the <emphasis>
4554 realIndicator</emphasis>
4559 return values are undefined.
4564 <informaltable frame='none' tabstyle='proto'>
4565 <?dbfo keep-together="always" ?>
4566 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
4567 <colspec colname='c1' colwidth='1.0*'/>
4570 <entry role='protoname'>XkbSetNamedIndicator</entry>
4575 <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
4578 <entry role='protoname'>
4579 ledClass: KB_LEDCLASSSPEC</entry>
4582 <entry role='protoname'>
4583 ledID: KB_IDSPEC</entry>
4586 <entry role='protoname'>
4587 indicator: ATOM</entry>
4590 <entry role='protoname'>
4591 setState: BOOL</entry>
4594 <entry role='protoname'>
4598 <entry role='protoname'>
4599 setMap: BOOL</entry>
4602 <entry role='protoname'>
4603 createMap: BOOL</entry>
4606 <entry role='protoname'>
4607 map: KB_SETINDICATORMAP</entry>
4611 <entry role='protoerror'>Errors: <emphasis>
4625 This request changes various aspects of the indicator specified by <emphasis>
4630 indicator</emphasis>
4631 on the keyboard specified by <emphasis>
4632 deviceSpec</emphasis>
4634 indicator</emphasis>
4635 argument specifies the name of the indicator to be updated.
4641 deviceSpec</emphasis>
4642 does not specify a device with indicators, a <emphasis>
4644 error results. If <emphasis>
4646 does not have the value <emphasis>
4647 DfltXIClass</emphasis>
4649 LedFeedbackClass</emphasis>
4651 KbdFeedbackClass</emphasis>
4654 error results. If <emphasis>
4656 does not have the value <emphasis>
4658 or specify the identifier of a feedback of the class specified by <emphasis>
4660 on the device specified by <emphasis>
4661 deviceSpec</emphasis>
4664 error results. If <emphasis>
4665 indicator</emphasis>
4666 is not a valid ATOM other than <emphasis>
4675 This request is always supported with default class and identifier on the core
4676 keyboard device. If the request specifies a device other than the core keyboard
4677 device or a feedback class and identifier other than the defaults, and the
4678 server does not support indicator names or indicator maps for extension
4679 devices, the <emphasis>
4680 supported</emphasis>
4681 return value is <emphasis>
4683 and the values of the other fields in the reply are undefined. If the client
4684 which issued the unsupported request has also selected to do so, it will also
4685 receive an <emphasis>
4686 XkbExtensionDeviceNotify</emphasis>
4687 event which reports the attempt to use an unsupported feature, in this case
4688 one or both of <emphasis>
4689 XkbXI_IndicatorMaps</emphasis>
4691 XkbXI_IndicatorNames</emphasis>
4697 Otherwise, <emphasis>
4698 supported</emphasis>
4703 field reports the input extension identifier of the keyboard or <emphasis>
4705 if the server does not support the input extension. The <emphasis>
4706 indicator</emphasis>
4707 return value reports the name for which information was requested and the
4710 return value is <emphasis>
4712 if an indicator with the specified name was found on the device.
4717 If no indicator with the specified name is found on the specified device, and
4719 createMap</emphasis>
4722 , XKB assigns the specified name to the lowest-numbered indicator that has no
4723 name (i.e. whose name is <emphasis>
4725 ) and applies the rest of the fields in the request to the newly named
4726 indicator. If no unnamed indicators remain, this request reports no error and
4732 If no matching indicator is found or new indicator assigned this request
4733 reports no error and has no effect. Otherwise, it updates the indicator as
4743 , XKB changes the map for the indicator (see <link linkend='Indicator_Maps'>Indicator Maps</link>) to reflect the
4744 values specified in <emphasis>
4755 , XKB attempts to explicitly change the state of the indicator to the state
4756 specified in <emphasis>
4758 . The effects of an attempt to explicitly change the state of an indicator
4759 depend on the values in the map for that indicator and are not guaranteed to
4765 If this request affects both indicator map and state, it updates the indicator
4766 map before attempting to change its state, so the success of the explicit
4767 change depends on the indicator map values specified in the request.
4772 If this request changes the indicator map, it applies the new map immediately
4773 to determine the appropriate state for the indicator given the new indicator
4774 map and the current state of the keyboard.
4779 <sect2 id='Querying_and_Changing_Symbolic_Names'>
4780 <title>Querying and Changing Symbolic Names</title>
4783 <informaltable frame='none' tabstyle='proto'>
4784 <?dbfo keep-together="always" ?>
4785 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
4786 <colspec colname='c1' colwidth='1.0*'/>
4789 <entry role='protoname'>XkbGetNames</entry>
4794 <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
4797 <entry role='protoname'>
4798 which: KB_NAMEDETAILMASK</entry>
4801 <entry role='protoreply'>
4804 minKeyCode, maxKeyCode: KEYCODE
4807 groupNames: KB_GROUPMASK
4808 virtualMods: KB_VMODMASK
4811 indicators: KB_INDICATORMASK
4812 nRadioGroups, nKeyAliases: CARD8
4813 present: KB_NAMEDETAILMASK
4814 valueList: LISTofITEMs</entry>
4818 <entry role='protoerror'>Errors: <emphasis>
4830 This request returns the symbolic names for various components of the keyboard
4831 mapping for the device specified by <emphasis>
4832 deviceSpec</emphasis>
4835 field specifies the keyboard components for which names are to be returned. If
4837 deviceSpec</emphasis>
4838 does not specify a valid keyboard device, a <emphasis>
4840 error results. If any undefined bits in <emphasis>
4842 are non-zero, a <emphasis>
4851 return value contains the X Input Extension device identifier of the specified
4852 device or <emphasis>
4854 if the server does not support the input extension. The <emphasis>
4857 valueList</emphasis>
4858 return values specify the components for which names are being reported. If a
4859 component is specified in <emphasis>
4861 , the corresponding element is present in the <emphasis>
4862 valueList</emphasis>
4863 , otherwise that component has length <emphasis>
4865 . The components of the <emphasis>
4866 valueList</emphasis>
4867 appear in the following order, when present:.
4870 <informaltable frame='none'>
4871 <?dbfo keep-together="always" ?>
4872 <tgroup cols='3' align='left' colsep='0' rowsep='0'>
4873 <colspec colname='c1' colwidth='1.0*'/>
4874 <colspec colname='c2' colwidth='1.0*'/>
4875 <colspec colname='c3' colwidth='1.0*'/>
4878 <entry>Component</entry>
4886 XkbKeycodesName</emphasis>
4889 <entry> ATOM</entry>
4893 XkbGeometryName</emphasis>
4896 <entry> ATOM</entry>
4900 XkbSymbolsName</emphasis>
4903 <entry> ATOM</entry>
4907 XkbPhysSymbolsName</emphasis>
4910 <entry> ATOM</entry>
4914 XkbTypesName</emphasis>
4917 <entry> ATOM</entry>
4921 XkbCompatName</emphasis>
4924 <entry> ATOM</entry>
4928 XkbKeyTypeNames</emphasis>
4933 <entry> LISTofATOM</entry>
4937 XkbKTLevelNames</emphasis>
4943 nKTLevels</emphasis>
4945 <entry>{ count: LISTofCARD8,
4946 names: LISTofATOM }</entry>
4950 XkbIndicatorNames</emphasis>
4952 <entry>One per bit set in <emphasis>
4953 indicators</emphasis>
4955 <entry> LISTofATOM</entry>
4959 XkbVirtualModNames</emphasis>
4961 <entry>One per bit set in <emphasis>
4962 virtualMods</emphasis>
4964 <entry> LISTofATOM</entry>
4968 XkbGroupNames </emphasis>
4970 <entry>One per bit set in <emphasis>
4971 groupNames</emphasis>
4973 <entry> LISTofATOM</entry>
4977 XkbKeyNames</emphasis>
4982 <entry> LISTofKB_KEYNAME</entry>
4986 XkbKeyAliases</emphasis>
4989 nKeyAliases</emphasis>
4991 <entry> LISTofKB_KEYALIAS</entry>
4995 XkbRGNames</emphasis>
4998 nRadioGroups</emphasis>
5000 <entry> LISTofATOM</entry>
5007 If type names are reported, the <emphasis>
5009 return value reports the number of types defined for the keyboard, and the
5010 list of key type names in <emphasis>
5011 valueList</emphasis>
5019 If key type level names are reported, the list of key type level names in the
5021 valueList</emphasis>
5022 has two parts: The <emphasis>
5024 array has <emphasis>
5026 elements, each of which reports the number of level names reported for the
5027 corresponding key type. The <emphasis>
5029 array has <emphasis>
5030 nKTLevels</emphasis>
5031 atoms and reports the names of each type sequentially. The <emphasis>
5032 nKTLevels</emphasis>
5033 return value is always equal to the sum of all of the elements of the
5041 If indicator names are reported, the <emphasis>
5042 indicators</emphasis>
5043 mask specifies the indicators for which names are defined; any indicators not
5044 specified in <emphasis>
5045 indicators</emphasis>
5046 have the name <emphasis>
5048 . The list of indicator names in <emphasis>
5049 valueList</emphasis>
5050 contains the names of the listed indicators, beginning with the
5051 lowest-numbered indicator for which a name is defined and proceeding to the
5057 If virtual modifier names are reported, the <emphasis>
5058 virtualMods</emphasis>
5059 mask specifies the virtual modifiers for which names are defined; any virtual
5060 modifiers not specified in <emphasis>
5061 virtualMods</emphasis>
5062 have the name <emphasis>
5064 . The list of virtual modifier names in <emphasis>
5065 valueList</emphasis>
5066 contains the names of the listed virtual modifiers, beginning with the
5067 lowest-numbered virtual modifier for which a name is defined and proceeding to
5073 If group names are reported, the <emphasis>
5074 groupNames</emphasis>
5075 mask specifies the groups for which names are defined; any groups not
5076 specified in <emphasis>
5077 groupNames</emphasis>
5078 have the name <emphasis>
5080 . The list of group names in <emphasis>
5081 valueList</emphasis>
5082 contains the names of the listed groups, beginning with the lowest-numbered
5083 group for which a name is defined and proceeding to the highest.
5088 If key names are reported, the <emphasis>
5092 return values specify a range of keys which includes all keys for which names
5093 are defined; any key that does not fall in the range specified by <emphasis>
5097 has the name <emphasis>
5098 NullKeyName</emphasis>
5099 . The list of key names in the <emphasis>
5100 valueList</emphasis>
5103 entries and specifies the names of the keys beginning at <emphasis>
5110 If key aliases are reported, the <emphasis>
5111 nKeyAliases</emphasis>
5112 return value specifies the total number of key aliases defined for the
5113 keyboard. The list of key aliases in <emphasis>
5114 valueList</emphasis>
5116 nKeyAliases</emphasis>
5117 entries, each of which reports an alias and the real name of the key to which
5123 If radio group names are reported, the <emphasis>
5124 nRadioGroups</emphasis>
5125 return value specifies the number of radio groups on the keyboard for which
5126 names are defined. The list of radio group names in <emphasis>
5127 valueList</emphasis>
5128 reports the names of each group and has <emphasis>
5129 nRadioGroups</emphasis>
5135 <informaltable frame='none' tabstyle='proto'>
5136 <?dbfo keep-together="always" ?>
5137 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
5138 <colspec colname='c1' colwidth='1.0*'/>
5141 <entry role='protoname'>XkbSetNames</entry>
5146 <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
5149 <entry role='protoargs'>which: KB_NAMEDETAILMASK</entry>
5152 <entry role='protoname'>
5153 virtualMods: KB_VMODMASK</entry>
5156 <entry role='protoname'>
5157 firstType, nTypes: CARD8</entry>
5160 <entry role='protoname'>
5161 firstKTLevel, nKTLevels: CARD8</entry>
5164 <entry role='protoname'>
5165 totalKTLevelNames: CARD16</entry>
5168 <entry role='protoname'>
5169 indicators: KB_INDICATORMASK</entry>
5172 <entry role='protoname'>
5173 groupNames: KB_GROUPMASK</entry>
5176 <entry role='protoname'>
5177 nRadioGroups: CARD8</entry>
5180 <entry role='protoname'>
5181 firstKey: KEYCODE</entry>
5184 <entry role='protoname'>
5185 nKeys, nKeyAliases: CARD8</entry>
5188 <entry role='protoname'>
5189 valueList: LISTofITEMs</entry>
5193 <entry role='protoerror'>Errors: <emphasis>
5211 This request changes the symbolic names for the requested components of the
5212 keyboard specified by <emphasis>
5213 deviceSpec</emphasis>
5216 field specifies the components for which one or more names are to be updated.
5218 deviceSpec</emphasis>
5219 does not specify a valid keyboard device, a <emphasis>
5221 error results. If any undefined bits in <emphasis>
5223 are non-zero, a <emphasis>
5225 error results. If any error (other than <emphasis>
5228 Implementation</emphasis>
5229 ) occurs, this request returns without modifying any names.
5237 valueList</emphasis>
5238 fields specify the components to be changed; the type of each <emphasis>
5239 valueList</emphasis>
5240 entry, the order in which components appear in the <emphasis>
5241 valueList</emphasis>
5242 when specified, and the correspondence between components in <emphasis>
5244 and the entries in the <emphasis>
5245 valueList</emphasis>
5246 are as specified for the <emphasis>
5247 XkbGetNames</emphasis>
5253 If keycodes, geometry, symbols, physical symbols, types or compatibility map
5254 names are to be changed, the corresponding entries in the <emphasis>
5255 valueList</emphasis>
5256 must have the value <emphasis>
5258 or specify a valid ATOM, else an <emphasis>
5265 If key type names are to be changed, the <emphasis>
5266 firstType</emphasis>
5269 fields specify a range of types for which new names are supplied, and the list
5270 of key type names in <emphasis>
5271 valueList</emphasis>
5274 elements. Names for types that fall outside of the range specified by
5276 firstType</emphasis>
5279 are not affected. If this request specifies names for types that are not
5280 present on the keyboard, a <emphasis>
5282 error results. All of the type names in the <emphasis>
5283 valueList</emphasis>
5284 must be valid ATOMs or have the value <emphasis>
5293 The names of the first four keyboard types are specified by the XKB extension
5294 and cannot be changed; including any of the canonical types in this request
5295 causes an <emphasis>
5297 error, as does trying to assign the name reserved for a canonical type to one
5298 of the other key types.
5303 If key type level names are to be changed, the <emphasis>
5304 firstKTLevel</emphasis>
5306 nKTLevels</emphasis>
5307 fields specify a range of key types for which new level names are supplied,
5308 and the list of key type level names in the <emphasis>
5309 valueList</emphasis>
5310 has two parts: The <emphasis>
5312 array has <emphasis>
5313 nKTLevels</emphasis>
5314 elements, each of which specifies the number of levels for which names are
5315 supplied on the corresponding key type; any levels for which no names are
5316 specified are assigned the name <emphasis>
5320 array has <emphasis>
5321 totalKTLevels</emphasis>
5322 atoms and specifies the names of each type sequentially. The <emphasis>
5323 totalKTLevels</emphasis>
5324 field must always equal the sum of all of the elements of the <emphasis>
5326 array. Level names for types that fall outside of the specified range are not
5327 affected. If this request specifies level names for types that are not present
5328 on the keyboard, or if it specifies more names for a type than the type has
5329 levels, a <emphasis>
5331 error results. All specified type level names must be <emphasis>
5333 or a valid ATOM or an <emphasis>
5340 If indicator names are to be changed, the <emphasis>
5341 indicators</emphasis>
5342 mask specifies the indicators for which new names are specified; the names for
5343 indicators not specified in <emphasis>
5344 indicators</emphasis>
5345 are not affected. The list of indicator names in <emphasis>
5346 valueList</emphasis>
5347 contains the new names for the listed indicators, beginning with the
5348 lowest-numbered indicator for which a name is defined and proceeding to the
5349 highest. All specified indicator names must be a valid ATOM or <emphasis>
5358 If virtual modifier names are to be changed, the <emphasis>
5359 virtualMods</emphasis>
5360 mask specifies the virtual modifiers for which new names are specified; names
5361 for any virtual modifiers not specified in <emphasis>
5362 virtualMods</emphasis>
5363 are not affected. The list of virtual modifier names in <emphasis>
5364 valueList</emphasis>
5365 contains the new names for the specified virtual modifiers, beginning with the
5366 lowest-numbered virtual modifier for which a name is defined and proceeding to
5367 the highest. All virtual modifier names must be valid ATOMs or <emphasis>
5376 If group names are to be changed, the <emphasis>
5377 groupNames</emphasis>
5378 mask specifies the groups for which new names are specified; the name of any
5379 group not specified in <emphasis>
5380 groupNames</emphasis>
5381 is not changed. The list of group names in <emphasis>
5382 valueList</emphasis>
5383 contains the new names for the listed groups, beginning with the
5384 lowest-numbered group for which a name is defined and proceeding to the
5385 highest. All specified group names must be a valid ATOM or <emphasis>
5394 If key names are to be changed, the <emphasis>
5398 fields specify a range of keys for which new names are defined; the name of
5399 any key that does not fall in the range specified by <emphasis>
5403 is not changed. The list of key names in the <emphasis>
5404 valueList</emphasis>
5407 entries and specifies the names of the keys beginning at <emphasis>
5414 If key aliases are to be changed, the <emphasis>
5415 nKeyAliases</emphasis>
5416 field specifies the length of a new list of key aliases for the keyboard. The
5417 list of key aliases can only be replaced in its entirety; it cannot be
5418 replaced. The list of key aliases in <emphasis>
5419 valueList</emphasis>
5421 nKeyAliases</emphasis>
5422 entries, each of which reports an alias and the real name of the key to which
5428 XKB does not check key names or aliases for consistency and validity, so
5429 applications should take care not to assign duplicate names or aliases
5434 If radio group names are to be changed, the <emphasis>
5435 nRadioGroups</emphasis>
5436 field specifies the length of a new list of radio group names for the
5437 keyboard. There is no way to edit the list of radio group names; it can only be
5438 replaced in its entirety. The list of radio group names in <emphasis>
5439 valueList</emphasis>
5440 reports the names of each group and has <emphasis>
5441 nRadioGroups</emphasis>
5442 entries. If the list of radio group names specifies names for more radio
5443 groups than XKB allows (32), a <emphasis>
5445 error results. All specified radio group names must be valid ATOMs or have the
5455 <sect2 id='Querying_and_Changing_Keyboard_Geometry'>
5456 <title>Querying and Changing Keyboard Geometry</title>
5459 <informaltable frame='none' tabstyle='proto'>
5460 <?dbfo keep-together="always" ?>
5461 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
5462 <colspec colname='c1' colwidth='1.0*'/>
5465 <entry role='protoname'>XkbGetGeometry</entry>
5470 <entry role='protoargs'>deviceSpec: KB_DEVICESPEC
5474 <entry role='protoname'>
5478 <entry role='protoreply'>
5483 <entry role='protoname'>
5488 <entry role='protoname'>
5493 <entry role='protoname'>
5494 widthMM, heightMM: CARD16
5498 <entry role='protoname'>
5499 baseColorNdx, labelColorNdx: CARD8
5503 <entry role='protoname'>
5504 properties: LISTofKB_PROPERTY
5508 <entry role='protoname'>
5509 colors: LISTofSTRING8
5513 <entry role='protoname'>
5514 shapes: LISTofKB_SHAPE
5518 <entry role='protoname'>
5519 sections: LISTofKB_SECTION
5523 <entry role='protoname'>
5524 doodads: LISTofKB_DOODAD
5528 <entry role='protoname'>
5529 keyAliases: LISTofKB_KEYALIAS</entry>
5532 <entry role='protoerror'>Errors: <emphasis>
5541 This request returns a description of the physical layout of a keyboard. If the
5544 field has the value <emphasis>
5546 , or if name is identical to the name of the geometry for the keyboard
5547 specified by <emphasis>
5548 deviceSpec</emphasis>
5549 , this request returns the geometry of the keyboard specified by <emphasis>
5550 deviceSpec</emphasis>
5551 ; otherwise, if <emphasis>
5553 is a valid atom other than <emphasis>
5555 , the server returns the keyboard geometry description with that name in the
5556 server database of keyboard components (see <link linkend='The_Server_Database_of_Keyboard_Components'>The Server Database of Keyboard
5557 Components</link>) if one exists. If <emphasis>
5558 deviceSpec</emphasis>
5559 does not specify a valid keyboard device, a <emphasis>
5561 error results. If <emphasis>
5563 has a value other than <emphasis>
5565 or a valid ATOM, an <emphasis>
5572 On successful return, the <emphasis>
5574 field reports the X Input extension identifier of the keyboard device
5575 specified in the request, or <emphasis>
5577 if the server does not support the input extension.
5584 return value reports whether the requested geometry was available. If
5589 , no matching geometry was found and the remaining fields in the request reply
5590 are undefined; if <emphasis>
5594 , the remaining fields of the reply describe the requested keyboard geometry.
5595 The interpretation of the components that make up a keyboard geometry is
5596 described in detail in <link linkend='Keyboard_Geometry'>Keyboard
5602 <informaltable frame='none' tabstyle='proto'>
5603 <?dbfo keep-together="always" ?>
5604 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
5605 <colspec colname='c1' colwidth='1.0*'/>
5608 <entry role='protoname'>XkbSetGeometry</entry>
5613 <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
5616 <entry role='protoname'>
5620 <entry role='protoname'>
5621 widthMM, heightMM, CARD16</entry>
5624 <entry role='protoname'>
5625 baseColorNdx, labelColorNdx: CARD8</entry>
5628 <entry role='protoname'>
5629 shapes: LISTofKB_SHAPE</entry>
5632 <entry role='protoname'>
5633 sections: LISTofKB_SECTION</entry>
5636 <entry role='protoname'>
5637 properties: LISTofKB_PROPERTY</entry>
5640 <entry role='protoname'>
5641 colors: LISTofSTRING8</entry>
5644 <entry role='protoname'>
5645 doodads: LISTofKB_DOODAD</entry>
5648 <entry role='protoname'>
5649 keyAliases: LISTofKB_KEYALIAS</entry>
5653 <entry role='protoerror'>Errors: <emphasis>
5667 This request changes the reported description of the geometry for the keyboard
5668 specified by <emphasis>
5669 deviceSpec</emphasis>
5670 . If deviceSpec does not specify a valid keyboard device, a <emphasis>
5679 field specifies the name of the new keyboard geometry and must be a valid ATOM
5682 error results. The new geometry is not added to the server database of
5683 keyboard components, but it can be retrieved using the <emphasis>
5684 XkbGetGeometry</emphasis>
5685 request for as long as it is bound to the keyboard. The keyboard geometry
5686 symbolic name is also updated from the name field, and an <emphasis>
5687 XkbNamesNotify</emphasis>
5688 event is generated, if necessary.
5693 The list of <emphasis>
5695 must include at least two definitions, or a <emphasis>
5697 error results. All color definitions in the geometry must specify a legal
5698 color (i.e. must specify a valid index for one of the entries of the <emphasis>
5700 list) or a <emphasis>
5702 error results. The <emphasis>
5703 baseColorNdx</emphasis>
5705 labelColorNdx</emphasis>
5706 must be different or a <emphasis>
5713 The list of <emphasis>
5715 must include at least one shape definition, or a <emphasis>
5717 error results. If any two shapes have the same name, a <emphasis>
5719 error result. All doodads and keys which specify shape must specify a valid
5720 index for one of the elements of the <emphasis>
5722 list, or a <emphasis>
5729 All section, shape and doodad names must be valid ATOMs or an <emphasis>
5731 error results; the constant <emphasis>
5733 is not permitted for any of these components.
5738 All doodads must be of a known type; XKB does not support "private" doodad
5744 If, after rotation, any keys or doodads fall outside of the bounding box for a
5745 section, the bounding box is automatically adjusted to the minimum size which
5746 encloses all of its components.
5751 If, after adjustment and rotation, the bounding box of any section or doodad
5752 extends below zero on either the X or Y axes, the entire geometry is translated
5753 so that the minimum extent along either axis is zero.
5758 If, after rotation and translation, any keyboard components fall outside of the
5759 rectangle specified by <emphasis>
5763 , the keyboard dimensions are automatically resized to the minimum bounding box
5764 that surrounds all components. Otherwise, the width and height of the keyboard
5765 are left as specified.
5772 field of any overlay key definitions must specify a key that is in the section
5773 that contains the overlay key, or a <emphasis>
5775 error results. This request does not check the value of the <emphasis>
5777 field of an overlay key definition, so applications must be careful to avoid
5778 conflicts with actual keys.
5783 This request does not verify that key names or aliases are unique. It also does
5784 not verify that all key names specified in the geometry are bound to some
5785 keycode or that all keys that are named in the keyboard definition are also
5786 available in the geometry. Applications should make sure that keyboard geometry
5787 has no internal conflicts and is consistent with the other components of the
5788 keyboard definition, but XKB does not check for or guarantee it.
5793 <sect2 id='Querying_and_Changing_Per_Client_Flags'>
5794 <title>Querying and Changing Per-Client Flags</title>
5797 <informaltable frame='none' tabstyle='proto'>
5798 <?dbfo keep-together="always" ?>
5799 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
5800 <colspec colname='c1' colwidth='1.0*'/>
5803 <entry role='protoname'>XkbPerClientFlags</entry>
5808 <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
5811 <entry role='protoname'>
5812 change: KB_PCFMASK</entry>
5815 <entry role='protoname'>
5816 value: KB_PCFMASK</entry>
5819 <entry role='protoname'>
5820 ctrlsToChange: KB_BOOLCTRLMASK</entry>
5823 <entry role='protoname'>
5824 autoCtrls: KB_BOOLCTRLMASK</entry>
5827 <entry role='protoname'>
5828 autoCtrlValues: KB_BOOLCTRLMASK</entry>
5831 <entry role='protoreply'>
5833 supported: KB_PCFMASK
5835 autoCtrls: KB_BOOLCTRLMASK
5836 autoCtrlValues: KB_BOOLCTRLMASK
5837 where: KB_PCFMASK:</entry>
5841 <entry role='protoerror'>Errors: <emphasis>
5857 Changes the client specific flags for the keyboard specified by <emphasis>
5858 deviceSpec</emphasis>
5859 . Reports a <emphasis>
5862 deviceSpec</emphasis>
5863 does not specify a valid keyboard device.
5868 Any flags specified in <emphasis>
5870 are set to the corresponding values in <emphasis>
5872 , provided that the server supports the requested control. Legal
5873 per-client-flags are:
5876 <informaltable frame='topbot'>
5877 <?dbfo keep-together="always" ?>
5878 <tgroup cols='2' align='left' colsep='0' rowsep='0'>
5879 <colspec colname='c1' colwidth='1.0*'/>
5880 <colspec colname='c2' colwidth='1.0*'/>
5883 <entry>Flag…</entry>
5884 <entry>Described in…</entry>
5890 XkbPCF_DetectableAutorepeat</emphasis>
5892 <entry><link linkend='Detectable_Autorepeat'>Detectable
5893 Autorepeat</link></entry>
5897 XkbPCF_GrabsUseXKBStateMask</emphasis>
5899 <entry><link linkend='Setting_a_Passive_Grab_for_an_XKB_State'>Setting a Passive Grab
5900 for an XKB State</link></entry>
5904 XkbPCF_AutoResetControlsMask</emphasis>
5906 <entry><link linkend='Automatic_Reset_of_Boolean_Controls'>Automatic Reset of
5907 Boolean Controls</link></entry>
5911 XkbPCF_LookupStateWhenGrabbed</emphasis>
5913 <entry><link linkend='Effects_of_XKB_on_Core_Protocol_Events'>Effects of XKB on Core
5914 Protocol Events</link></entry>
5918 XkbPCF_SendEventUsesXKBState</emphasis>
5920 <entry><link linkend='Sending_Events_to_Clients'>Sending Events to
5921 Clients</link></entry>
5929 PCF_AutoResetControls</emphasis>
5930 is set in both <emphasis>
5934 , the client’s mask of controls to be changed is updated from <emphasis>
5935 ctrlsToChange</emphasis>
5937 autoCtrls</emphasis>
5939 autoCtrlValues</emphasis>
5940 . Any controls specified in <emphasis>
5941 ctrlsToChange</emphasis>
5942 are modified in the auto-reset controls mask for the client; the corresponding
5943 bits from the <emphasis>
5944 autoCtrls</emphasis>
5945 field are copied into the auto-reset controls mask and the corresponding bits
5947 autoCtrlValues</emphasis>
5948 are copied into the auto-reset controls state values. If any controls are
5949 specified in <emphasis>
5950 autoCtrlValues</emphasis>
5951 but not in <emphasis>
5952 autoCtrls</emphasis>
5955 error results. If any controls are specified in <emphasis>
5956 autoCtrls</emphasis>
5957 but not in <emphasis>
5958 ctrlsToChange</emphasis>
5967 PCF_AutoResetControls</emphasis>
5968 is set in <emphasis>
5970 but not in <emphasis>
5972 , the client’s mask of controls to be changed is reset to all zeroes (i.e.
5973 the client does not change any controls when it exits).
5978 This request reports a <emphasis>
5980 error if a bit is set in any of the value masks but not in the control mask
5981 that governs it or a <emphasis>
5983 error if any undefined bits are set in any of the masks.
5988 On successful return, the <emphasis>
5990 field reports the X Input extension identifier of the keyboard, or <emphasis>
5992 if the server does not support the X Input Extension.
5998 supported</emphasis>
5999 return value reports the set of per-client flags that are supported by the
6000 server; in this version of XKB, only the <emphasis>
6001 XkbPCF_DetectableAutorepeat</emphasis>
6002 per-client flag is optional; all other per-client flags must be supported.
6009 return value reports the current settings of all per-client flags for the
6010 specified keyboard. The <emphasis>
6011 autoCtrls</emphasis>
6012 return value reports the current set of controls to be reset when the client
6013 exits, while the <emphasis>
6014 autoCtrlValues</emphasis>
6015 return value reports the state to which they should be set.
6020 <sect2 id='Using_the_Servers_Database_of_Keyboard_Components'>
6021 <title>Using the Server’s Database of Keyboard Components</title>
6024 <informaltable frame='none' tabstyle='proto'>
6025 <?dbfo keep-together="always" ?>
6026 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
6027 <colspec colname='c1' colwidth='1.0*'/>
6030 <entry role='protoname'>XkbListComponents</entry>
6035 <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
6038 <entry role='protoname'>
6039 maxNames: CARD16</entry>
6042 <entry role='protoname'>
6043 keymapsSpec: STRING8</entry>
6046 <entry role='protoname'>
6047 keycodesSpec: STRING8</entry>
6050 <entry role='protoname'>
6051 typesSpec: STRING8</entry>
6054 <entry role='protoname'>
6055 compatMapSpec: STRING8</entry>
6058 <entry role='protoname'>
6059 symbolsSpec: STRING8</entry>
6062 <entry role='protoname'>
6063 geometrySpec: STRING8
6067 <entry role='protoreply'>
6072 <entry role='protoreply'>
6077 <entry role='protoreply'>
6078 keymaps,keycodes,types,compatMaps: LISTofKB_COMPONENTNAME
6082 <entry role='protoreply'>
6083 symbols, geometries: LISTofKB_COMPONENTNAME</entry>
6086 <entry role='protoreply'>Where:</entry>
6089 <entry role='protoreply'>KB_COMPONENTNAME { hints: CARD8, name:
6093 <entry role='protoerror'>Errors: <emphasis>
6104 This request returns one or more lists of keyboard components that are
6105 available from the X server database of keyboard components for the device
6106 specified by <emphasis>
6107 deviceSpec</emphasis>
6108 . The X server is allowed, but not required or expected, to maintain separate
6109 databases for each keyboard device. A <emphasis>
6111 error results if <emphasis>
6112 deviceSpec</emphasis>
6113 does not specify a valid keyboard device.
6120 field specifies the maximum number of component names to be reported, in
6121 total, by this request.
6127 keymapsSpec</emphasis>
6129 keycodesSpec</emphasis>
6131 typesSpec</emphasis>
6133 compatMapSpec</emphasis>
6135 symbolsSpec</emphasis>
6137 geometrySpec</emphasis>
6138 request fields specify a pattern to be matched against the names of all
6139 components of the corresponding type in the server database of keyboard
6145 Each pattern uses the ISO Latin-1 encoding and should contain only parentheses,
6146 the wildcard characters "?" and "*" or characters that are permitted in a
6147 component class or member name (see <link linkend='Component_Names'>Component Names</link>). Illegal
6148 characters in a pattern are simply ignored; no error results if a pattern
6149 contains illegal characters.
6154 Comparison is case-sensitive and, in a pattern, the "?" wildcard character
6155 matches any single character except parentheses while the "*" character matches
6156 any number of characters except parentheses. If an implementation accepts
6157 characters other than those required by XKB, whether or not those characters
6158 match either wildcard is also implementation dependent. An empty pattern does
6159 not match any component names.
6164 On successful return, the <emphasis>
6166 return value reports the X Input Extension device identifier of the specified
6167 device, or <emphasis>
6169 if the server does not support the X input extension. The <emphasis>
6171 return value reports the number of matching component names that could not be
6172 returned due to the setting of the <emphasis>
6174 field in the request.
6186 compatMaps</emphasis>
6190 geometries</emphasis>
6191 return the hints (see <link linkend='Component_Hints'>Component
6192 Hints</link>) and names of any components from the server database that match
6193 the corresponding pattern.
6198 <link linkend='The_Server_Database_of_Keyboard_Components'>The Server Database of Keyboard
6199 Components</link> describes the X server database of keyboard components in
6205 <informaltable frame='none' tabstyle='proto'>
6206 <?dbfo keep-together="always" ?>
6207 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
6208 <colspec colname='c1' colwidth='1.0*'/>
6211 <entry role='protoname'>XkbGetKbdByName</entry>
6216 <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
6219 <entry role='protoname'>
6220 need, want: KB_GBNDETAILMASK</entry>
6223 <entry role='protoname'>
6227 <entry role='protoname'>
6228 keymapsSpec: STRING8</entry>
6231 <entry role='protoname'>
6232 keycodesSpec, typesSpec: STRING8</entry>
6235 <entry role='protoname'>
6236 compatMapSpec, symbolsSpec: STRING8</entry>
6239 <entry role='protoname'>
6240 geometrySpec: STRING8
6244 <entry role='protoreply'>
6249 <entry role='protoreply'>
6250 minKeyCode, maxKeyCode: KEYCODE
6254 <entry role='protoreply'>
6255 loaded, newKeyboard: BOOL
6259 <entry role='protoreply'>
6260 found, reported: KB_GBNDETAILMASK
6264 <entry role='protoreply'>
6265 map: optional <emphasis>
6266 XkbGetMap</emphasis>
6271 <entry role='protoreply'>
6272 compat: optional <emphasis>
6273 XkbGetCompatMap</emphasis>
6278 <entry role='protoreply'>
6279 indicators: optional <emphasis>
6280 XkbGetIndicatorMap</emphasis>
6285 <entry role='protoreply'>
6286 names: optional <emphasis>
6287 XkbGetNames</emphasis>
6292 <entry role='protoreply'>
6293 geometry: optional <emphasis>
6294 XkbGetGeometry</emphasis>
6299 <entry role='protoerror'>Errors: <emphasis>
6313 Assembles and returns a keymap from the current mapping and specified elements
6314 from the server database of keymap components for the keyboard specified by
6316 deviceSpec</emphasis>
6317 , and optionally replaces the current keyboard mapping with the newly generated
6318 description. If <emphasis>
6319 deviceSpec</emphasis>
6320 does not specify a valid keyboard device, a <emphasis>
6328 keymapsSpec</emphasis>
6330 keycodesSpec</emphasis>
6332 typesSpec</emphasis>
6334 compatMapSpec</emphasis>
6336 symbolsSpec</emphasis>
6338 geometrySpec</emphasis>
6339 component expressions (see <link linkend='Partial_Components_and_Combining_Multiple_Components'>
6340 Partial Components and Combining Multiple Components</link>) specify the
6341 database components to be used to assemble the keyboard description.
6348 field lists the pieces of the keyboard description that the client wants to
6349 have reported for the newly constructed keymap. The <emphasis>
6351 field lists all of the pieces that must be reported. If any of the pieces in
6354 cannot be loaded from the specified names, no description of the keyboard is
6364 fields can include any combinations of these <emphasis>
6365 XkbGetMapByName</emphasis>
6369 <informaltable frame='topbot'>
6370 <?dbfo keep-together="always" ?>
6371 <tgroup cols='3' align='left' colsep='0' rowsep='0'>
6372 <colspec colname='c1' colwidth='1.0*'/>
6373 <colspec colname='c2' colwidth='1.0*'/>
6374 <colspec colname='c3' colwidth='1.0*'/>
6377 <entry>XkbGetMapByName Keyboard Component…</entry>
6378 <entry>Database Component…</entry>
6379 <entry>Components of Keyboard Description</entry>
6385 XkbGBN_Types</emphasis>
6387 <entry>types</entry>
6388 <entry>key types</entry>
6392 XkbGBN_CompatMap</emphasis>
6394 <entry>compat</entry>
6395 <entry>symbol interpretations, group compatibility map</entry>
6399 XkbGBN_ClientSymbols</emphasis>
6401 <entry>symbols, types, keycodes</entry>
6402 <entry>key types, key symbol mappings, modifier mapping</entry>
6406 XkbGBN_ServerSymbols</emphasis>
6408 <entry>symbols, types, keycodes</entry>
6409 <entry>key behaviors, key actions, key explicit components, virtual
6410 modifiers, virtual modifier mapping</entry>
6414 XkbGBN_IndicatorMap</emphasis>
6416 <entry>compat</entry>
6417 <entry>indicator maps, indicator names</entry>
6421 XkbGBN_KeyNames</emphasis>
6423 <entry>keycodes</entry>
6424 <entry>key names, key aliases</entry>
6428 XkbGBN_Geometry</emphasis>
6430 <entry>geometry</entry>
6431 <entry>keyboard geometry</entry>
6435 XkbGBN_OtherNames</emphasis>
6438 <entry>key types, symbol interpretations, indicator maps, names,
6446 If either field contains a GBN component that depends on some database
6447 component for which the request does not supply an expression, XKB
6448 automatically substitutes the special pattern "%" which copies the
6449 corresponding component from the current keyboard description, as described in
6450 <link linkend='Partial_Components_and_Combining_Multiple_Components'>Partial Components and Combining
6451 Multiple Components</link>.
6458 flag asks the server to replace the current keyboard description for <emphasis>
6459 deviceSpec</emphasis>
6460 with the newly constructed keyboard description. If <emphasis>
6464 , the request must include component expressions for all of the database
6465 components; if any are missing, XKB substitutes "%" as described above.
6470 If all necessary components are both specified and found, the new keyboard
6471 description is loaded. If the new keyboard description has a different geometry
6472 or keycode range than the previous keyboard description, XKB sends <emphasis>
6473 XkbNewKeyboardNotify</emphasis>
6474 events to all interested clients. See
6475 <link linkend='Replacing_the_Keyboard_On_the_Fly'>Replacing the Keyboard
6476 "On-the-Fly"</link> for more information about the effects of replacing the
6477 keyboard description on the fly.
6482 If the range of keycodes changes, clients that have requested <emphasis>
6483 XkbNewKeyboardNotify</emphasis>
6484 events are not sent any other change notification events by this request.
6485 Clients that do not request <emphasis>
6486 XkbNewKeyboardNotify</emphasis>
6487 events are sent other XKB change notification events (e.g. <emphasis>
6488 XkbMapNotify</emphasis>
6490 XkbNamesNotify</emphasis>
6491 ) as necessary to alert them to as many of the keyboard changes as possible.
6496 If no error occurs, the request reply reports the GBN components that were
6497 found and sends a description of any of the resulting keyboard that includes
6498 and of the components that were requested.
6505 return value reports the X Input extension device identifier of the keyboard
6506 that was used, or <emphasis>
6508 if the server does not support the X input extension.
6514 minKeyCode</emphasis>
6516 maxKeyCode</emphasis>
6517 return values report the legal range of keycodes for the keyboard description
6518 that was created. If the resulting keyboard description does not include at
6519 least one of the key names, client symbols or server symbols components,
6521 minKeyCode</emphasis>
6523 maxKeyCode</emphasis>
6533 return value reports whether or not the existing keyboard definition was
6534 replaced with the newly created one. If <emphasis>
6539 newKeyboard</emphasis>
6540 return value reports whether or not the new map changed the geometry or range
6541 of keycodes and caused <emphasis>
6542 XkbNewKeyboardNotify</emphasis>
6543 events for clients that have requested them.
6550 return value reports the GBN components that were present in the keymap that
6551 was constructed by this request. The <emphasis>
6553 return value lists the subset of those components for which descriptions
6554 follow. if any of the components specified in the <emphasis>
6556 field of the request were not found, <emphasis>
6558 is empty, otherwise it contains the intersection of the <emphasis>
6560 return value with the union of the <emphasis>
6569 If any of <emphasis>
6570 GBN_Types</emphasis>
6572 GBN_ClientSymbols</emphasis>
6574 GBN_ServerSymbols</emphasis>
6575 are set in <emphasis>
6579 return value has the same format as the reply to an <emphasis>
6580 XkbGetMap</emphasis>
6581 request and reports the corresponding pieces of the newly constructed keyboard
6588 GBN_CompatMap</emphasis>
6589 is set in <emphasis>
6593 return value has the same format as the reply to an <emphasis>
6594 XkbGetCompatMap</emphasis>
6595 request and reports the symbol interpretations and group compatibility map for
6596 the newly constructed keyboard description.
6602 GBN_IndicatorMap</emphasis>
6603 is set in <emphasis>
6606 indicators</emphasis>
6607 return value has the same format as the reply to an <emphasis>
6608 XkbGetIndicatorMap</emphasis>
6609 request and reports the physical indicators and indicator maps for the newly
6610 constructed keyboard description.
6616 GBN_KeyNames</emphasis>
6618 GBN_OtherNames</emphasis>
6619 are set in <emphasis>
6623 return value has the same format as the reply to an <emphasis>
6624 XkbGetNames</emphasis>
6625 reply and reports the corresponding set of symbolic names for the newly
6626 constructed keyboard description.
6632 GBN_Geometry</emphasis>
6633 is set in <emphasis>
6637 return value has the same format as the reply to an <emphasis>
6638 XkbGetGeometryMap</emphasis>
6639 request and reports the keyboard geometry for the newly constructed keyboard
6645 <sect2 id='Querying_and_Changing_Input_Extension_Devices'>
6646 <title>Querying and Changing Input Extension Devices</title>
6649 <informaltable frame='none' tabstyle='proto'>
6650 <?dbfo keep-together="always" ?>
6651 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
6652 <colspec colname='c1' colwidth='1.0*'/>
6655 <entry role='protoname'>XkbGetDeviceInfo</entry>
6660 <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
6663 <entry role='protoname'>
6664 wanted: KB_XIDEVFEATUREMASK</entry>
6667 <entry role='protoname'>
6668 ledClass: KB_LEDCLASSSPEC</entry>
6671 <entry role='protoname'>
6672 ledID: KB_IDSPEC</entry>
6675 <entry role='protoname'>
6676 allButtons: BOOL</entry>
6679 <entry role='protoname'>
6680 firstButton, nButtons: CARD8
6684 <entry role='protoreply'>
6689 <entry role='protoreply'>
6690 present: KB_XIDEVFEATUREMASK
6694 <entry role='protoreply'>
6695 supported: KB_XIFEATUREMASK
6699 <entry role='protoreply'>
6700 unsupported: KB_XIFEATUREMASK
6704 <entry role='protoreply'>
6705 firstBtnWanted: CARD8
6709 <entry role='protoreply'>
6714 <entry role='protoreply'>
6719 <entry role='protoreply'>
6724 <entry role='protoreply'>
6729 <entry role='protoreply'>
6734 <entry role='protoreply'>
6735 dfltKbdFB, dfltLedFB: KB_IDSPEC
6739 <entry role='protoreply'>
6744 <entry role='protoreply'>
6749 <entry role='protoreply'>
6750 btnActions: LISTofKB_ACTION
6754 <entry role='protoreply'>
6755 leds: LISTofKB_DEVICELEDINFO</entry>
6759 <entry role='protoerror'>Errors: <emphasis>
6775 Reports a subset of the XKB-supplied information about the input device
6776 specified by <emphasis>
6777 deviceSpec</emphasis>
6778 . Unlike most XKB requests, the device specified for <emphasis>
6779 XkbGetDeviceInfo</emphasis>
6780 need not be a keyboard device. Nonetheless, a <emphasis>
6782 error results if <emphasis>
6783 deviceSpec</emphasis>
6784 does not specify a valid core or input extension device.
6791 field specifies the types of information to be returned, and controls the
6792 interpretation of the other request fields.
6797 If the server does not support assignment of XKB actions to extension device
6798 buttons, the <emphasis>
6799 allButtons</emphasis>
6801 firstButton</emphasis>
6809 Otherwise, if the <emphasis>
6810 XkbXI_ButtonActions</emphasis>
6811 flag is set in <emphasis>
6814 allButtons</emphasis>
6816 firstButton</emphasis>
6819 fields specify the device buttons for which actions should be returned.
6821 allButtons</emphasis>
6824 requests actions for all device buttons; if <emphasis>
6825 allButtons</emphasis>
6829 firstButton</emphasis>
6832 specify a range of buttons for which actions are requested. If the device has
6833 no buttons or if <emphasis>
6834 firstButton</emphasis>
6837 specify illegal buttons, a <emphasis>
6839 error results. If <emphasis>
6840 allButtons</emphasis>
6844 firstButton</emphasis>
6852 If the server does not support XKB access to any aspect of the indicators on
6853 extension devices, or if the <emphasis>
6855 field does not include any of the indicator flags, the <emphasis>
6859 fields are ignored. Otherwise, <emphasis>
6863 specify one or more feedback(s) for which indicator information is requested.
6868 have illegal values, a <emphasis>
6870 error results. If they have legal values but do not specify a keyboard or
6871 indicator class feedback for the device in question, a <emphasis>
6880 field can specify either <emphasis>
6881 KbdFeedbackClass</emphasis>
6883 LedFeedbackClass</emphasis>
6885 XkbDfltXIClass</emphasis>
6887 XkbAllXIClasses</emphasis>
6888 . If at least one keyboard feedback is defined for the specified device,
6890 XkbDfltXIClass</emphasis>
6891 is equivalent to <emphasis>
6892 KbdFeedbackClass</emphasis>
6893 , otherwise it is equivalent to <emphasis>
6894 LedFeedbackClass</emphasis>
6896 XkbAllXIClasses</emphasis>
6897 is specified, this request returns information about both indicator and
6898 keyboard class feedbacks which match the requested identifier, as described
6906 field can specify any valid input extension feedback identifier, <emphasis>
6907 XkbDfltXIId</emphasis>
6909 XkbAllXIIds</emphasis>
6910 . The default keyboard feedback is the one that is affected by core protocol
6911 requests; the default led feedback is implementation-specific. If <emphasis>
6912 XkbAllXIIds</emphasis>
6913 is specified, this request returns indicator information about all feedbacks
6914 of the class(es) specified by <emphasis>
6921 If no error results, the <emphasis>
6923 return value reports the input extension device identifier of the device for
6924 which values are being returned. The <emphasis>
6925 supported</emphasis>
6926 return value reports the set of optional XKB extension device features that
6927 are supported by this implementation (see
6928 <link linkend='Interactions_Between_XKB_and_the_X_Input_Extension'>
6929 Interactions Between XKB and the X Input
6930 Extension</link>) for the specified device, and the unsupported return value
6931 reports any <emphasis>
6932 unsupported</emphasis>
6939 hasOwnState</emphasis>
6942 , the device is also a keyboard, and any indicator maps bound to the device use
6943 the current state and control settings for this device to control automatic
6944 changes. If <emphasis>
6945 hasOwnState</emphasis>
6948 , the state and control settings of the core keyboard device control automatic
6956 field reports the X Input Extension name for the device. The <emphasis>
6958 field reports the X Input Extension device type. Both fields are provided
6959 merely for convenience and are not interpreted by XKB.
6966 return value reports the kinds of device information being returned, and
6967 controls the interpretation of the remaining fields. The <emphasis>
6969 field consists of the <emphasis>
6971 field from the original request minus the flags for any unsupported features.
6977 XkbXI_ButtonActions</emphasis>
6978 is set in <emphasis>
6981 totalBtns</emphasis>
6982 return value reports the total number of buttons present on the device,
6984 firstBtnWanted</emphasis>
6986 nBtnsWanted</emphasis>
6987 specify the range of buttons for which actions were requested, and the
6989 firstBtnRtrn</emphasis>
6991 nBtnsRtrn </emphasis>
6992 values specify the range of buttons for which actions are reported. The
6994 actionsRtrn</emphasis>
6996 nButtonsRtrn</emphasis>
6997 entries which contain the actions bound to the specified buttons on the
6998 device. Any buttons for which actions were requested but not returned have the
7000 NoAction()</emphasis>
7006 If any indicator information is reported, the leds list contains one element
7007 for each requested feedback. For example, if <emphasis>
7010 XkbAllXIClasses</emphasis>
7014 XkbAllXIIds</emphasis>
7017 describes all of the indicators on the device and has one element for each
7018 keyboard or led class feedback defined for the device. If any information at
7019 all is reported about a feedback, the set of physical indicators is also
7020 reported in the <emphasis>
7021 physIndicators</emphasis>
7022 field of the corresponding element of <emphasis>
7029 If the server supports assignment of indicator maps to extension device
7030 indicators, and if the <emphasis>
7031 XkbXI_IndicatorMaps</emphasis>
7032 flag is set in <emphasis>
7034 , each member of <emphasis>
7036 reports any indicators on the corresponding feedback to which names have been
7037 assigned. Any indicators for which no map is reported have the default map,
7038 which allows explicit changes and does not request any automatic changes.
7043 If the server supports assignment of indicator names to extension device
7044 indicators, and the <emphasis>
7045 XkbXI_IndicatorNames</emphasis>
7046 flag is set in <emphasis>
7048 , each member of <emphasis>
7050 reports any indicators on the corresponding feedback to which names have been
7051 assigned. Any indicators for which no name is reported have the name <emphasis>
7058 If the server supports XKB access to the state of extension device indicators,
7060 XkbXI_IndicatorState</emphasis>
7061 flag is set in wanted, each member of leds reports the state of the indicators
7062 on the corresponding feedback.
7067 If any unsupported features are requested, and the requesting client has
7068 selected for them, the server sends the client an <emphasis>
7069 XkbExtensionDeviceNotify</emphasis>
7070 event which indicates that an unsupported feature was requested. This event is
7071 only generated if the client which issued the unsupported request has selected
7072 for it and, if generated, is not sent to any other clients.
7077 <informaltable frame='none' tabstyle='proto'>
7078 <?dbfo keep-together="always" ?>
7079 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
7080 <colspec colname='c1' colwidth='1.0*'/>
7083 <entry role='protoname'>XkbSetDeviceInfo</entry>
7088 <entry role='protoargs'>deviceSpec: KB_DEVICESPEC</entry>
7091 <entry role='protoname'>
7092 change: KB_XIDEVFEATUREMASK</entry>
7095 <entry role='protoname'>
7096 firstBtn, nBtns: CARD8</entry>
7099 <entry role='protoname'>
7100 btnActions:LISTofKB_ACTION</entry>
7103 <entry role='protoname'>
7104 leds: LISTofKB_DEVICELEDINFO</entry>
7108 <entry role='protoerror'>Errors: <emphasis>
7124 Changes a subset of the XKB-supplied information about the input device
7125 specified by <emphasis>
7126 deviceSpec</emphasis>
7127 . Unlike most XKB requests, the device specified for <emphasis>
7128 XkbGetDeviceInfo</emphasis>
7129 need not be a keyboard device. Nonetheless, a <emphasis>
7131 error results if <emphasis>
7132 deviceSpec</emphasis>
7133 does not specify a valid core or input extension device
7140 field specifies the features for which new values are supplied, and controls
7141 the interpretation of the other request fields.
7146 If the server does not support assignment of XKB actions to extension device
7147 buttons, the <emphasis>
7148 firstButton</emphasis>
7156 Otherwise, if the <emphasis>
7157 XkbXI_ButtonActions</emphasis>
7158 flag is set in <emphasis>
7164 fields specify a range of buttons for which actions are specified in this
7165 request. If the device has no buttons or if <emphasis>
7169 specify illegal buttons, a <emphasis>
7176 Each element of the <emphasis>
7178 list describes the changes for a single keyboard or led feedback. If the
7181 field of any element of <emphasis>
7183 contains any value other than <emphasis>
7184 KbdFeedbackClass</emphasis>
7186 LedFeedbackClass</emphasis>
7188 XkbDfltXIClass</emphasis>
7191 error results. If the <emphasis>
7193 field of any element of leds contains any value other than a valid input
7194 extension feedback identifier or <emphasis>
7195 XkbDfltXIId</emphasis>
7198 error results. If both fields are valid, but the device has no matching
7199 feedback, a <emphasis>
7206 The fields of each element of <emphasis>
7208 are interpreted as follows:
7214 XkbXI_IndicatorMaps</emphasis>
7215 is set in <emphasis>
7217 and the server supports XKB assignment of indicator maps to the corresponding
7218 feedback, the maps for all indicators on the corresponding feedback are taken
7221 . If the server does not support this feature, any maps specified in <emphasis>
7228 XkbXI_IndicatorNames</emphasis>
7229 is set in <emphasis>
7231 , and the server supports XKB assignment of names to indicators for the
7232 corresponding feedback, the names for all indicators on the corresponding
7233 feedback are taken from <emphasis>
7235 . If the server does not support this feature, any names specified in <emphasis>
7237 are ignored. Regardless of whether they are used, any names be a valid Atom or
7247 XkbXI_IndicatorState</emphasis>
7248 is set in change, and the server supports XKB changes to extension device
7249 indicator state, the server attempts to change the indicators on the
7250 corresponding feedback as specified by <emphasis>
7252 . Any indicator maps bound to the feedback are applied, so state changes might
7253 be blocked or have side-effects.
7259 If any unsupported features are requested, and the requesting client has
7260 selected for them, the server sends the client an <emphasis>
7261 XkbExtensionDeviceNotify</emphasis>
7262 event which indicates that an unsupported feature was requested. This event is
7263 only generated if the client which issued the unsupported request has selected
7264 for it and, if generated, is not sent to any other clients.
7269 <sect2 id='Debugging_the_X_Keyboard_Extension'>
7270 <title>Debugging the X Keyboard Extension</title>
7273 <informaltable frame='none' tabstyle='proto'>
7274 <?dbfo keep-together="always" ?>
7275 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
7276 <colspec colname='c1' colwidth='1.0*'/>
7279 <entry role='protoname'>XkbSetDebuggingFlags</entry>
7284 <entry role='protoargs'>affectFlags, flags: CARD32</entry>
7287 <entry role='protoname'>
7288 affectCtrls, ctrls: CARD32</entry>
7291 <entry role='protoname'>
7296 <entry role='protoreply'>
7297 currentFlags, supportedFlags: CARD32
7301 <entry role='protoreply'>
7302 currentCtrls, supportedCtrls: CARD32</entry>
7310 This request sets up various internal XKB debugging flags and controls. It is
7311 intended for developer use and may be disabled in production servers. If
7312 disabled, <emphasis>
7313 XkbSetDebuggingFlags</emphasis>
7314 has no effect but returns <emphasis>
7322 affectFlags</emphasis>
7323 field specifies the debugging flags to be changed, the <emphasis>
7325 field specifies new values for the changed flags. The interpretation of the
7326 debugging flags is implementation-specific, but flags are intended to control
7327 debugging output and should not otherwise affect the operation of the server.
7333 affectCtrls</emphasis>
7334 field specifies the debugging controls to be changed, the <emphasis>
7336 field specifies new values for the changed controls. The interpretation of the
7337 debugging controls is implementation-specific, but debugging controls are
7338 allowed to affect the behavior of the server.
7345 field provides a message that the X server can print in any logging or
7346 debugging files before changing the flags. The server must accept this field
7347 but it is not required to actually display it anywhere.
7352 The X Test Suite makes some assumptions about the implementation of locking
7353 modifier keys that do not apply when XKB is present. The <emphasis>
7354 XkbDF_DisableLocks</emphasis>
7355 debugging control provides a simple workaround to these test suite problems by
7356 simply disabling all locking keys. If <emphasis>
7357 XkbDF_DisableLocks</emphasis>
7358 is enabled, the <emphasis>
7359 SA_LockMods</emphasis>
7361 SA_LockGroup</emphasis>
7362 actions behave like <emphasis>
7363 SA_SetMods</emphasis>
7365 SA_LockMods</emphasis>
7366 , respectively. If it is disabled, <emphasis>
7367 SA_LockMods</emphasis>
7369 SA_LockGroup</emphasis>
7370 actions behave normally.
7375 Implementations are free to ignore the <emphasis>
7376 XkbDF_DisableLocks</emphasis>
7377 debugging control or to define others.
7383 currentFlags</emphasis>
7384 return value reports the current setting for the debugging flags, if
7385 applicable. The <emphasis>
7386 currentCtrls</emphasis>
7387 return value reports the setting for the debugging controls, if applicable.
7389 supportedFlags</emphasis>
7391 supportedCtrls</emphasis>
7392 fields report the flags and controls that are recognized by the
7393 implementation. Attempts to change unsupported fields or controls are silently
7400 XkbSetDebuggingFlags</emphasis>
7401 request contains more data than expected, the server ignores the extra data,
7402 but no error results. If the request has less data than expected, a <emphasis>
7410 XkbSetDebuggingFlags</emphasis>
7411 reply contains more data than expected, the client just ignores any
7412 uninterpreted data without reporting an error. If the reply has less data than
7413 expected, a <emphasis>
7422 <title>Events</title>
7425 All XKB events report the time at which they occurred in a field named
7428 and the device on which they occurred in a field named <emphasis>
7430 . XKB uses a single X event code for all events and uses a common field to
7431 distinguish XKB event type.
7435 <sect2 id='Tracking_Keyboard_Replacement'>
7436 <title>Tracking Keyboard Replacement</title>
7439 <informaltable frame='none' tabstyle='proto'>
7440 <?dbfo keep-together="always" ?>
7441 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
7442 <colspec colname='c1' colwidth='1.0*'/>
7445 <entry role='protoname'>XkbNewKeyboardNotify</entry>
7450 <entry role='protoargs'>time: TIMESTAMP</entry>
7453 <entry role='protoname'>
7454 deviceID: CARD8</entry>
7457 <entry role='protoname'>
7458 changed: KB_NKNDETAILMASK</entry>
7461 <entry role='protoname'>
7462 minKeyCode, maxKeyCode: KEYCODE</entry>
7465 <entry role='protoname'>
7466 oldDeviceID: CARD8</entry>
7469 <entry role='protoname'>
7470 oldMinKeyCode, oldMaxKeyCode: KEYCODE</entry>
7473 <entry role='protoname'>
7474 requestMajor, requestMinor: CARD8</entry>
7483 XkbNewKeyboardNotify</emphasis>
7484 event reports that a new core keyboard has been installed. New keyboard notify
7485 events can be generated:
7490 <para>When the X server detects that the keyboard was changed.
7494 <para>When a client installs a new extension device as the core keyboard
7495 using the X Input Extension <emphasis>
7496 ChangeKeyboardDevice</emphasis>
7501 <para>When a client issues an <emphasis>
7502 XkbGetMapByName</emphasis>
7503 request which changes the keycodes range or geometry.
7511 field of the event reports the aspects of the keyboard that have changed, and
7512 can contain any combination of the event details for this event:
7515 <informaltable frame='topbot'>
7516 <?dbfo keep-together="always" ?>
7517 <tgroup cols='2' align='left' colsep='0' rowsep='0'>
7518 <colspec colname='c1' colwidth='1.0*'/>
7519 <colspec colname='c2' colwidth='2.0*'/>
7522 <entry>Bit in Changed</entry>
7523 <entry>Meaning</entry>
7528 <entry>NKN_Keycodes</entry>
7529 <entry>The new keyboard has a different minimum or maximum keycode.</entry>
7532 <entry>NKN_Geometry</entry>
7533 <entry>The new keyboard has a different keyboard geometry.</entry>
7536 <entry>NKN_DeviceID</entry>
7537 <entry>The new keyboard has a new X Input Extension device
7545 The server sends an <emphasis>
7546 XkbNewKeyboardNotify</emphasis>
7547 event to a client only if at least one of the bits that is set in the
7550 field of the event is also set in the appropriate event details mask for the
7557 minKeyCode</emphasis>
7559 maxKeyCode</emphasis>
7560 fields report the minimum and maximum keycodes that can be returned by the new
7561 keyboard. The <emphasis>
7562 oldMinKeyCode</emphasis>
7564 oldMaxKeyCode</emphasis>
7565 fields report the minimum and maximum values that could be returned before the
7566 change. This event always reports all four values, but the old and new values
7567 are the same unless <emphasis>
7568 NKN_Keycodes</emphasis>
7569 is set in <emphasis>
7576 Once a client receives a new keyboard notify event which reports a new keycode
7577 range, the X server reports events from all keys in the new range to that
7578 client. Clients that do not request or receive new keyboard notify events
7579 receive events only from keys that fall in the last range for legal keys
7580 reported to that client. See <link linkend='Replacing_the_Keyboard_On_the_Fly'>
7581 Replacing the Keyboard "On-the-Fly"</link> for a more detailed explanation.
7587 NKN_Keycodes</emphasis>
7588 is set in <emphasis>
7591 XkbNewKeyboardNotify</emphasis>
7592 event subsumes all other change notification events (e.g. <emphasis>
7593 XkbMapNotify</emphasis>
7595 XkbNamesNotify</emphasis>
7596 ) that would otherwise result from the keyboard change. Clients who receive an
7598 XkbNewKeyboardNotify</emphasis>
7599 event should assume that all other aspects of the keyboard mapping have
7600 changed and regenerate the entire local copy of the keyboard description.
7607 field reports the X Input Extension device identifier of the new keyboard
7609 oldDeviceID</emphasis>
7610 reports the device identifier before the change. This event always includes
7611 both values, but they are the same unless <emphasis>
7612 NKN_DeviceID</emphasis>
7613 is set in <emphasis>
7615 . If the server does not support the X Input Extension, both fields have the
7624 requestMajor</emphasis>
7626 requestMinor</emphasis>
7627 fields report the major and minor opcode of the request that caused the
7628 keyboard change. If the keyboard change was not caused by some client request,
7629 both fields have the value <emphasis>
7636 <sect2 id='Tracking_Keyboard_Mapping_Changes'>
7637 <title>Tracking Keyboard Mapping Changes</title>
7640 <informaltable frame='none' tabstyle='proto'>
7641 <?dbfo keep-together="always" ?>
7642 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
7643 <colspec colname='c1' colwidth='1.0*'/>
7646 <entry role='protoname'>XkbMapNotify</entry>
7651 <entry role='protoargs'>time: TIMESTAMP</entry>
7654 <entry role='protoname'>
7655 deviceID: CARD8</entry>
7658 <entry role='protoname'>
7659 ptrBtnActions: CARD8</entry>
7662 <entry role='protoname'>
7663 changed: KB_MAPPARTMASK</entry>
7666 <entry role='protoname'>
7667 minKeyCode, maxKeyCode: KEYCODE</entry>
7670 <entry role='protoname'>
7671 firstType, nTypes: CARD8</entry>
7674 <entry role='protoname'>
7675 firstKeySym, firstKeyAction: KEYCODE</entry>
7678 <entry role='protoname'>
7679 nKeySyms, nKeyActions: CARD8</entry>
7682 <entry role='protoname'>
7683 firstKeyBehavior, firstKeyExplicit: KEYCODE</entry>
7686 <entry role='protoname'>
7687 nKeyBehaviors, nKeyExplicit: CARD8</entry>
7690 <entry role='protoname'>
7691 virtualMods: KB_VMODMASK</entry>
7694 <entry role='protoname'>
7695 firstModMapKey, firstVModMapKey: KEYCODE</entry>
7698 <entry role='protoname'>
7699 nModMapKeys, nVModMapKeys: CARD8</entry>
7708 XkbMapNotify</emphasis>
7709 event reports that some aspect of XKB map for a keyboard has changed. Map
7710 notify events can be generated whenever some aspect of the keyboard map is
7711 changed by an XKB or core protocol request.
7718 field reports the keyboard for which some map component has changed and the
7721 field reports the components with new values, and can contain any of the
7722 values that are legal for the <emphasis>
7726 fields of the <emphasis>
7727 XkbGetMap</emphasis>
7728 request. The server sends an <emphasis>
7729 XkbMapNotify</emphasis>
7730 event to a client only if at least one of the bits that is set in the
7733 field of the event is also set in the appropriate event details mask for the
7740 minKeyCode</emphasis>
7742 maxKeyCode</emphasis>
7743 fields report the range of keycodes that are legal on the keyboard for which
7744 the change is being reported.
7750 XkbKeyTypesMask</emphasis>
7751 is set in <emphasis>
7754 firstType</emphasis>
7757 fields report a range of key types that includes all changed types. Otherwise,
7758 both fields are <emphasis>
7766 XkbKeySymsMask</emphasis>
7767 is set in <emphasis>
7770 firstKeySym</emphasis>
7773 fields report a range of keycodes that includes all keys with new symbols.
7774 Otherwise, both fields are <emphasis>
7782 XkbKeyActionsMask</emphasis>
7783 is set in <emphasis>
7786 firstKeyAction</emphasis>
7788 nKeyActions</emphasis>
7789 fields report a range of keycodes that includes all keys with new actions.
7790 Otherwise, both fields are <emphasis>
7798 XkbKeyBehaviorsMask</emphasis>
7799 is set in <emphasis>
7802 firstKeyBehavior </emphasis>
7804 nKeyBehaviors</emphasis>
7805 fields report a range of keycodes that includes all keys with new key
7806 behavior. Otherwise, both fields are <emphasis>
7814 XkbVirtualModsMask</emphasis>
7815 is set in <emphasis>
7818 virtualMods</emphasis>
7819 contains all virtual modifiers to which a new set of real modifiers is bound.
7820 Otherwise, <emphasis>
7821 virtualMods</emphasis>
7830 XkbExplicitComponentsMask</emphasis>
7831 is set in <emphasis>
7834 firstKeyExplicit</emphasis>
7836 nKeyExplicit</emphasis>
7837 fields report a range of keycodes that includes all keys with changed explicit
7838 components. Otherwise, both fields are <emphasis>
7846 XkbModifierMapMask</emphasis>
7847 is set in <emphasis>
7850 firstModMapKey</emphasis>
7852 nModMapKeys</emphasis>
7853 fields report a range of keycodes that includes all keys with changed modifier
7854 bindings. Otherwise, both fields are <emphasis>
7862 XkbVirtualModMapMask</emphasis>
7863 is set in <emphasis>
7866 firstVModMapKey</emphasis>
7868 nVModMapKeys</emphasis>
7869 fields report a range of keycodes that includes all keys with changed virtual
7870 modifier mappings. Otherwise, both fields are <emphasis>
7877 <sect2 id='Tracking_Keyboard_State_Changes'>
7878 <title>Tracking Keyboard State Changes</title>
7881 <informaltable frame='none' tabstyle='proto'>
7882 <?dbfo keep-together="always" ?>
7883 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
7884 <colspec colname='c1' colwidth='1.0*'/>
7887 <entry role='protoname'>XkbStateNotify</entry>
7892 <entry role='protoargs'>time: TIMESTAMP</entry>
7895 <entry role='protoname'>
7896 deviceID: CARD8</entry>
7899 <entry role='protoname'>
7900 mods, baseMods, latchedMods, lockedMods: KEYMASK</entry>
7903 <entry role='protoname'>
7904 group, lockedGroup: CARD8</entry>
7907 <entry role='protoname'>
7908 baseGroup, latchedGroup: INT16</entry>
7911 <entry role='protoname'>
7912 compatState: KEYMASK</entry>
7915 <entry role='protoname'>
7916 grabMods, compatGrabMods: KEYMASK</entry>
7919 <entry role='protoname'>
7920 lookupMods, compatLookupMods: KEYMASK</entry>
7923 <entry role='protoname'>
7924 ptrBtnState: BUTMASK</entry>
7927 <entry role='protoname'>
7928 changed: KB_STATEPARTMASK</entry>
7931 <entry role='protoname'>
7932 keycode: KEYCODE</entry>
7935 <entry role='protoname'>
7936 eventType: CARD8</entry>
7939 <entry role='protoname'>
7940 requestMajor, requestMinor: CARD8</entry>
7948 An <emphasis>XkbStateNotify</emphasis>
7949 event reports that some component of the XKB state (see
7950 <link linkend='Keyboard_State'>Keyboard State</link>) has changed.
7951 State notify events are usually caused by key or pointer activity, but they can
7952 also result from explicit state changes requested by the <emphasis>
7953 XkbLatchLockState</emphasis>
7954 request or by other extensions.
7961 field reports the keyboard on which some state component changed. The
7964 field reports the XKB state components (see
7965 <link linkend='Keyboard_State'>Keyboard State</link>) that have changed
7966 and contain any combination of:
7969 <informaltable frame='none'>
7970 <?dbfo keep-together="always" ?>
7971 <tgroup cols='3' align='left' colsep='0' rowsep='0'>
7972 <colspec colname='c1' colwidth='1.0*'/>
7973 <colspec colname='c2' colwidth='1.0*'/>
7974 <colspec colname='c3' colwidth='2.0*'/>
7977 <entry>Bit in changed</entry>
7978 <entry>Event field</entry>
7979 <entry>Changed component</entry>
7985 ModifierState</emphasis>
7990 <entry>The effective modifiers</entry>
7994 ModifierBase</emphasis>
7999 <entry>The base modifiers</entry>
8003 ModifierLatch</emphasis>
8006 latchedMods</emphasis>
8008 <entry>The latched modifiers</entry>
8012 ModifierLock</emphasis>
8015 lockedMods</emphasis>
8017 <entry>The locked modifiers</entry>
8021 GroupState</emphasis>
8026 <entry>The effective keyboard group</entry>
8030 GroupBase</emphasis>
8033 baseGroup</emphasis>
8035 <entry>The base keyboard group</entry>
8039 GroupLatch</emphasis>
8042 latchedGroup</emphasis>
8044 <entry>The latched keyboard group</entry>
8048 GroupLock</emphasis>
8051 lockedGroup</emphasis>
8053 <entry>The locked keyboard group</entry>
8057 PointerButtons</emphasis>
8060 ptrBtnState</emphasis>
8062 <entry>The state of the core pointer buttons</entry>
8071 <entry>The XKB state used to compute grabs</entry>
8075 LookupMods</emphasis>
8078 lookupMods</emphasis>
8080 <entry>The XKB state used to look up symbols</entry>
8084 CompatState</emphasis>
8087 compatState</emphasis>
8089 <entry>Default state for non-XKB clients</entry>
8093 CompatGrabMods</emphasis>
8096 compatGrabMods</emphasis>
8098 <entry>The core state used to compute grabs</entry>
8102 CompatLookupMods</emphasis>
8105 compatLookupMods</emphasis>
8107 <entry>The core state used to look up symbols</entry>
8114 The server sends an <emphasis>
8115 XkbStateNotify</emphasis>
8116 event to a client only if at least one of the bits that is set in the
8119 field of the event is also set in the appropriate event details mask for the
8125 A state notify event reports current values for all state components, even
8126 those with unchanged values.
8133 field reports the key or button which caused the change in state while the
8135 eventType</emphasis>
8136 field reports the exact type of event (e.g. <emphasis>
8138 ). If the change in state was not caused by key or button activity, both fields
8139 have the value <emphasis>
8147 requestMajor</emphasis>
8149 requestMinor</emphasis>
8150 fields report the major and minor opcodes of the request that caused the
8151 change in state and have the value <emphasis>
8153 if it was resulted from key or button activity.
8158 <sect2 id='Tracking_Keyboard_Control_Changes'>
8159 <title>Tracking Keyboard Control Changes</title>
8162 <informaltable frame='none' tabstyle='proto'>
8163 <?dbfo keep-together="always" ?>
8164 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
8165 <colspec colname='c1' colwidth='1.0*'/>
8168 <entry role='protoname'>XkbControlsNotify</entry>
8173 <entry role='protoargs'>time: TIMESTAMP</entry>
8176 <entry role='protoname'>
8177 deviceID: CARD8</entry>
8180 <entry role='protoname'>
8181 numGroups: CARD8</entry>
8184 <entry role='protoname'>
8185 changedControls: KB_CONTROLMASK</entry>
8188 <entry role='protoname'>
8189 enabledControls,enabledControlChanges: KB_BOOLCTRLMASK</entry>
8192 <entry role='protoname'>
8193 keycode: KEYCODE</entry>
8196 <entry role='protoname'>
8197 eventType: CARD8</entry>
8200 <entry role='protoname'>
8201 requestMajor: CARD8</entry>
8204 <entry role='protoname'>
8205 requestMinor: CARD8</entry>
8214 XkbControlsNotify</emphasis>
8215 event reports a change in one or more of the global keyboard controls (see
8216 <link linkend='Global_Keyboard_Controls'>Global Keyboard Controls</link>)
8217 or in the internal modifiers or ignore locks masks (see
8218 <link linkend='Server_Internal_Modifiers_and_Ignore_Locks_Behavior'>
8219 Server Internal Modifiers and Ignore
8220 Locks Behavior</link>). Controls notify events are usually caused by and
8222 XkbSetControls</emphasis>
8223 request, but they can also be caused by keyboard activity or certain core
8224 protocol and input extension requests.
8231 field reports the keyboard for which some control has changed, and the
8234 field reports the controls that have new values.
8241 field can contain any of the values that are permitted for the <emphasis>
8242 changeControls</emphasis>
8243 field of the <emphasis>
8244 XkbSetControls</emphasis>
8245 request. The server sends an <emphasis>
8246 XkbControlsNotify</emphasis>
8247 event to a client only if at least one of the bits that is set in the
8250 field of the event is also set in the appropriate event details mask for the
8257 numGroups</emphasis>
8258 field reports the total number of groups defined for the keyboard, whether or
8259 not the number of groups has changed.
8265 enabledControls</emphasis>
8266 field reports the current status of all of the boolean controls, whether or
8267 not any boolean controls changed state. If <emphasis>
8268 EnabledControls</emphasis>
8269 is set in <emphasis>
8272 enabledControlChanges</emphasis>
8273 field reports the boolean controls that were enabled or disabled; if a control
8274 is specified in <emphasis>
8275 enabledControlChanges</emphasis>
8276 , the value that is reported for that control in <emphasis>
8277 enabledControls</emphasis>
8278 represents a change in state.
8285 field reports the key or button which caused the change in state while the
8287 eventType</emphasis>
8288 field reports the exact type of event (e.g. <emphasis>
8290 ). If the change in state was not caused by key or button activity, both fields
8291 have the value <emphasis>
8299 requestMajor</emphasis>
8301 requestMinor</emphasis>
8302 fields report the major and minor opcodes of the request that caused the
8303 change in state and have the value <emphasis>
8305 if it was resulted from key or button activity.
8310 <sect2 id='Tracking_Keyboard_Indicator_State_Changes'>
8311 <title>Tracking Keyboard Indicator State Changes</title>
8314 <informaltable frame='none' tabstyle='proto'>
8315 <?dbfo keep-together="always" ?>
8316 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
8317 <colspec colname='c1' colwidth='1.0*'/>
8320 <entry role='protoname'>XkbIndicatorStateNotify</entry>
8325 <entry role='protoargs'>time: TIMESTAMP</entry>
8328 <entry role='protoname'>
8329 deviceID: CARD8</entry>
8332 <entry role='protoname'>
8333 stateChanged, state: KB_INDICATORMASK</entry>
8342 XkbIndicatorStateNotify</emphasis>
8343 event indicates that one or more of the indicators on a keyboard have changed
8344 state. Indicator state notify events can be caused by:
8349 <para>Automatic update to reflect changes in keyboard state (keyboard
8350 activity, <emphasis>
8351 XkbLatchLockState</emphasis>
8356 <para>Automatic update to reflect changes in keyboard controls (<emphasis>
8357 XkbSetControls</emphasis>
8358 , keyboard activity, certain core protocol and input extension requests).
8362 <para>Explicit attempts to change indicator state (core protocol and input
8363 extension requests, <emphasis>
8364 XkbSetNamedIndicator</emphasis>
8369 <para>Changes to indicator maps (<emphasis>
8370 XkbSetIndicatorMap</emphasis>
8372 XkbSetNamedIndicator</emphasis>
8381 field reports the keyboard for which some indicator has changed, and the
8384 field reports the new state for all indicators on the specified keyboard. The
8386 stateChanged</emphasis>
8387 field specifies which of the values in <emphasis>
8389 represent a new state for the corresponding indicator. The server sends an
8391 XkbIndicatorStateNotify</emphasis>
8392 event to a client only if at least one of the bits that is set in the
8394 stateChanged</emphasis>
8395 field of the event is also set in the appropriate event details mask for the
8401 <sect2 id='Tracking_Keyboard_Indicator_Map_Changes'>
8402 <title>Tracking Keyboard Indicator Map Changes</title>
8405 <informaltable frame='none' tabstyle='proto'>
8406 <?dbfo keep-together="always" ?>
8407 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
8408 <colspec colname='c1' colwidth='1.0*'/>
8411 <entry role='protoname'>XkbIndicatorMapNotify</entry>
8416 <entry role='protoargs'>time: TIMESTAMP</entry>
8419 <entry role='protoname'>
8420 deviceID: CARD8</entry>
8423 <entry role='protoname'>
8424 state: KB_INDICATORMASK</entry>
8427 <entry role='protoname'>
8428 mapChanged: KB_INDICATORMASK</entry>
8437 XkbIndicatorMapNotify</emphasis>
8438 event indicates that the maps for one or more keyboard indicators have been
8439 changed. Indicator map notify events can be caused by <emphasis>
8440 XkbSetIndicatorMap</emphasis>
8442 XkbSetNamedIndicator</emphasis>
8450 field reports the keyboard for which some indicator map has changed, and the
8452 mapChanged</emphasis>
8453 field reports the indicators with changed maps. The server sends an <emphasis>
8454 XkbIndicatorMapNotify</emphasis>
8455 event to a client only if at least one of the bits that is set in the
8457 mapChanged</emphasis>
8458 field of the event is also set in the appropriate event details mask for the
8466 field reports the current state of all indicators on the specified keyboard.
8471 <sect2 id='Tracking_Keyboard_Name_Changes'>
8472 <title>Tracking Keyboard Name Changes</title>
8475 <informaltable frame='none' tabstyle='proto'>
8476 <?dbfo keep-together="always" ?>
8477 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
8478 <colspec colname='c1' colwidth='1.0*'/>
8481 <entry role='protoname'>XkbNamesNotify</entry>
8486 <entry role='protoargs'>time: TIMESTAMP</entry>
8489 <entry role='protoname'>
8490 deviceID: CARD8</entry>
8493 <entry role='protoname'>
8494 changed: KB_NAMEDETAILMASK</entry>
8497 <entry role='protoname'>
8498 firstType, nTypes: CARD8</entry>
8501 <entry role='protoname'>
8502 firstLevelName, nLevelNames: CARD8</entry>
8505 <entry role='protoname'>
8506 firstKey: KEYCODE</entry>
8509 <entry role='protoname'>
8510 nKeys, nKeyAliases, nRadioGroups: CARD8</entry>
8513 <entry role='protoname'>
8514 changedGroupNames: KB_GROUPMASK</entry>
8517 <entry role='protoname'>
8518 changedVirtualMods: KB_VMODMASK</entry>
8521 <entry role='protoname'>
8522 changedIndicators: KB_INDICATORMASK</entry>
8531 XkbNamesNotify</emphasis>
8532 event reports a change to one or more of the symbolic names associated with a
8533 keyboard. Symbolic names can change when:
8538 <para> Some client explicitly changes them using <emphasis>
8539 XkbSetNames</emphasis>
8544 <para>The list of key types or radio groups is resized
8548 <para>The group width of some key type is changed
8556 field reports the keyboard on which names were changed. The <emphasis>
8558 mask lists the components for which some names have changed and can have any
8559 combination of the values permitted for the <emphasis>
8561 field of the <emphasis>
8562 XkbGetNames</emphasis>
8563 request. The server sends an <emphasis>
8564 XkbNamesNotify</emphasis>
8565 event to a client only if at least one of the bits that is set in the
8568 field of the event is also set in the appropriate event details mask for the
8575 KeyTypeNames</emphasis>
8576 is set in <emphasis>
8579 firstType</emphasis>
8582 fields report a range of types that includes all types with changed names.
8583 Otherwise, both fields are <emphasis>
8591 KTLevelNames</emphasis>
8592 is set in <emphasis>
8595 firstLevelName</emphasis>
8597 nLevelNames</emphasis>
8598 fields report a range of types that includes all types with changed level
8599 names. Otherwise, both fields are <emphasis>
8607 IndicatorNames</emphasis>
8608 is set in <emphasis>
8611 changedIndicators</emphasis>
8612 field reports the indicators with changed names. Otherwise, <emphasis>
8613 changedIndicators</emphasis>
8622 VirtualModNames</emphasis>
8623 is set in <emphasis>
8626 changedVirtualMods</emphasis>
8627 field reports the virtual modifiers with changed names. Otherwise, <emphasis>
8628 changedVirtualMods</emphasis>
8637 GroupNames</emphasis>
8638 is set in <emphasis>
8641 changedGroupNames</emphasis>
8642 field reports the groups with changed names. Otherwise, <emphasis>
8643 changedGroupNames</emphasis>
8653 is set in <emphasis>
8659 fields report a range of keycodes that includes all keys with changed names.
8660 Otherwise, both fields are <emphasis>
8668 nKeyAliases</emphasis>
8669 field reports the total number of key aliases associated with the keyboard,
8670 regardless of whether <emphasis>
8671 KeyAliases</emphasis>
8672 is set in <emphasis>
8680 nRadioGroups</emphasis>
8681 field reports the total number of radio group names associated with the
8682 keyboard, regardless of whether <emphasis>
8684 is set in <emphasis>
8691 <sect2 id='Tracking_Compatibility_Map_Changes'>
8692 <title>Tracking Compatibility Map Changes</title>
8695 <informaltable frame='none' tabstyle='proto'>
8696 <?dbfo keep-together="always" ?>
8697 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
8698 <colspec colname='c1' colwidth='1.0*'/>
8701 <entry role='protoname'>XkbCompatMapNotify</entry>
8706 <entry role='protoargs'>time: TIMESTAMP</entry>
8709 <entry role='protoname'>
8710 deviceID: CARD8</entry>
8713 <entry role='protoname'>
8714 changedGroups: KB_GROUPMASK</entry>
8717 <entry role='protoname'>
8718 firstSI, nSI: CARD16</entry>
8721 <entry role='protoname'>
8722 nTotalSI: CARD16</entry>
8731 XkbCompatMapNotify</emphasis>
8732 event indicates that some component of the compatibility map for a keyboard
8733 has been changed. Compatibility map notify events can be caused by <emphasis>
8734 XkbSetCompatMap</emphasis>
8736 XkbGetMapByName</emphasis>
8744 field reports the keyboard for which the compatibility map has changed; if the
8745 server does not support the X input extension, <emphasis>
8755 changedGroups</emphasis>
8756 field reports the keyboard groups, if any, with a changed entry in the group
8757 compatibility map. The <emphasis>
8761 fields specify a range of symbol interpretations in the symbol compatibility
8762 map that includes all changed symbol interpretations; if the symbol
8763 compatibility map is unchanged, both fields are <emphasis>
8767 field always reports the total number of symbol interpretations present in the
8768 symbol compatibility map, regardless of whether any symbol interpretations have
8774 The server sends an <emphasis>
8775 XkbCompatMapNotify</emphasis>
8776 event to a client only if at least one of the following conditions is met:
8781 <para>The <emphasis>
8783 field of the event is non-zero, and the <emphasis>
8784 XkbSymInterpMask</emphasis>
8785 bit is set in the appropriate event details mask for the client.
8789 <para>The <emphasis>
8790 changedGroups</emphasis>
8791 field of the event contains at least one group, and the <emphasis>
8792 XkbGroupCompatMask</emphasis>
8793 bit is set in the appropriate event details mask for the client.
8799 <sect2 id='Tracking_Application_Bell_Requests'>
8800 <title>Tracking Application Bell Requests</title>
8803 <informaltable frame='none' tabstyle='proto'>
8804 <?dbfo keep-together="always" ?>
8805 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
8806 <colspec colname='c1' colwidth='1.0*'/>
8809 <entry role='protoname'>XkbBellNotify</entry>
8814 <entry role='protoargs'>time: TIMESTAMP</entry>
8817 <entry role='protoname'>
8818 deviceID: CARD8</entry>
8821 <entry role='protoname'>
8822 bellClass: { KbdFeedbackClass, BellFeedbackClass }</entry>
8825 <entry role='protoname'>
8826 bellID: CARD8</entry>
8829 <entry role='protoname'>
8830 percent: CARD8</entry>
8833 <entry role='protoname'>
8834 pitch: CARD16</entry>
8837 <entry role='protoname'>
8838 duration: CARD16</entry>
8841 <entry role='protoname'>
8842 eventOnly: BOOL</entry>
8845 <entry role='protoname'>
8849 <entry role='protoname'>
8850 window: WINDOW</entry>
8859 XkbBellNotify</emphasis>
8860 event indicates that some client has requested a keyboard bell. Bell notify
8861 events are usually caused by <emphasis>
8864 DeviceBell</emphasis>
8867 requests, but they can also be generated by the server (e.g. if the <emphasis>
8868 AccessXFeedback</emphasis>
8874 The server sends an <emphasis>
8875 XkbBellNotify</emphasis>
8876 event to a client if the appropriate event details field for the client has
8877 the value <emphasis>
8886 field specifies the device for which a bell was requested, while the <emphasis>
8887 bellClass</emphasis>
8890 fields specify the input extension class and identifier of the feedback for
8891 which the bell was requested. If the reporting server does not support the
8892 input extension, all three fields have the value 0.
8903 fields report the volume, tone and duration requested for the bell as
8904 specified by the <emphasis>
8906 request. Bell notify events caused by core protocol or input extension
8907 requests use the pitch and duration specified in the corresponding bell or
8908 keyboard feedback control.
8913 If the bell was caused by an <emphasis>
8915 request or by the X server, <emphasis>
8917 reports an optional symbolic name for the bell and the <emphasis>
8919 field optionally reports the window for which the bell was generated.
8920 Otherwise, both fields have the value <emphasis>
8928 eventOnly</emphasis>
8931 , the server did not generate a sound in response to the request, otherwise the
8932 server issues the beep before sending the event. The eventOnly field can be
8936 AudibleBell</emphasis>
8937 control is disabled or if a client explicitly requests <emphasis>
8938 eventOnly</emphasis>
8939 when it issues an <emphasis>
8946 <sect2 id='Tracking_Messages_Generated_by_Key_Actions'>
8947 <title>Tracking Messages Generated by Key Actions</title>
8950 <informaltable frame='none' tabstyle='proto'>
8951 <?dbfo keep-together="always" ?>
8952 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
8953 <colspec colname='c1' colwidth='1.0*'/>
8956 <entry role='protoname'>XkbActionMessage</entry>
8961 <entry role='protoargs'>time: TIMESTAMP</entry>
8964 <entry role='protoname'>
8965 deviceID: CARD8</entry>
8968 <entry role='protoname'>
8969 keycode: KEYCODE</entry>
8972 <entry role='protoname'>
8976 <entry role='protoname'>
8977 mods: KEYMASK</entry>
8980 <entry role='protoname'>
8981 group: KB_GROUP</entry>
8984 <entry role='protoname'>
8985 keyEventFollows: BOOL</entry>
8988 <entry role='protoname'>
8989 message: LISTofCARD8</entry>
8998 XkbActionMessage</emphasis>
8999 event is generated when the user operates a key to which an <emphasis>
9000 SA_ActionMessage</emphasis>
9001 message is bound under the appropriate state and group. The server sends an
9003 XkbActionMessage</emphasis>
9004 event to a client if the appropriate event details field for the client has
9005 the value <emphasis>
9014 field specifies the keyboard device that contains the key which activated the
9015 event. The <emphasis>
9017 field specifies the key whose operation caused the message and press is
9020 if the message was caused by the user pressing the key. The <emphasis>
9024 fields report the effective keyboard modifiers and group in effect at the time
9025 the key was pressed or released.
9031 keyEventFollows</emphasis>
9034 , the server will also send a key press or release event, as appropriate, for
9035 the key that generated the message. If it is <emphasis>
9037 , the key causes only a message. Note that the key event is delivered normally
9038 with respect to passive grabs, keyboard focus, and cursor position, so that
9040 keyEventFollows</emphasis>
9041 does not guarantee that any particular client which receives the <emphasis>
9042 XkbActionMessage</emphasis>
9043 notify event will also receive a key press or release event.
9052 -terminated string of up to <emphasis>
9053 ActionMessageLength</emphasis>
9056 ) bytes, which reports the contents of the <emphasis>
9058 field in the action that caused the message notify event.
9063 <sect2 id='Tracking_Changes_to_AccessX_State_and_Keys'>
9064 <title>Tracking Changes to AccessX State and Keys</title>
9067 <informaltable frame='none' tabstyle='proto'>
9068 <?dbfo keep-together="always" ?>
9069 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
9070 <colspec colname='c1' colwidth='1.0*'/>
9073 <entry role='protoname'>XkbAccessXNotify</entry>
9078 <entry role='protoargs'>time: TIMESTAMP</entry>
9081 <entry role='protoname'>
9082 deviceID: CARD8</entry>
9085 <entry role='protoname'>
9086 detail: KB_AXNDETAILMASK</entry>
9089 <entry role='protoname'>
9090 keycode: KEYCODE</entry>
9093 <entry role='protoname'>
9094 slowKeysDelay: CARD16</entry>
9097 <entry role='protoname'>
9098 debounceDelay: CARD16</entry>
9107 XkbAccessXNotify</emphasis>
9108 event reports on some kinds of keyboard activity when any of the <emphasis>
9111 BounceKeys</emphasis>
9113 AccessXKeys</emphasis>
9114 controls are active. Compatibility map notify events can only be caused by
9124 fields specify the keyboard and key for which the event occurred. The
9127 field describes the event that occurred and has one of the following values:
9130 <informaltable frame='topbot'>
9131 <?dbfo keep-together="always" ?>
9132 <tgroup cols='3' align='left' colsep='0' rowsep='0'>
9133 <colspec colname='c1' colwidth='1.0*'/>
9134 <colspec colname='c2' colwidth='1.0*'/>
9135 <colspec colname='c3' colwidth='2.0*'/>
9138 <entry>Detail</entry>
9139 <entry>Control</entry>
9140 <entry>Meaning</entry>
9146 AXN_SKPress</emphasis>
9151 <entry>Key pressed</entry>
9155 AXN_SKAccept</emphasis>
9162 ey held until it was accepted.</entry>
9166 AXN_SKReject</emphasis>
9171 <entry>Key released before it was accepted.</entry>
9175 AXN_SKRelease</emphasis>
9180 <entry>Key released after it was accepted.</entry>
9184 AXN_BKAccept</emphasis>
9187 BounceKeys</emphasis>
9189 <entry>Key pressed while it was active.</entry>
9193 AXN_BKReject</emphasis>
9196 BounceKeys</emphasis>
9198 <entry>Key pressed while it was still disabled.</entry>
9202 AXN_AXKWarning</emphasis>
9205 AccessXKeys</emphasis>
9207 <entry>Shift key held down for four seconds</entry>
9214 Each subclass of the AccessX notify event is generated only when the control
9215 specified in the table above is enabled. The server sends an <emphasis>
9216 XkbAccessXNotify</emphasis>
9217 event to a client only if the bit which corresponds to the value of the
9220 field for the event is set in the appropriate event details mask for the
9226 Regardless of the value of <emphasis>
9229 slowKeysDelay</emphasis>
9231 debounceDelay</emphasis>
9232 fields always reports the current slow keys acceptance delay (see
9233 <link linkend='The_SlowKeys_Control'>The SlowKeys Control</link>) and
9234 debounce delay (see <link linkend='The_BounceKeys_Control'>The BounceKeys
9235 Control</link>) for the specified keyboard.
9240 <sect2 id='Tracking_Changes_To_Extension_Devices'>
9241 <title>Tracking Changes To Extension Devices</title>
9244 <informaltable frame='none' tabstyle='proto'>
9245 <?dbfo keep-together="always" ?>
9246 <tgroup cols='1' align='left' colsep='0' rowsep='0'>
9247 <colspec colname='c1' colwidth='1.0*'/>
9250 <entry role='protoname'>XkbExtensionDeviceNotify</entry>
9255 <entry role='protoargs'>time: TIMESTAMP</entry>
9258 <entry role='protoname'>
9259 deviceID: CARD16</entry>
9262 <entry role='protoname'>
9263 ledClass: { KbdFeedbackClass, LedFeedbackClass }</entry>
9266 <entry role='protoname'>
9267 ledID: CARD16</entry>
9270 <entry role='protoname'>
9271 reason: KB_XIDETAILMASK</entry>
9274 <entry role='protoname'>
9275 supported: KB_XIFEATUREMASK</entry>
9278 <entry role='protoname'>
9279 unsupported: KB_XIFEATUREMASK</entry>
9282 <entry role='protoname'>
9283 ledsDefined: KB_INDICATORMASK</entry>
9286 <entry role='protoname'>
9287 ledState: KB_INDICATORMASK</entry>
9290 <entry role='protoname'>
9291 firstButton, nButtons: CARD8</entry>
9300 XkbExtensionDeviceNotify</emphasis>
9306 <para>A change to some part of the XKB information for an extension device.
9310 <para>An attempt to use an XKB extension device feature that is not supported
9311 for the specified device by the current implementation.
9319 field specifies the X Input Extension device identifier of some device on
9320 which an XKB feature was requested, or <emphasis>
9321 XkbUseCorePtr</emphasis>
9322 if the request affected the core pointer device. The <emphasis>
9324 field explains why the event was generated in response to the request, and can
9325 contain any combination of <emphasis>
9326 XkbXI_UnsupportedFeature</emphasis>
9327 and the values permitted for the change field of the <emphasis>
9328 XkbSetDeviceInfo</emphasis>
9335 XkbXI_ButtonActions</emphasis>
9336 is set in <emphasis>
9338 , this event reports a successful change to the XKB actions bound to one or
9339 more buttons on the core pointer or an extension device. The <emphasis>
9340 firstButton</emphasis>
9343 fields report a range of device buttons that include all of the buttons for
9344 which actions were changed.
9349 If any combination of <emphasis>
9350 XkbXI_IndicatorNames</emphasis>
9352 XkbXI_IndicatorMaps</emphasis>
9354 XkbXI_IndicatorState</emphasis>
9355 is set in either <emphasis>
9358 unsupported</emphasis>
9363 fields specify the X Input Extension feedback class and identifier of the
9364 feedback for which the change is reported. If this event reports any changes to
9365 an indicator feedback, the <emphasis>
9366 ledsDefined</emphasis>
9367 field reports all indicators on that feedback for which either a name or a
9368 indicator map are defined, and <emphasis>
9370 reports the current state of all of the indicators on the specified feedback.
9376 XkbXI_IndicatorNames</emphasis>
9377 is set in <emphasis>
9379 , this event reports a successful change to the symbolic names bound to one or
9380 more extension device indicators by XKB. If <emphasis>
9381 XkbXI_IndicatorMaps</emphasis>
9382 is set in <emphasis>
9384 , this event reports a successful change to the indicator maps bound to one or
9385 more extension device indicators by XKB. If <emphasis>
9386 XkbXI_IndicatorState</emphasis>
9387 is set in reason, this event reports that one or more indicators in the
9388 specified device and feedback have changed state.
9394 XkbXI_UnsupportedFeature</emphasis>
9395 is set in reason, this event reports an unsuccessful attempt to use some XKB
9396 extension device feature that is not supported by the XKB implementation in the
9397 server for the specified device. The <emphasis>
9398 unsupported</emphasis>
9399 mask reports the requested features that are not available on the specified
9400 device. See <link linkend='Interactions_Between_XKB_and_the_X_Input_Extension'>Interactions Between
9401 XKB and the X Input Extension</link> for more information about possible XKB
9402 interactions with the X Input Extension.
9407 The server sends an <emphasis>
9408 XkbExtensionDeviceNotify</emphasis>
9409 event to a client only if at least one of the bits that is set in the
9412 field of the event is also set in the appropriate event details mask for the
9418 Events that report a successful change to some extension device feature are
9419 reported to all clients that have expressed interest in the event; events that
9420 report an attempt to use an unsupported feature are reported only to the client
9421 which issued the request. Events which report a partial success are reported to
9422 all interested clients, but only the client that issued the request is informed
9423 of the attempt to use unsupported features.