Aan\X  {icHH $ d H?HHff@  d' ) Footnote TableFootnote**. .  :;,.!? _Q2 a9IXIndex REFFontsLOT TableTitleLOFFigureTOC1Heading2Heading3Heading AccessXNotify BadKeyboardBeepOnComposeFail ComposeLEDConsumeKeysOnComposeFailConsumeLookupModsDeviceButtonPressDeviceButtonReleaseIgnoreNewKeyboards MappingNotifyNewKeyboardNotifyNoAction RepeatControl SA_LatchGroupXBell XLookupStringXQueryExtension XkbAction XkbActionsXkbAllocKeyboard XkbBehaviorXkbBellXkbChangeEnabledControlsXkbClampIntoRange5XkbClientMapPtrXkbClientMapRecX XkbCompatMapXkbCompatMapPtrXkbCompatMapRec$XkbControlsPtr XkbDeviceBellXkbDeviceBellEvent XkbDoodadPtrXkbFreeIndicatorMapsXkbFreeKeyboardXkbGeometryPtrXkbGetIndicatorStateXkbGetKeyActionsXkbGetKeyboardXkbGetKeyboardbyName XkbGetMapXkbGetNamedIndicatorXkbGetVirtualModsoXkbGroupActionXkbIM_LEDDrivesKBXkbIM_NoAutomatic XkbIM_NoExplicit XkbISOActionXkbIndicatorChangesRecXkbIndicatorMapPtrXkbIndicatorMapRecXkbIndicatorPtrXkbIndicatorRec XkbKB_Default XkbKeyRecO XkbLogoDoodadXkbLogoDoodadRecXkbMajorVersiongXkbMinorVersionc XkbModAction XkbModsRec XkbNamesPtrs XkbOutlinePtrL XkbOutlineRecOXkbOverlayKeyRecXkbOverlayRowRecXkbRedirectIntoRangeXkbResizeKeyActionXkbResizeKeyActionsp XkbRowPtr XkbRowRecNXkbSA_ClearLocksXkbSA_GroupAbsolutet XkbSA_ISOLockXkbSA_LatchGroupXkbSA_LatchMods XkbSA_LatchToLockoXkbSA_LockGroupaXkbSA_LockModsXkbSA_LockNoLockXkbSA_LockNoUnlockXkbSA_SetGroupXkbSA_UseModMapMods XkbSectionPtrX XkbSectionRecXkbServerMapPtrXkbSetIndicatorMap XkbSetMaprXkbSetNamedIndicatorXkbShapeDoodad XkbTextDoodadkXkbTextDoodadRecXkbVirtualModsToRealXkbWrapIntoRange affect_realaaffect_virtual allocators base_group base_modsd bell_classbell_idkbufachanged_groupscompat_grab_modscompat_lookup_mods compat_state core_keysyms core_symsI corner_radiuskdebouncedesc device_infoe device_specc display_namedpyc error_rtrn event_rtrn extra_rtrn first_button first_key first_typefree_allfree_mapgeom grab_modsk group_XXXo group_info groups_wrapMgrpiidxk implementors ind_classkind_id latched_groupe latched_mods led_classkled_idled_masklib_major_in_outlib_minor_in_out locked_group locked_modsk lookup_modsR major_in_out major_rtrn map_widthA max_inoutk max_key_code min_key_code minor_in_out minor_rtrnmodmapnbytesnum_ num_buttonsknum_keys num_needed num_typesk off_colornon_coloropcode opcode_rtrnMphys_indicatorsc real_modsk real_values reason_rtrnt repeat_delay size_typesspec state_returnsymcsymstimeouto types_inoutD uninitializedDvirtual_valuesvmodmapovmodsk which_groups which_modswildcardir   EquationVariablestcokym5Z II v! I ebo# J c $ K foe& L spe' M ay_) N c * O n , P n - Q n / R ton0 S ey2 T ype3 Ul2R Vge2T Wmod8 X)_XX9 Y*_in: Z(s_w; [i2 \Mlem= ] 8nd_> ^nd_? _ed_@ `atc2 a leC ble2 cE_ma2 d ajo3 e!li3 fn_oJ g d_gL hkedM i ookN j  maP kt 3 ln S mA T n k U omode5 p$_co4 q#_inY ror_Z s,map5 t%nu] u utt5 w&_keb x eedc y ypeh |oloi } ;lorj ~ opk  :M.N 4cat/ l_m/ l_v, eas,  re~ y   s te_ ymc !ime es_ nin D alu apo  wh s #s $ir  % &  '   ]  "ion At Bk  .II <I #9J *K +:L , ;M 5/N GO H0P O"1Q P#R Q$2S U'T V(3Uf3Vg44Wi6X)j7Y*v?6Z(F7[K8\MQ] 8S^T_W`X=aY>bZ?cE_d `@e!bfcg gThhDi mj qkrFlsGmxAn yHomzp$Iq#;rJs,t%Ku w&Ux y V|} ;W~ :14~   Y  ! #  $-L7%8M&flO'sPtuQ]vR{" NASB-.<9: ;/Y0Z"1 [#']$2.^'/_(35a3:b44?c6Dd7G?6NF7OK8P QQ SRVTSeWZfX=^Y>_Z?ag_b`@cbfchrgTihhDjmq\qtirFujsGvkxAwlyHzmz{nI#o;*pJ.q@KAs{U|tV`Wu~v1w~x0 YyXz{ | } L #M &(O-P23Q4R+=0A- N1BS5EC=K-?M@NAO#KV$LWQZ@X_BYY`C\bZ]c [af']bg.^ch/_di5ajm:bkn?cloDdprGtuNOP Q RVSeZf*^_agbcfhr5ihjq\ti uj vkwl zm{n o pqs,t+`uvwx0yXz{ | } /#2&4(6 -9 2;3<4==>A-?B@ECAKBMCNDO#EV$FWGZ@H_BI`CJbKcLfM gN!hO"iP#mQ$nR%oS&rT'uU(V)W*k8~EKL*TUVZ[\]5^_`a b cd ef g hijkl ,m +n o p qrstuvwx2 !"  % &('")*.+/-3.=/E4O 6P1`a3567!8 (!):"+#,$-9%.;&/<'0=(1>)2?*3@84AE5BK6CL7DT8EU9FV:GZ;H[<I\=J]>K^?L_@M`ANaBObCPcDQdEReFSfGTgHUhIViJWjKXkLYl MZm N[n O\o P]p Q^qR_rS`sTatUbuVcvWdwXexYfZg[h\i]j^k_l`m2anbocpdqerfsgt hu!iv"jw%kx&ly(mz'n{)o|p}+q~-r.s/t4u 6v1wx3y5z{6|7}!8~():+,-9.;/<0=1>2?3@ 4A 5B 6C 7D 8E9F:G;H<I=J>K?L@MANBOCPDQERFSGTHUIVJW KX!LY"MZ#N[$O\%P]&Q^'R_(S`)Ta*Ub+Vc,Wd-Xe.Yf/Zg0[h1\i2]j3^k4_l5`m6an7bo8cp9dq:er;fsEgtIhuJivKjwLkxMlyNmzOn{Po|Qp}Rq~SrTsUtVuWvXwYxZy[z\{]|^}_~`abcdefghijklmnopqrstuvwxyz{|}~           "#$%&'()*+, <!-".#$/%0&1'2(3)4*5+6,7-8.9/:0;1D2=3>45F6?7@8A9B:C;D<E=F>G?H@IAJBKCLDMENFOGPHQIRJSKTLUMVNWOXPYQZR[ S\ T] U^ V_ W`XaYbZc[d\e]f^g_h`i aj bk cl dm enfogphqir js"kt#lu$mv%nw&ox'py(qz)r{*s|+t},u~ <v!-w".x#y$/z%0{&1|'2}(3~)4*5E+6,7-8.9/: 0; 1D 2= 3> 45F6?7@8A9B:C;D<E=F>G?H@IAJBKCLDMENFO GP!HQ"IR#JS$KT%LU&MV'NW(OX)PY*QZ+R[,S\-T].U^/V_0W`1Xa2Yb3Zc4[d5\e6]f7^g8_h9`i:aj;bk<cl=dm>en?fo@gpAhqBirCjsDktEluFmvGnwHoxIpyJqzK$r{Ls|Mt}Nu~OvPwQxRySzT{U|V}W~XYEZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~           !"#$$%&' (!)"*#+$,%-&.'/(0)1*2+3,4-5.6/708192:3;4<5=6>7?8@9A:B;C<D=E>F?G@HAIBJCKDLFNGOHPIQJRKSLTMUNVOWPXQYRZS[T\U]V^W_ X` Ya Zb [c \d]e^f_g `h ai bj ck dlemfngohpiqjrksltmunv ow!px"qy#rz$s{%t|&u}'v~ (w!)x"*y#+z$,{%- |&. }'/ ~(0 )1 *2 +3 ,4 -5 .6 /7 08 19 2: 3; 4< 5= 6> 7? 8@ 9A :B ;C <D =E >F ?G @H AI BJ CK DL FN GO !HP "IQ #JR $KS %LT &MU 'NV (OW )PX *QY +RZ ,S[ -T\ .U] /V^ 0W_ 1X` 2Ya 5Zb 6[c 7\d 9]e :^f ;_g <`h >ai ?bj @ck Adl Bem Cfn Dgo Ehp Fiq Gjr Hks Ilt Jmu Knv Low Mpx Nqy Orz Ps{ Qt| Ru} Sv~ Tw Ux Vy Wz X{ [| \} ]~ ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~                                   ! " # $ %  & !' "( #) $* %+ &, '- (. )/ *0 +1 ,2 -3 /5 06 17 28 39 4: 5; 6< 7= 8> 9? :G ;A DH EI FJ GK HL IM JN KO LP MQ NR OS PT QU RV SW TX UY VZ W[ X\ Y] Z^ [_ \` ]a ^b _c `d ae bf cg dh ei fj gk hl jn ko lp mq  nr  os pt qu rv sw tx uy vz w{ x| y} z~! {" |# }$ ~%  & !' "( #) $* %+ &, '- (. )/ *0 +1 ,2 -3 /5 06 17 28 39 4: !5; "6< #7= $8> %9? &:G ';A (DH )EI *FJ +GK ,HL -IM .JN /KO 0LP 1MQ 2NR 3OS 4PT 5QU 6RV 7SW 8TX 9UY :VZ ;W[ <X\ =Y] >Z^ ?[_ @\` A]a B^b C_c D`d Eae Fbf Gcg Hdh Iei Jfj Kgk Ohl Pjn Qko Rlp Smq Tnr Uos Vpt Wqu Xrv Ysw Ztx [uy \vz ]w{ ^x| _y} `z~ a{ b| c} d~ e f g h i j k l m n o p q r s t u v w {                                                       ! " # $ % & ' ( ) *  +! ,",h. H,i/ H,4 J,5 J,6 K,7 K,: M,; M1& ^ Header files _Data structures: editing `Keyboard description:changing bData structures: freeingc 816830: TableTitle: Table 9.6 AccessXNotify Event DetailsTuXKBlib.h k $32250: 1Heading: 5 Virtual Modifiers m )36799: 2Heading: 5.1 Modifier Definitions | #27417: 1Heading: 4.0 Keyboard State $24772: 2Heading: 3.1 XKB Event Types '25929: TableTitle: Table 3.1 XKB Events )72166: 2Heading: 3.3 Selecting XKB Events ;21280: TableTitle: Table 3.2 XkbSelectEvents Mask Constants +20481: 2Heading: 1.4 Unified XKB Event Type ~Xkb:state, diagram  ,42931: 2Heading: 4.4 Tracking Keyboard State! ?19499: TableTitle: Table 10.4 XkbStateNotify Event Detail Masks" 421253: TableTitle: Table 10.15 Library Control Masks# 382702: 1Heading: 15.0 Complete Keyboard Description$ J.58112: 2Heading: 15.1 The XkbDescRec Structure% 13612: TableTitle: Table 15.1Da& cF14563: 2Heading: 15.2 Obtaining a Keyboard Description from the Server s' e)37665: 3Heading: 7.2.2 XkbIndicatorMapRecb 9( Z s752199: 1Heading: 20.0 Replacing a Keyboard On the Fly5) X n+35443: 1Heading: 14 Interpreting Key Eventsd* YM MappingNotifyis+ |831376: TableTitle: Table 21.1 XkbDeviceInfoRec Mask Bits, s n^36260: TableTitle: Table 6.7 XkbIndicatorMapRec which_mods and mods, Indicator Drives Keyboardin- S526251: TableTitle: Table 14.5 XkbAllocServerMap Masksb 3. e13413: 1Heading: 8 Bells/ 42518: 1Heading: 7.0 IndicatorsB0 p;11779: TableTitle: Table 7.1 XkbIndicatorMapRec flags Field:1" k]15202: TableTitle: Table 7.1 XkbIndicatorMapRec which_groups Field, Keyboard Drives Indicator 2$ 1b18567: TableTitle: Table 7.2 XkbIndicatorMapRec which_groups and groups, Keyboard Drives IndicatorDe3( o]39489: TableTitle: Table 7.2 XkbIndicatorMapRec which_groups Field, Indicator Drives Keyboardb 144 a25408: TableTitle: Table 7.35 nS23542: 2Heading: 21.5 Setting XKB Features for Non-KeyClass Input Extension Devicesa6? b>24929: 2Heading: 7.2 Effects of Explicit Changes on Indicatorsly7F X?23228: 2Heading: 8.5 Tracking Changes To Indicator State or Mapp8K i:66787: 2Heading: 7.6 Allocating and Freeing Indicator Mapsas9Visual bells, generating: 6-24004: TableTitle: Table 8.1 Predefined Bellscor; "54861: 2Heading: 8.2 Audible Bellse:< 1215525: TableTitle: Table 9.1 Xkb Keyboard Controlsin=X l17005: TableTitle: Table 8.3>Y c451614: 2Heading: 8.5 Forcing a Server-generated Bell?Z e$84915: 2Heading: 9.1 Detecting Bells@`bVisual bells, generatingA uH36398: 1Heading: 15.0 Interactions Between XKB and the X Input ExtensionB nK39794: 2Heading: 22.1 Determining the XKB Status of Input Extension Devices]CE b_15967: FunctionDecl: XkbDescPtr XkbGetKeyboardByName(dpy, device_spec, names, want, need, load)Dh b'97066: 1Heading: 16.0 Keyboard GeometrydE c "Geometry:rotated keyboard sectionsInFr e613754: Figure: Figure 16.2 Keyboard with Four SectionsExGs C)35210: 2Heading: 11.1 Shapes and OutlineseinHy T,17593: Figure: Figure 16.3 Rows in a SectionI 6@21626: Figure: Figure 16.4 XKB Geometry Data Structures (Part 1)J lA12344: Figure: Figure 16.5 XKB Geometry Data Structures (Doodads)eBeK rB38296: Figure: Figure 16.6 XKB Geometry Data Structures (Overlays)TiL b<18988: 2Heading: 17.4 Getting Map Components from the ServerM 913864: TableTitle: Table 10.1 XKB Mapping Component MaskseN e539309: TableTitle: Table 14.3 XkbAllocClientMap MaskslelO e;23984: 2Heading: 17.6 Changing Map Components on the ServerXP e692306: 3Heading: 16.4.1 The XkbMapChangesRec StructureinQ 419821: TableTitle: Table 17.2 XkbMapChangesRec MasksR o846140: 2Heading: 16.8 Tracking Changes to Map ComponentsS t612633: 3Heading: 16.6.3 Allocating an Empty Server MapeoTg $13294: 1Heading: 19.0 Symbolic NamesU n/41751: 2Heading: 20.1 The XkbNamesRec StructurehV t218684: TableTitle: Table 19.1 Symbolic Names MasksliW n/93169: 1Heading: 18.0 The XKB Compatibility MapcX =20302: Figure: Figure 18.4. Xkb Compatibility Data StructuresPt Y '66191: 1Heading: 11.0 Keyboard ControlseZ SH12944: 2Heading: 10.1 Controls for Enabling and Disabling other Controls[ c237700: 3Heading: 10.1.1 The EnableControls Controltt\q 025639: Figure: Figure 9.1 MouseKeys Acceleration]' b)32672: 2Heading: 10.7 Auto Reset Controls e^. :519310: 2Heading: 9.3 Controls for Repeat Key Behavior e_/ :.21007: 3Heading: 10.3.1 The RepeatKeys Controlve` 024358: 3Heading: 10.1.3 The per_key_repeat Fielda5 eT35220: 2Heading: 9.4 Controls for Keyboard Overlays (Overlay1 and Overlay2 Controls)b: 1D36561: 2Heading: 10.5 Controls for Using the Mouse from the Keyboardc? a10572: 2Heading: 6.5 MouseKeys dD :+50995: 2Heading: 6.6 MouseKeys Acceleration5eS n!43773: 2Heading: 6.7 AccessX KeysfZ 8$77869: 2Heading: 6.8 AccessX Timeoutga s.34813: 2Heading: 6.9 AccessX Feedback Controlsibhi a,22678: 3Heading: 6.2.1 SlowKeysNotify Eventsit l53434: 2Heading: 6.2 SlowKeys66ju e21583: 2Heading: 6.3 BounceKeysZkv 284732: 2Heading: 6.4 StickyKeysElw n)85844: 3Heading: 6.4.1 StickyKeys Options:Hemz 1;35058: 2Heading: 10.7 Controls for General Keyboard MappingFn{ .15852: 3Heading: 10.7.1 The GroupsWrap Control 1o o216608: 3Heading: 10.7.2 The IgnoreLockMods Controltrp 228201: 3Heading: 9.7.3 The IgnoreGroupLock Control3.q e020622: 3Heading: 10.7.4 The InternalMods Controlrh e538275: 2Heading: 7.1 Virtual Modifier Names and Masksrs s b*21251: TableTitle: Table 10.1 Xkb Controlst 1D22356: TableTitle: Table 10.3 Controls Mask Bits (which parameter)u a'27182: 2Heading: 10.6 Querying Controlsv :'27591: 2Heading: 11.3 Changing Controlsew 3;13151: 3Heading: 10.7.1 The XkbControlsChangesRec Structure:x s;80349: 2Heading: 11.6 Tracking Changes to Keyboard Controlsoy b>68497: 2Heading: 10.6 Allocating and Freeing an XkbControlsRec53z eT39286: 3Heading: 18.1.2 Core Keyboard Mapping to Xkb Keyboard Mapping Transformation{ 6l20455: Numbered2Indent: 1a. For each changed key, determine the number of groups represented in the new core| nh14623: NumberedIndent: 2. Apply symbol interpretations to modify key operation. This phase is completely} .j10751: Numbered2Indent: 2a. For each symbol on each changed key, attempt to match the symbol and modifiers2:~ n173705: 1Heading: 17.0 XKB Client Keyboard Mapping:HeKeymap:client map;Client map 45629: 3Heading: Key Typesab /74827: 3Heading: 17.1.1 The Canonical Key Typese t:17484: 3Heading: 17.1.1 Getting Keys Types from the Server 1 r+69203: 3Heading: 17.1.2 Changing a Key Type. g)59436: 3Heading: 17.1.3 Copying Key Types.Th n#52755: 3Heading: Key Symbol Mapping; e(54747: 3Heading: 17.2.1 Key Type Indeces <11719: TableTitle: Table 17.7 group_info range normalization cA34179: 3Heading: 17.2.3 Key Width and Offset in to the Symbol MapKbo pA34179: 3Heading: 17.2.3 Key Width and Offset in to the Symbol Mapcng G11851: 3Heading: 17.2.5 Getting the Symbol Map for Keys from the Server2 e911142: 3Heading: 17.2.4 Changing the Types Bound to a Keyaon pE34574: 3Heading: 17.2.6 Changing the Number of Symbols Bound to a Keyoon h"53194: 2Heading: 17.3 Modifier Map a f836827: 3Heading: 17.3.1 Getting the Per-Key Modifier Map :J41068: 2Heading: 18.2 Getting Compatibility Map Components From the Serveres 130762: 2Heading: 18.3 Using the Compatibility Mape# t<32583: 2Heading: 1.4 Changing the Servers Compatibility Map& r?62383: 2Heading: 17.6 Tracking Changes to the Compatibility Map3( 1>22283: 2Heading: 18.6 Allocating and Freeing Compatibility MapMa ;40859: 2Heading: 19.3 Changing Symbolic Names on the Server<W b178664: 1Heading: 18.0 XKB Server Keyboard Mappingc 4#10752: 3Heading: 17.2.1 Key ActionsfN o*24312: TableTitle: Table 16.1 Action Types 1 e&30661: 3Heading: 17.1.3 XkbGroupActionng $93597: 3Heading: 17.1.4 XkbPtrAction p'24390: 3Heading: 17.1.5 XkbPtrBtnAction4 n(96681: 3Heading: 17.1.6 XkbPtrDfltAction $73187: 3Heading: 17.1.7 XkbISOAction e-67982: 3Heading: 17.1.8 XkbSwitchScreenAction:He 1&17514: 3Heading: 17.1.9 XkbCtrlsActionin .)86886: 3Heading: 17.1.10 XkbMessageAction:41 575078: 3Heading: 16.1.1 Detecting Key Action MessageshSe s-33468: 3Heading: 17.1.11 XkbRedirectKeyActiontil e+80067: 3Heading: 17.1.12 XkbDeviceBtnActionh s075466: 3Heading: 17.1.13 XkbDeviceValuatorAction gG23971: 3Heading: 18.1.15 Obtaining Key Actions for Keys from the Servera FF67001: 3Heading: 18.1.16 Changing the Number of Actions Bound to a Keyli $49996: 3Heading: 17.2.2 Key Behavior H77559: 3Heading: 18.2.1 Obtaining Key Behaviors for Keys from the Server N)11176: 2Heading: 18.3 Explicit ComponentsTes L32572: 3Heading: 18.3.1 Obtaining Explicit Behavior for Keys from the Server r.20072: 2Heading: 18.4 Virtual Modifier MappingnA ^36622: 3Heading: 18.4.1 Obtaining Virtual Modifiers and Virtual Modifer Mappings for Keys from- e740977: 3Heading: 20.3.1 The XkbNameChangesRec Structure3 :28027: TableTitle: Table 18.2nin4 .+94026: 2Heading: 18.5 Tracking Name Changes= ;36378: 2Heading: 20.5 Allocating and Freeing Symbolic Namesc 3<40534: TableTitle: Table 21.1 XkbComponentNameRec flags bits n111257: 3Heading: 11.1.3 AlwaysConsumeShiftAndLockein .140052: TableTitle: Table 22.1 Debug Control Masksn 1+O Xkb:overviewrBase State, glossary entry F :;34542: 2Heading: 22.2 Allocating an XkbDeviceInfo StructureKM B97919: 2Heading: 22.3 Tracking Changes to Extension Button Actions 1b$Keyboard state:base group;Base groupfXkbSA_NoActionHe 1832842: 2Heading: 1.8 Initializing the Keyboard Extension n028788: TableTitle: Table 1.1 Xkb Protocol Errors 0B39210: 2Heading: 5.4 Allocating and Freeing a Keyboard Descriptionin .=42703: TableTitle: Table 15.2 XkbDescRec Component ReferencesKs  118392: 2Heading: 9.8 The XkbControlsRec Structuresc  r937098: Figure: Figure 16.2 Virtual Modifier Relationships46:Q n840324: 3Heading: 10.3.3 The DetectableAutorepeat Control6oData structuresgS Data structures:enlargingbTiTb$Xkb events:overview; Events:overview_nXkb events:types;Events:typessnstABase event code;Events:base event code;Xkb events:base event codeasn+1Xkb events:data structures;Events:data structuresery: 2-Xkb events:selecting for;Events:selecting forM  :XkbSelectEvents( )ng UsXkbSelectEventDetails( )XkbEvent unified event typeuoXkbSelectEvents mask constants2Keyboard state I z/96175: 2Heading: 4.1 Keyboard State Descriptioneb"Keyboard state:modifiers;Modifiers39e0Keyboard state:keysym groups;Keysym group;Groupsn$Keyboard state:base group;Base groupR,Keyboard state:base modifiers;Base modifiers96Keyboard state:effective modifiers;Effective modifierse: .Keyboard state:effective group;Effective group40e7Groups:normalizing groups into range;Normalizing groupsc+Xkb-capable client;Client types:Xkb-capableb'Xkb-aware client;Client types:Xkb-awarek(Keyboard state:lookup state;Lookup statet8Keyboard state:compatibility states;Compatibility:states+Modifiers:masks s$Keyboard state:grab state;Grab state:XkbLockModifiers( )n iXkbLatchModifiers( )!Groups:changingc")Groups:symbolic group namese#XkbLockGroup( )t$eXkbLatchGroup( )%lKeyboard state:determining&e'eXkbGetState( )5:(n!XkbStateNotify event detail masks)eKeyboard state:trackingd*98 e129450: TableTitle: Table 9.4 AccessXNotify Eventsn^ a021710: TableTitle: Table 4.1 Real Modifier Masks,s,Xkb:keyboard extension support for keyboardsE fC12174: TableTitle: Table 9.8 GroupsWrap options (groups_wrap field)c_ pL15341: TableTitle: Table 9.9 Access X Enable/Disable Bits (ax_options field)Keyboard descriptionikXkbDescRec:component referenceslnXkbGetKeyboard( )e(Keyboard description:getting from servereXkbAllocKeyboard( )ieXkbFreeKeyboard( )K++Keyboard description:allocating and freeinggL ;%14930: 2Heading: 1.11 Protocol Errors UiXkbstr.hd (K32920: TableTitle: Table 10.1 BadKeyboard Protocol Error resource_id ValuesVcXKB.h Ze XKBgeom.hrp([%Xkb extension:nameet\g!Compatibility:determining libraryt )](Linking with the Xkb extensionma^Version, determining_nXkbLibraryVersion( )`:XkbQueryExtension( )aoInitializing Xkbb1 Major opcodee4Base event codeMf,Base error codedgnXkbOpenDisplay( )rhfXkbIgnoreExtension( )b 9ipXkb extension:disablingpj Protocol errors;Errors, protocolks lD m  n  o paqirisk BadDevicecomtrBadClassunBadIdtybv;Device specifications, matching with display specificationswlDevice identifier;XkbUseCoreKbdKx )&37246: 1Heading: 11 X Library Controlsin r224674: Figure: Figure 14.1 Shift Levels and Groupss  U*17590: TableTitle: Table 13.1 Doodad Typesab  Groups;Keysym groupc e)40104: Figure: Figure 15.1 Xkb Client Maprp( %125675: 3Heading: 15.3.2 Per-Key Group Informationein r314915: Figure: Figure 16.1 Server Map Relationships e318751: TableTitle: Table 16.3 Modifier Action Flags k328821: TableTitle: Table 16.2 Modifier Action Types 032583: TableTitle: Table 16.5 Group Action Flags  d235788: TableTitle: Table 16.6 Pointer Action TypeseE! n917351: TableTitle: Table 16.7 Pointer Button Action Typesc e" r940915: TableTitle: Table 16.8 Pointer Button Action Flags #O 327711: TableTitle: Table 16.9 Pointer Default FlagsD$V mP26599: TableTitle: Table 16.10 ISO Action Flags when XkbSA_ISODfltIsGroup is Set% lT35414: TableTitle: Table 16.11 ISO Action Flags when XkbSA_ISODfltIsGroup is Not Set& 919844: TableTitle: Table 16.12 Switch Screen Action Flagsi L' n329191: TableTitle: Table 16.14 Control Action Flagso( s425232: TableTitle: Table 16.13 Controls Action Types) :324143: TableTitle: Table 16.15 Message Action Flags7* n918704: TableTitle: Table 16.17 Device Button Action Typesge:+ T35414: TableTitle: Table 16.11 ISO Action Flags when XkbSA_ISODfltIsGroup is Not Set, 915143: TableTitle: Table 16.18 Device Button Action Flagse- ,24606: TableTitle: Table 16.19 Key Behaviors. 739284: TableTitle: Table 16.20 Explicit Component Masks/ n/21854: Figure: Figure 1.1 Overall Xkb Structuret0 c433548: 3Heading: 16.1.4 The XkbGroupAction Structure1 o\36157: Figure: Figure 17.2 Derivation of State and Keyboard Mapping Components in the Server2 :B39349: TableTitle: Table 17.1 Symbol Intrepretation Match Criteria l3 :>26729: TableTitle: Table 17.1 XkbCompatMapNotify Event Detailsp 4 S?35936: TableTitle: Table 19.1 XkbNewKeyboardNotifyEvent Details 5 L<61227: 1Heading: 22.0 Server Database of Keyboard Components6 s33141: TableTitle: Table 21.13on7 c%49632: 2Heading: 13.1 Component Names:ab8! 5%98074: 2Heading: 13.3 Component Hints:ab9-:Xkb:extension components:) yM38490: TableTitle: Table 21.2 want and need mask bits and required componentsOlt;. Xlib version required53:</iX server version requiredt A=0lKeyboard description>1i Client map19?2h Server map @3:ControlsA41 IndicatorsCoB5 GeometryC61Namesge:D7 Compatibility;mapuurE8HClient types:Xkb-aware;Client types:Xkb-capable;Client types:Xkb-unawareF9:Xkb-aware clientG:SXkb-capable clientinH;nXkb-unaware clientI<9$Compatibility:with the core protocolJ=oK>tProtocol errors:added by XkbL?bXkb:extension library functionsDM@ #Virtual modifiers;Modifiers:virtual.NAeReal modifiers;Modifiers:real LOB:;Virtual modifiers:names and masks;Modifiers:names and masksPC:CModifiers:modifier definition;Virtual modifiers:modifier definition QDb`Effective mask;Effective modifier mask;Modifiers:effective mask;Virtual modifiers:effective maskREbVirtual modifiers:key mappingemaSF XkbVirtualModsToReal( )TG -Virtual modifiers:master modifier definitionsvsiUHi?Modifiers:inactive virtual modifiers;Virtual modifiers:inactive?VIe'Virtual modifiers:conventions for names WJsVirtual modifiers:example61XKg IndicatorsCoYLlIndicators:data structuresypZMaIndicators:names[NlXkbIndicatorRecb\OIndicators:maps;Indicator map:S]PaXkbIndicatorMapRecn^QnIIndicators:indicator drives keyboard;Indicators:keyboard drives indicator>_RrIndicators:how groups affect`SkIndicators:how modifiers affectMaTiIndicators:how controls affectbUe0Indicators:getting information about from servercViIndicators:getting the state ofedWkXkbGetIndicatorState( )oeXf'Indicators:getting information by indextfYDXkbGetIndicatorMap( )ftigZf&Indicators:getting information by namemoh[:XkbGetNamedIndicator( )i\o"Indicators:changing maps and stateirj]s)Indicators:effects of explicit changes ont mk^ Radio groupsl_im`:narobepcmqdareIsfatg:uh viwjixkiXkbIM_NoExplicitylnXkbIM_NoAutomaticlInzmsXkbIM_LEDDrivesKBpM{nn XkbIM_UseNoneN|ok XkbIM_UseBaseO}pnXkbIM_UseLatched~q:XkbIM_UseLockedIraXkbIM_UseEffectivecasd XkbIM_UseNoneeoatc XkbIM_UseBasedveuaXkbIM_UseLatchedvsXkbIM_UseLockedtwkXkbIM_UseEffectiveiexcXkbIM_UseCompatiywAX_IndicatorOnzeAX_IndicatorOffi{aAX_IndicatorChange|i AX_FeatureOn}e AX_FeatureOffWk~tAX_FeatureChangefAX_SlowKeysWarningnfnAX_SlowKeyPresstAX_SlowKeyAcceptfAX_SlowKeyRejectaAX_SlowKeyRelease[:tAX_BounceKeyReject\nAX_StickyLatchmas AX_StickyLocksInsAX_StickyUnlockcs+Bells:sounding;Bells:generating bell eventsm'Overlays:Overlay1 and Overlay2 controlsk'Overlays:Overlay1 and Overlay2 controlsolsDMkkBp_ke:Bells:high and low pitched beeps, rising and falling tonesoacBu_keDetectableAutorepeatecCydXfXkbAXN_SKPressndhXkbAXN_SKAccept eee~aXr WrapIntoRangenAXyClampIntoRangeAXyRedirectIntoRangeXloeayRedirectIntoRangetAXKClampIntoRangeni WrapIntoRangesgi XkbSA_SetModsshiXkbSA_LatchModsi:XkbSA_LockModsermeXkbSA_SetGroupnXkbSA_LatchGroupoXkbSA_LockGroupr XkbSA_MovePtra:Ou XKbSA_PtrBtn $70777: 3Heading: 17.1.2 XkbModActionlXkbSA_LockPtrBtnXkbSA_SetPtrDflt XkbSA_ISOLockkXkbSA_SwitchScreenpXkbSA_SetControlsXkbSA_LockControlsndtXkbSA_ActionMessagedtXkbSA_RedirectKeyXkbSA_DeviceBtnXKbSA_LockDeviceBtneXkbSA_DeviceValuator XkbSA_SetModsCXkbSA_LatchModsXkbSA_LockModskXkbSA_UseModMapModsNXkbSA_ClearLocksXkbSA_LatchToLockXkbSA_LockNoLockXkbSA_LockNoUnlockInnBActions:group action flags, table;Groups:group action flags, tableeXkbSA_SetGroupRenXkbSA_LatchGroupIXkbSA_ClearLocksnXkbSA_LatchToLockiXkMXkbSA_GroupAbsoluteSdXkbSA_MoveAbsoluteYorXkbSA_MoveAbsoluteXonXkbSA_NoAcceleration XkbSA_PtrBtnrXkbSA_LockPtrBtnuXkbSA_UseDfltButton0XkbSA_LockNoLockdXkbSA_LockNoUnlockA_BXkbSA_DfltBtnAbsolutePDfXkbSA_ISODfltIsGroupkXkbSA_GroupAbsoluteXkbSA_ISONoAffectModskXkbSA_ISONoAffectGroupt_XkbSA_ISONoAffectPtr_XkbSA_ISONoAffectCtrlsXkiXkbSA_ISODfltIsGroupiXkbSA_UseModMapModsSaXkbSA_LockNoLockMXkbSA_LockNoUnlockA_dXkbSA_ISONoAffectModskdsXkbSA_ISONoAffectGroupNXkbSA_ISONoAffectPtrkXkbSA_ISONoAffectCtrls_XkbSA_ISODNoAffectModsA_nXkbSA_ISONoAffectGroupgriXkbSA_ISONoAffectPtrtXkbSA_ISONoAffectCtrls_XkbSA_SwitchAbsolutecXkbSA_SwitchApplicationl XkbSA_LockNoUnlockoL kXkbSA_LockNoLock tXkbSA_LockControlsve eXkbSA_SetControls_ve eXkbSA_MessageOnPressiXkbSA_MessageOnReleaserXkbSA_MessageGenKeyEvent_XkbSA_DeviceBtnkXkbSA_LockDeviceBtn_XkbSA_LockNoUnlockB_XkbSA_LockNoLock XkbKB_DefaultIro XkbKB_LockoutXkbKB_RadioGroup fXkbKB_Overlay1k _XkbKB_Overlay2t _ XkbSI_NoneOf XkbSI_AnyOfOrNoneNff s XkbSI_AnyOfD XkbSI_AllOfk XkbSI_ExactlydaXkb:overall structure, diagramA_nKeyboard state:descriptionff kMouseKeys:acceleration, diagramo! e 323161: Figure: Figure 16.1 Rotated Keyboard Sectionc"-Geometry:keyboard with four sections, diagramkA_#f#Geometry:rows in a section, diagramc$!Geometry:data structures, diagram_%_Geometry:outlines, diagramA_&p1Keyboard mapping:shift levels and groups, diagramkXk'kXkb client map, diagramo(sXkb server map, diagramn)e7Virtual modifiers:data structure relationships, diagramR*(Server interaction with clients, diagram+_Compatibility:diagramkA_,i&Compatibility:data structures, diagram-! k918704: TableTitle: Table 16.17 Device Button Action Types_ck."XkbSA_IgnoreValG/$ XkbSA_SetValMina0% XkbSA_SetValCentert1&_XkbSA_SetValMax2'kXkbSA_SetValRelative3(k XkbSA_MovePtrD4)_XkbSA_SetPtrDflt5*cXkbSA_AffectDfltBtn:6+t XkbSA_ISOLockmA_7,nXkbSA_SwitchScreenip8-fXkbSA_SetControls:ce9.nXkbSA_LockControls23:/gXkbSA_ActionMessaget;0rXkbSA_RedirectKeyGe< kXkbSA_DeviceBtn =2 XkbSA_SetValAbsolute>3rXkbIM_LEDDrivesKBira?6XkbIM_NoExplicit@7rXkbIM_NoAutomatic_A8tIndicators:changing mapsB9eXkbSetIndicatorMap( )vs C:uXkbSetNamedIndicator( )D;tE<aXkbChangeIndicators( )apF=a+Indicators:tracking changes to state or mapeG>sH?aXkbNoteIndicatorChanges( )onI@lXkbGetIndicatorChanges( )oatJA:&Indicators:allocating and freeing mapstrKB,XkbAllocIndicatorMaps( )LCiXkbFreeIndicatorMaps( )uMDoNE Bells:namesSOFaBells:predefinedPGiBells:audible;AudibleBelleerQH&Bells:bell_class and bell_idRI_SJiTKkXkbDeviceBell( )UL_ XkbBell( )DfVM*"Bells:generating named bell eventsXkWNLXkbDeviceBellEvent( )_itXOnXkbBellEvent( )SYPr%Bells:forcing a server-generated bell3/ZQkXkbForceDeviceBell( )0r[R_XkbForceBell( )<\SkBells:detecting=]Tk^Ub#Controls:keyboard;Keyboard controls_V!Boolean controls;Controls:boolean_Au`W-Controls:enabling and diabling other controlseXkaXi(EnabledControls;Controls:EnabledControlsbYXkbChangeEnabledControls( )gcZrAutoReset;Controls:AutoResetd[hControls:cleaning up on exite\?XkbGetAutoResetControls( ) )f]@XkbSetAutoResetControls( ))og^AControls:bell behaviorg h_e Controls:AudibleBell;AudibleBelli`(4Controls:repeat key behavior;Repeating keys:controlsjae"Controls:PerKeyRepeat;PerKeyRepeatkbiControls:RepeatKeys;RepeatKeysHlceXkbGetAutoRepeatRate( )dmd_XkbSetAutoRepeatRate( )neB2Controls:DetectableAutorepeat;DetectableAutorepeattiofdRepeating keys:detectingpgBXkbGetDetectableAutorepeat( )lveqhXkbSetDetectableAutorepeat( )renrib#Controls:overlays;Overlays:controls sjR0Keycodes:keys which report more than one keycodetkkHControls:using the mouse from the keyboard;Mouse:using from the keyboardulrControls:MouseKeys;MouseKeysvml&Controls:MouseKeysAccel;MouseKeysAcceliwnegControls:keyboard use for physically-impaired persons;Keyboard controls:for physically-impaired personsAxo (Controls:AccessXKeys;AccessXKeys controlyp kAccessDOS controls )zq]&Controls:AccessXTimeout;AccessXTimeoutA{ro-Keyboard:unresponsiveness because of SlowKeyse;A|seXkbGetAccessXTimeout( )p}teXkbSetAccessXTimeout( )t~u(Controls:AccessXFeedback;AccessXFeedbackviax_options valuesyRews:XkbAX_DumbBellFBMask;DumbBells;Bells:fixed pitch bell onlypex "AccessXNotify;Events:AccessXNotifyepyezeXkbAXN_SKRelease{ XkbAXN_SKRejectp|kXkbAXN_BKAccepto}lXkbAXN_BKRejectS~bXkbAXN_AXKWarningni4oXkbSA_DeviceValuatorl&XkbDeviceValuatorAction data structureoro4Events:StickyKeys;Events:RepeatKeys;Events:MouseKeysdControls:SlowKeys;SlowKeysrXkbGetSlowKeysDelay( )KemXkbSetSlowKeysDelay( )ceKControls:BounceKeys;BounceKeysbo XkbGetBounceKeysDelay( )bXkbSetBounceKeysDelay( )eControls:StickyKeys;StickyKeysesAcp$StickyKeys:automatically turning offAStickyKeys:locking a modifierAreXkbGetStickyKeysOptions( )e KXkbSetStickyKeysOptions( )XT %Controls:for general keyboard mappinguosAaiControls:GroupsWrap;GroupsWrapXkbGroups:handling illegal groupsit &XkbRedirectIntoRange;RedirectIntoRangeesy XkbClampIntoRange;ClampIntoRangeXkbWrapIntoRange;WrapIntoRangekN&Controls:IgnoreLockMods;IgnoreLockMods~kXkbSetIgnoreLockMods( )_(Controls:IgnoreGroupLock;IgnoreGroupLocka#Grabs:passive, ignoring group locksknZControls:InternalMods;InternalMods;Modifiers:specifying which should be consumed by serverys)XkbSetServerInternalMods( )eeControls:data structureKeXkbControlsRecXknControls:table listing allete GroupsWrapoIgnoreLockModsSts enabled_ctrls repeat_delaytrepeat_intervalgSlowKeys:acceptance delaymifrdebounce_delayicp ax_optionsk"AccessX enable/disable bits, tableCofXkbAX_NeedOption macrogXkbAX_AnyFeedback macroXkbAX_NeedFeedback macroa PerKeyRepeatbControls:queryinglgasXkbGetControls( )decnControls:changingeesyXkbSetControls( );amnXkbControlsChangesRectanIXkbChangeControls( )IQControls:tracking changes to keyboard controls;Keyboard controls:tracking changeso:IoXkbControlsNotifyEventrXkbNoteControlsChanges( ) ckXkbGetControlsChanges( )lTXkbControlsRec:allocating and freeing;Controls:allocating and freeing data structureoXkbAllocControls( )t XkbFreeControls( )Xkl%Controls:X library;X library controlsgllControls:booleanoXLookupString( )sLTranslating:single keycode to string;Translating:series of keysyms to stringe0Controls:affecting keycode to string translationpKeycode to string translationsens,ForceLatin1Lookup;Controls:ForceLatin1LookupWConsumeLookupMods;Controls:ConsumeLookupMods;Modifiers:consume lookup modifiers controleLatin1 character set lookupklAlwaysConsumeShiftAndLock;Controls:AlwaysConsumeShiftAndLock;Modifiers:forcing shift and lock to be consumedngControls:affecting compose processing;Compose processing controls;Keysyms:to string translation controls XkbXlibControlsImplemented( )lottXkbGetXlibControls( )nolsXkbSetXlibControls( )tntnXkbKeysymToModifiers( )rlXkbLookupKeySym( )ntlXkbLookupKeyBinding( )trXkbTranslateKeySym( )o( XkbRefreshKeyboardMapping( )oXkbTranslateKeyCode( ) cgXkbGetNamedGeometry( )leXkbGetGeometry( )(sXkbComputeShapeTop( )ydeiXkbComputeShapeBounds( ) XkbComputeRowBounds( ):agXkbComputeSectionBounds( )pXkbFindOverlayForKey( )lnXkbAddGeomProperty( )op;sXkbAddGeomKeyAlias( )XkbAddGeomColor( )onkXkbAddGeomOutline( ) XkbAddGeomShape( )aXkbAddGeomKey( )XkbAddGeomSection( )LXkbAddGeomRow( )hXkbAddGeomDoodad( )fiXkbAddGeomOverlay( )XkbAddGeomOverlayRow( )coXkbAddGeomOverlayKey( )g;XkbAllocGeomOutlines( )toXkbAllocGeomKeys( )CpXkbAllocGeomProps( )tXkbFreeGeomProperties( )tXkbAllocGeomKeyAliases( )nXkTXkbFreeGeomKeyAliases( )KXkbAllocGeomColors( )kooiXkbFreeGeomColors( )aXkbAllocGeomPoints( )XkhXkbAllocGeomShapes( )oaXkbFreeGeomShapes( )kXkbAllocGeomSections( )kXkbFreeGeomSections( )smXkbAllocGeomRows( )kXkbAllocGeomOverlays( )kXkbAllocGeomOverlayRows( )gmXkbAllocGeomOverlayKeys( )pnXkbAllocGeomDoodads( )ndXkbAllocGeomSectionDoodads( )kddAXkbFreeGeomDoodads( )kddoXkbAllocGeometry( )AlXkbFreeGeometry( )ddp XkbGetMap( )dXkbGetUpdatedMap( )m XkbSetMap( )kXkbChangeMap( )kXkbAllocClientMap( )kXkbFreeClientMap( )kXkbAllocServerMap( ) oXkbFreeServerMap( )y XkbInitCanonicalKeyTypes( )t oXkbGetKeyTypes( )  pXkbResizeKeyType( )) tXkbCopyKeyType( )ts(XkbCopyKeyTypes( )linXkbKeyTypeIndex macrooey(XkbKeyType macro oXkbKeyNumGroups macrokre lXkbKeyGroupInfo macrolGe sXkbOutOfRangeGroupInfo macro XkbOutOfRangeGroupNumber macro kXkbKeyGroupsWidth macrokXkbKeyGroupWidth macrosmXkbKeySymsOffset macrokXkbKeyNumSyms macrokXkbKeySymsPtr macroRgXkbKeySymEntry macroyXkbGetKeySyms( )eXkbResizeKeySyms( )lXkbGetKeyModifierMap( )AXkbKeyHasActions macroddoXkbKeyNumActions macro kXkbKeyActionsPtr macrop!tXkbKeyAction macroet"MXkbKeyActionEntry macroa#XkbModActionVMods macro$kXkbSetModActionVMods macroXk%iXkbSAGroup macro&lXkbSASetGroup macro'eXkbPtrActionX macro( iXkbPtrActionY macrot)!oXkbSetPtrActionX macro*"kXkbSetPtrActionY macrot+#pXkbSAPtrDfltValue macro,$yXkbSASetPtrDfltValue macrope-%aXkbSAScreen macrokey.&cXkbSASetScreen macro/'aXkbActionCtrls macro0(fXkbSAActionSetCtrls macrotRa1)pXkbSARedirectVModsMask macro2*pXkbSARedirectSetVModsMask macror3+ XkbSARedirectVMods macro4,mXkbSARedirectSetVMods macrof5-oXkbGetKeyActions( )u6.rXkbResizeKeyActions( )r 7/XkbGetKeyBehaviors( )yac80XkbGetKeyExplicitComponents( )Xk91KXkbGetVirtualMods( ):2MXkbGetKeyVirtualModMap( )key;3XkbGetCompatMap( )Xk<4AXkbUpdateMapFromCore( )=5iXkbKeyTypesForCoreSymbols( )>6mXkbApplyCompatMapToKey( )iEn?7rXkbSetCompatMap( )ti@8 )Compatibility:allocating and freeing mapsoXkA9iXkbAllocCompatMap( )B:kXkbFreeCompatMap( )'C;kXkbGetNames( )D<iXkbSetNames( )crE=!XkbChangeNames( )o mF>XkbNoteNameChanges( )o mG?tXkbGetNameChanges( )H@rXkbAllocNames( )IAlXkbFreeNames( )-JBkXkbListComponents( )KCkXkbFreeComponentList( )LDtXkbGetKeyboardByName( )M \oXkbGetKeyboard( )a)NFkXkbGetDeviceInfo( )mOG*XkbGetDeviceButtonActions( )PHXkbGetDeviceLedInfo( )dsQIXkbAllocDeviceInfo( )SVMRJrXkbAllocDeviceLedInfo( )SKXkbAddDeviceLedInfo( )onTL XkbResizeDeviceButtonActions( )UMXkbFreeDeviceInfo( )VN)XkbSetDeviceInfo( )iWO(XkbSetDeviceButtonActions( )XPkXkbNoteDeviceChanges( )tYQkXkbGetDeviceInfoChanges( )( ZR5XkbChangeDeviceInfo( )mb[SXkbSetDebuggingFlags( )a\TiAllocator, glossary entrya )]U8Audible Bell, glossary entry^Vi"Autoreset Controls, glossary entryp(_W:Base Group, glossary entry;`XkBase Modifiers, glossary entrymeaYrBase Event Code, glossary entryFbZk,Keyboard state:base modifiers;Base modifiersc[ Boolean Controls, glossary entryd\e#Canonical Key Types, glossary entryte]CClient Map, glossary entryf^tCompat Name, glossary entryMg_k#Compatibility State, glossary entryeh` (Compatibility Grab State, glossary entryia!Compatibility Map, glossary entryXkjbe$Component Expression, glossary entrykc(!Consumed Modifier, glossary entry)onld Core Event, glossary entry( meM&Detectable Auto-repeat, glossary entryetnfnEffective Group, glossary entrytog(Effective Mask, glossary entry( phQ"Effective Modifier, glossary entryRqik Extension Device, glossary entryrju(Global Keyboard Controls, glossary entryskaGrab State, glossary entryostltGroup, glossary entry ntumlGroup Index, glossary entryevnl#Groups Wrap Control, glossary entryewoaKey Type, glossary entryxpdKey Width, glossary entrykKeyqsKeysym Group, glossary entryzr[Indicator, glossary entrysry{s"Indicator Feedback, glossary entryy |tIndicator Map, glossary entryery}u^Input Extension, glossary entryM~vkKey Action, glossary entryy wKey Alias, glossary entrybtaxsKey Behavior, glossary entryy,Key Symbol Map, glossary entryonzrKey Type, glossary entry{oKeyboard Bells, glossary entryon| #Keyboard Components, glossary entry}t!Keyboard Feedback, glossary entrytf~f!Keyboard Geometry, glossary entryg(t&Keyboard Geometry Name, glossary entryctiKeyboard State, glossary entryEx Keycode, glossary entryrlKeycode Name, glossary entryLatched Group, glossary entryeryl Latched Modifier, glossary entryrLED, glossary entrynnLocked Group, glossary entryr Locked Modifiers, glossary entrypLookup State, glossary entryqModifier, glossary entryModifier Key, glossary entryy#Modifier Definition, glossary entryy -Non-keyboard Extension Device, glossary entryu^ Outlines, glossary entryk'Physical Indicator Mask, glossary entry,-Physical Symbol Keyboard Name, glossary entrysry"Preserved Modifier, glossary entryryzRadio Group, glossary entryyoReal Modifier, glossary entryyon )Server Internal Modifiers, glossary entry}taShift Level, glossary entryf$Symbol Keyboard Name, glossary entrytSymbolic Name, glossary entrya etState Field, glossary entrysyValuator, glossary entryr Virtual Modifier, glossary entry(Virtual Modifier Mapping, glossary entryl Xkb-aware Client, glossary entryr"Xkb-capable Client, glossary entryed "Xkb-unaware Client, glossary entryies]ConsumeKeysOnComposeFail;Controls:ConsumeKeysOnComposeFail;Composing:ConsumeKeysOnComposeFailMoKIComposeLED;Controls:ComposeLED;Indicators:ComposeLED;Composing:ComposeLED Noa`BeepOnComposeFail;Controls:BeepOnComposeFail;Composing:BeepOnComposeFail;Bells:BeepOnComposeFails!Controls:effecting event deliveryc SeJIgnoreNewKeyboards;Controls:IgnoreNewKeyboards;Keyboard:IgnoreNewKeyboardsryzControls:library controls maskse;Controls:determining which library controls are implementedio3Controls:determining the state of libarary controlsf/Controls:changing the state of library controlsN6Events:interpreting key events;Key events:interpretingtrKeymap:functionst[Modifiers:finding modifier set bound to keysym;Keysyms:finding modifier set bound to keysymejKeysyms:finding symbol for key with a particular state;Keys:finding symbol for key with a particular stateCll1Keyboard description:updating library descriptionCtrsKeycodes:translating keycode to symbol and modifiers;Keysyms:translating keycode to symbol and modifiers;Modifiers:translating keycode to symbol and modifiersOn FG14573: 3Heading: 17.1.1 Xkb State to Core Protocol State TransformationmKeyboard:geometry;Geometryve fv+Geometry:rotated keyboard sections, diagram: lK#Geometry:priority;Priority:geometryz'Geometry:top-level geometry descriptiono=Geometry:list of colors;Colors:listed in geometry descriptionoCodGeometry:propertiesomy6Geometry:key aliases;Key aliases:geometry;Keys:aliasesryl$Key aliases:names array;Keys:aliasesyGeometry:shapes;Shapese.Keyboard:symbolic name;Names:symbolic keyboarderuKColors:keyboard, key label;Geometry:keyboard color;Geometry:key label color: ayBGeometry:key label font;Fonts, key label;Keys:label font and colora lNKeyboard:geometry sections;Geometry:sections;Geometry:doodads;Sections;Doodadssd1Shapes;Outlines;Geometry:shapes;Geometry:outlinesy:ti'Outlines:primary;Outlines:approximationeaSections;Geometry:sectionsifn5Priority:sections;Geometry:priority;Sections:prioritytolTGeometry:rows;Rows:geometrybeDGeometry:doodads in sections;Doodads:in sections;Sections:doodads inKAGeometry:overlays;Sections:overlays;Overlays:in geometry sectionsleoe2Geometry:bounds, keyboard;Bounds:keyboard geometryisg.Geometry:rows;Geometry:keys;Rows;Keys:geometryiem%Geometry:bounds, shapes;Bounds:shapesgmes)Geometry:bounds, sections;Bounds:sectionsaKes7Keys:geometry, drawing order;Geometry:key drawing orderd Doodads;Geometry:doodads8WKeys:getting per-key modifier map from server;Modifiers:getting per-key map from servert?9 Server map:keyboard mapping @Zt Keys:actions;Key actions;ActionsA;eXkbServerMapRecB_cXkbAction data structureC`bXkbAnyAction data structurecD1eXkbSA_LockDeviceBtneEXkbPtrDfltAction data structuregF5rXkbModAction data structureoG:=Action modifiers;Modifiers:changing the state via key actionsingHD XkbISOAction data structuretIEpBModifiers:action types, table;Actions:modifier action types, table lJFK;Modifiers:action flags;Actions:modifier action flags, tablesKG;VActions:for changing current group state;Groups:changing current state via key actions3LHeXkbGroupAction data structuredypMIBActions:group action types, table;Groups:group action types, tableanNJ6XkbSA_LockGroupnOKb9Actions:for moving the pointer;Pointer:moving via actions;diPLeXkbPtrAction data structureWQMiGActions:pointer action types, table;Pointer:pointer action types, tablerRN9jActions:for simulating pointer button press and release;Pointer:simulating pointer buttons via key actions_SOkXkbPtrBtnAction data structureXkTPiTActions:ponter button action types, table;Pointer:pointer button action types, tableUQActions: for changing button number simulated by mouse keys;Pointer:changing button number simulated by mouse keys;MouseKeys:changing button number simulated by mouse keysrVRtTActions:ponter button action flags, table;Pointer:pointer button action flags, tableWSdXkbActionMessageXT`Actions:for locking modifiers and group;Modifiers:locking via actions;Groups:locking via actionsYUeWActions:for changing the state of modifiers;Modifiers:actions for changing the state ofoZV Actions:ISO action flags, tableo[WNActions:for changing active screen;Display, actions for changing active screenXk\Xi$XkbSwitchScreenAction data structure]Yc)Actions:switch screen action flags, tablep, ^ZActions:for changing state of boolean controls;Controls:actions for changing the state of;Boolean controls:actions for changing the state of_[sXkbCtrlsAction data structureoer`\ JActions:controls action types, table;Controls:controls action types, tableona]c?Actions:for generating messages;Messages:actions for generatingtb^rXkbMessageAction data structuresc_ #Actions:message action flags, tablerd`tLActions:detecting key action messages;Messages:detecting key action messageseaXkbActionMessageEventafbActions:for generating a different keycode for key;Keycodes:actions for generating a different keycode for key;Keys:for generating a different keycode for key;Keycodes:actions for generating a different keycode for keyacgca#XkbRedirectKeyAction data structurenhdv:Modifiers:in actions to generate different keycode for keyiieiActions:for generating DeviceButtonPress and DeviceButtonRelease;Devices:actions for generating DeviceButtonPress and DeviceButtonReleasetlsjfl!XkbDeviceBtnAction data structure;olkgt"Actions:device button action typeslhskActions:for simulating events from device valuators;Devices:actions simulating events from device valuatorsym o e34216: TableTitle: Table 1.1njs^Actions:obtaining actions for keys from server;Keys:obtaining key actions for keys from serveronokg\Actions:changing number of actions bound to key;Keys:changing number of actions bound to keypleKeys:behavior;Behavior:keyssqma Radio groupsrnoXkb_RGAllowNonefsoyRadio groups:namesactpoXkbBehavior data structuredeuqy3Behavior:key behaviors, table;Keys:behaviors, tableovrnXkbKB_Permanentawst]Keys:obtaining key behaviors from the server;Behavior:obtaining key behaviors from the servero txtavComponents, explicit;Server:avoiding automatic remapping by;Remapping:avoiding automatic by server;Explicit components fyurExplicit component masks, tableezveExplicitKeyType1{wBExplicitKeyType2|xlExplicitKeyType3}ytExplicitKeyType4~zsExplicitInterpretang{ ExplicitAutoRepeatDe|cExplicitBehavior}mExplicitVModMapy~eJModifiers:virtual modifier server mapping;Virtual modifiers:server mappingroriServer database:obtaining virtual modifier bindings from;Virtual modifiers:obtaining bindings from servereKeg,Server database:virtual modifier definitionsv'Xkb:compatibility map;Compatibility:mapsoHClient types:Xkb-aware;Client types:Xkb-capable;Client types:Xkb-unawarec&Compatibility:types of transformationstasCompatibility:data structuremXkbCompatMapRec]i=Compatibility:Xkb state to core protocol state transformationis eJCompatibility:core keyboard mapping to Xkb keyboard mapping transformation bp$Compatibility:symbol interpretationsnXkbSymInterpretRecico9Compatibility:symbol interpretation match criteria, tablexicp1Compatibility:setting explicit component controlseypzKCompatibility:Xkb keyboard mapping to core keyboard mapping transformationst1Compatibility:setting explicit component controlstl r1Compatibility:setting explicit component controlsoe0Compatibility:getting map components from serveru)Compatibility:using the compatibility mapeKeg[Key types:canonical, used in compatibility map;Canonical key types:used in compatiblity map:1Compatibility:setting explicit component controlslClp'Compatibility:changing the servers mapya)Compatibility:tracking changes to the mapatrXkbCompatMapNotifyEvent]iXkbAddSymInterpret( )ttor XkbKeyNameRecafoiNames:symbolic;Symbolic nameseeyaXkbKeyAliasRecarn XkbNamesReciKeyboard:namesy:iKeys:symbolic namesm!Names:symbolic names masks, tablely:i(Names:getting symbolic names from servero'Names:changing symbolic names on servernpXkbNameChangesRecly:bNames:tracking changesarnXkbNamesNotifyEvento+Names:allocating and freeing symbolic nameslKeyboard:replacing on the flyliteXkbNewKeyboardNotifyt]Key events:Xkb filtering out-of-range keycodes;Keycodes:Xkb filtering out-of-range key eventseKegXkbNewKeyboardNotifyEvent ci4Server database;Keyboard:components, server databaseServer database:component namescc+Server database:listing keyboard componentst"Server database:class(member) formngsXkbComponentNamesRecmXkbComponentListReckXkbComponentNameRecrServer database:component hintsec XkbLC_Hidden XkbLC_Defaultaec XkbLC_PartialeXkbLC_AlphanumericKeysisXkbLC_ModifierKeysm:XkbLC_KeypadKeyslXkbLC_FunctionKeysttbXkbLC_AlternateGroupo2Keyboard description:building from server databaseXka)Groups:bindings for alternate group hintssarn*Modifiers:bindings for modifier keys hintstifKeys:bindings hintslWant and need components, table e34741: Figure: Figure 20.1t vAServer database:building a new keyboard description from, diagram--ryInput extension:attaching Xkb actions to devices;Devices:attaching Xkb actions to;Xkb:attaching actions to input extension devicesatoWant and need components, tabledi&Feedback, types;Device feedback, typesersKeyboard:feedbackmngsKeyClassRIndicator feedbackneeKeyClassmKeyClass XkbXIDfltIDdoXkbDeviceInfoReckXkbDeviceLedInfoRec a2Devices:querying features for non-KeyClass devicesphcPDevices:querying indicator information;Indicators:querying names, maps and staten#Devices:querying for button actionspofy  ,<$paranum[1Heading]> <$paratext[1Heading]>u  <$curpagenum>i <$lastpagenum> <$monthname> <$daynum>, <$year>eti <$monthname> <$daynum>, <$year># ;<$monthname> <$daynum>, <$year> <$hour>:<$minute00> <$ampm>_ "<$monthnum>/<$daynum>/<$shortyear>  (Continued)' + (Sheet <$tblsheetnum> of <$tblsheetcount>)tne  <$fullfilename>eeo "<$monthnum>/<$daynum>/<$shortyear> -<$dayname>, <$monthname> <$daynum01>, <$year>"  ProtoRevisionp1.0a  DocRevisiona1.1 q  LastRevision951201EF ) Pagepage <$pagenum>tls Heading & Page <$paratext> on page<$pagenum> Section & Page%section <$paranum> on page <$pagenum> See Heading & Page%See <$paratext> on page<$pagenum>.  Table & Page<$paranum> on page <$pagenum>N  <$filename>  <$marker1>  <$marker2>  Figure & Pagei8Figure<$paranumonly>, <$paratext>, on page<$pagenum> Section$Section <$paranumonly> FigureFigure <$paranum>uag AppendixAppendix <$paranumonly>mo  Section Name <$paratext>Ӓ sectionmsection <$paranumonly> ChaptertChapter <$paranumonly> Paragraph Number <$paranum> Tablen <$paranum><$ Paragraph Name <$paratext> page number only <$pagenum> ) I ) a ] P QA$or P P QADo P uuQAge QIXge QLOF> QLOTa vvP QArex QTOC  wwP QA  `P aP bP cP dP q  P r  P s  P tP uP vP wP xP yP zP {P |P }P ~P P P P P P P P   P !!P ""P ##P $$P %%P &&P ''P ((P ))P **P ++P   P   P CCP DDP EEP P P PLkkPMllPNmmPOnnPPooPQppPRqqPSrrPTssPUttPVuuPWvvPXPePfPgPhPiPjPkP*PYP}P~PFFPGGPHHPIIPJJPKKPPP 9  k     P !  " ,P1.4 # qo $  % d & P '  ( .P ) s *  + t ,  -  . P /  Figure 1.1 0  1 .P 2 . 3 . 4 ' 5 ' 6  7 P 8 ^ 9 P :  ; . < ,1.3 = . > . ? .P @ . A ,1.2 B ,1.1 C ,P1.5 D H E  F  G ,2.1 H ,2.3 I  J . K . L . M . N ^ O 5 P  Q  R 4 S ,q2.4 T  U  V q W ,2.2P X  Y  Z   [   \   ]   ^   _ 1  `   a   b  c / Table 10.2 d <'17 e  f P g   h P  i   j 0  k   l 5  m   n P  o   p   q   r 1  s ,/ t  .R u   v   w  ,  x / Table 10.3  y  z  ! { . " | . # } . $ ~ . %  . & ,2.5 '  ( ^ ) 5q * * + ,2.6 , q -  .  /  0  1  2  3 / Table 10.4 4  5 1 6  7 / Table 10.5 8  9 e :  ' ;  <  = 0P > 0 ? e @ ,1.7 A ,1.6  B 0  C ^  D   E   F   G   H e  I / J ^.R K . L . M   N _1.3 O / 4, ., . S . T 0. U 0. V 0, W 1.3.2, 1 eq1 ^ [ 0 \ , ] 0P ^ 0. _ 0/ ` 00 a 01 b I2 c 3 d : e 0 f 01 g 0 h Ta i  j  k  3.1 l  m  n 0 o 03.2 ? p  @ q 7 r , s  t  ^ u  v  w  x 3.3 y e z  { ^ | .3.4 L }  M ~  N  .3 3.5 4     13.6 00 0  , 1 i1 i [ i \ i ] i ^  _ : ` . <22   :  0  0 <119 h i1 j <k7    7.4 ? @ <3, 0s ;t 0u ;v  w7.1    y7.2    7^  .  }  V~Note 5 * *4 *   VNote  67.4.1    <6  ,  1  1  6.1 i  \ i  7] i  ^  _ :  9` Table 6.2   22    :  :  : ;< ! ;h " ;i # ;j $ ;k % ; & ; ' ; ( ; ) ; * ;? + ;@ , ;3 - ;0 . ;; / ;0 0 ;; 1 ; 2 ; 3 ; 4 ; 5 ; 6 ;^ 7 <.4 8  9  : 4.1 * ;  * <  * = a Table 4.1 >  ? 6 @  A  < B  C  D  E  F 1 G  H 7 I  J  K 9 L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z   [   \   ]   ^   _   `   a   b  c  d  e  f  g 4.2^  h .  i   j   k   l 4.3  m *  n * a  o  4.  p ^  q 6  r   s   t   u   v   w   x   y  z ^7 ! { i " |  # } 9 $ ~  %   &  '  (  )  * 4.3.1 +  ,  - f Table 4.2 .  /  0  1  2  3  4  5  6  7  8  9  :  ;  <  =  >  ?  @  A  B  C  D   E   F   G   H   I   J   K 4.4 L  M " N  O $ P ; Q  6.27 R ^i S 5 T *9 U * V * W  X  Y  Z 6.3  [ 1 \ 6.4 , ] ^ - ^ 5bl _  `  a  b e  c g  d   e ^  f 5  g *  h *  i g  j   k   l >  m >  n >  o >  p >  q >  r  Figure 16.2 s 5 t * u *  v *  w   x   y @  z   {   |  } <L5 ~ "   Figure 5.1 5.12 2 72  . .9 .    -    1  ] ^ _ '` 'a 'b c d 3e1. f 32. * g . . > 4> > 4> > >2M 2N . s  t .  .  .   x  5.2  gz  {  5|  *}L  *  *  *i.1    ^  5  *^  * .  * .  * .    g   -  5.2.1     j Table 6.1  ]  :^  :_  ;`  ;a  ^b  5c  *d  *e ! * f " * # * $ * %  . & 5.2.2 ' U> Table 5.2 ( 6> ) > * > + 0> , 0M - 0N. . 0 / 0 0 0 1 0 2 0 3  4 ^ 5 5 6 * 7 * 8 * 9  : ^ ; 5 < * = * > * ? i @ 5.3 A  B ~ C ^ D 5 E * F *. G *  H Ta I  J ]5.4 K : L ; M U; Table 5.3  N b 5 O c * P d * Q 0e * R 0f * S 0 * T 0 * U 0 V 0.  W 02 X 0U Y 0 Z 0 [ 0 \ 0 ] 0 ^ 0 _ 0 ` 0 a 0 b 0 c 0 d 0 e 0 f 0 g 0 h 0 i 0 j 0 k 0 l 0 m 0 n 0 o  p  q  r 3 s 7 t ~ u ^ v 5 w * x ** y *7.3 z 7.5 !{ ] "| A #} 7.6; $~ ; %  & 4b 5 ' c * ( d * ) 4e * * f * +  * ,  * -  . .  / 2 0 U 1  2  3  4  5  6 . 7 . 8 . 9 . :  ; < 12 <  =  12.2 > ^  ? 5 @ * A * B  C ^ D 5 E  F  G  H  I  J  K ^~ L 5^ M *5 N < 11 O * P  Q , 11.1 R | S ] 11.1.1 T  U $ 11.1.2 V  & W  ' X  ( Y  ) Z  * [  11.1.3 \  ] , 11.2 ^  / _  0 `  11.2.1 a  b  c  d  11.2.2 e  . f  . g  . h  11.2.3 i 12 j  k , 11.32 l ^ m 5 Table 11.1 n  * o  p  ^ q 0 5 r 0 s 0 t 0 u 0 v 0 w 0 x 0 ^ y 0~ 5 z 0^ * { 05 < | 01 O } 0 P ~ 0 Q    11.4.1  ^   5.1  *    2 11.4.2  ^  5  *     11.4.31  ^  5,  *  */  *0   .1  *  *  *  *  *2 e  ^ f   g  5 h  * 11  *i  *j  *k  *3 l   m  ^e  5n  *o  p  q  ^r  5s  *t  *u  *v  *w  *x  y~  z16.2.1   |  = }  7 ~   Table 19.1  1    :  :  < 9   .2  ^  .5  .*  .    3       9.1/  0  { Table 9.1    :  :  ;  ;  ; ! ; " ; # ; $ ; % ; & ; ' ; ( ; ) ; * ; + ; , ; - ; . ; / ; 0 ; 1 ; 2 ;0 3 ; 4 ; 5 ; 6 ;16 7 ; 8 ; 9 ; : ; ; ; < 1 =  9.2 : >  : ?  < @  A  9.3^ B 5 C g* D g E g F ,2.7 G <2 H  I  2SJ  K ;{ L  M  N m Table 9.2 O ; P ; Q ; R ; S ; T ; U ; V ; W ; X ; Y ;Z ;[ ;\ ;] ;^ ;_ ;` ;a ;b ; c ; d ; e ; f ; g ;h ;i ;j ;k ;l ;m n  o : p <:8q r s  t 8.1u v 8.2w x 8.2.1 y   z C !{ D"| {#}  $~ 8.2.2%  & E;' ;( .;) .;* .;+ .;, ;- ;. ;/ ;0 ; Table 8.1 1 9;2 :;3 :;4 H;5 ;;6 H;7 ;;8 H;9 ; ;:  ;;  ;<  ;=  ;> ;? ;@ ;A C;B C;C CD CE C:F J:G J H  I C J C K CL CM CN KO P r. Table 8.2 Q 9  R :!S :"{T H# U ;$V H.W ; X H;Y ;;Z H;[ ;;\ H;] ;;^ ;_ r; Table 8.3 ` /;a 0;b : c :;d :;e H;f N;g ;;h H;i N;j ;;k H ;l N ;m ; ;n H ;o N ;p ;;q H;r N;s ;;t H;u Nv ;w :x :y  z P { P | P } P~ P P Q  . Table 8.4     :! :"{ H#  ;$ H. ;  H; ;; H; ;; H; ;; H; ;;Ta   ; Table 8.5    ; :; :; :; H; N; ;; H; N ; ; ; H ; N ; ; ; H; N; ;; H; N; ; H N: ;:     S  S  S S S S S S.Ta S  S : S : S{ H S ;  H 8.3 H ;8.3.1 H ^ ; 5 H * ; * H * ; a  8.3.2Ta ^  5 ! *; :" *; :# *; :$ ; H% ; N& ; ;' ;8.3.3;(  ;) ^ ;* 5 ;+  ;,  ;- ;. ;/ ;0 ;1 ;2 3 4 :5 :6 8.4 7  S8 8.4.1 9 : ; < = > .Ta?  @  8.4.2A ^{B 5 C *D *E *F G g8.H 8.4.3I ^J WK WL WM YN 58.O P Q ;R ;S ;T ;U ;V ;W ;X .;Y  ;Z  16.2.2[ 8.4.4\ ] D^ _ ^` 5a b  c  d  e  f 4 g h i 8.5j k l m n .o p  q ^.r 5{s * t *u *v w ^x 58.y ] z ] ^!{ ] W"| ] W#}  W$~  Y% 8.6& ^' 5( *) * ^+ 5, *- . / 0 1 2 23 8.4 5 6  9.3.17 ^8 59 *: * ; * < * = * > * ? *@ gA 5B C D E ^F 5G *H *I *^J *5K *L *M *N  9.3.2 ^O  5P . ]Q ^ ]R 5^ ]S *W ]T *W U *W V *Y W *X *Y *Z [ \ ^] 5^ *_ *` *a *b c d 2e  9.3.3f ^5g 56h *.i *j *k *l * m * n  o  p ^ q 5r *s *5t u v w  9.4 5x  *y g *z g *{ g *|  } g ~ g  g  2 c  q^ ,521.1 :T U V 1W 1X Y Z [ \ ] ^ _ ` a b VNote ^  5  *3 *^ *5 ** ** ** ** ** *   ^ 5 * 0* 1 1 0 1  15  0* g 1* g 1* g 0*   g  g . 5  ` Table 21.1   ^ 5  : : : :  ; ; 0 ; ; ; g  g g! g ^" g 5# g *$ g *% g *& g *' g *( g *) g ** g *+ g , g - g . g / g 0 g 1 g 02 g 13 g 14 g 05 g 16 g 17 g 08 gg 19 gg 1: ,g 11.4; g< g= .> e5? ;`@ ;1A ;B ;C D ;E ;F ;G ;H ;I ;J ^K ;L ;M ;N ^O ;P 5Q ;R ;S ;T ;U ;V ;W ;X Y Z [ \ *] ^ _ i` ia ib  c i d i e i f  g ih ii ij ik <189l 1 ,m n 18.1<o  p  eq i ;r  ;s > ;t > ;u > v > ;w > ;x > ;y > ; z > ;!{ > ;"| > ^#} > ;$~ > ;% > ;& > ^' > ;( > 5) > ;* > ;+  Figure 17.1 , - . >/ >0 >1 >2 >3 >4 >5 >6 >7 >8 >9 >:  Figure 17.2 ;  <  1.= 4> 4i? i2.@ 4A 3.B 4C 1 ,D 17.1nE F \ G > eH > ;I > ;J > ;K > ;L > M > ;N > ;O > ;P > ;Q > ;R > ;S > ^T  ;U  Figure 17.3 V & Table 17.1 W (X 17.1.1Y >Z [ .,\ -] 17.1.2^ >_ 3>1.1 >` 1a.a 1b.b <514c >d >e >f ,>14.1g reh -; i -< j - 4k  4l  m V.Noten  o . Figure 14.1 p q 14.1.1nr s  t  eu 14.1.2v Jw K2U L2u Mz N{ O| ,P14.2}  ;~ ^ ; 5 ^ * ; *Fi *  a.1   Table 14.1       :2^ :_ : :` : :  < ;4c ;d ;e ;f ;.1  ;- ;- ;- ; ; V ;n ;o. ;e ; ;   ;  ;  ;e  ;.2 ;  ; ; ; ; ;,   ;; ^ ;; 5 ;^ * ;; * ;i *   ;1  ;  ;a.1 ; ;  ; ; ;: ;: ;: : : : q ; ;! ;" ;# ;$ ^% ;& ;' ;( V;Note) * V+ n, eo.- e. / 0  1 VNote2 |3 4 5 6 VNote7 0 ;8 | ;9  ;: VNote; ;< ;= ;> ^? ;;@ iA B 1C ;D 1aE 0F ;G 1H 0I ;J 1:K 0:L :M b Table 16.12 N  O : qP : Q  R  S 5 T * U * ^V * W  X  Y ,14.3Z ;[ 5V\ n] o^ e_ B 13` a 2b V3c  Figure 131 3d  e  f  1. g  2.;h  3.i Vj k .l .m 'n 'o .p VNoteq .r ;s .1t .0u .;v .12w 0x ;y 1 z 0 Figure 13.2 !{  13.1 "| #} .$~ .% .& .' ( .) .* .+ ., - .  13.2/ 0 .1 .2 .3 .4 . 5 6  Figure 13.3 V7 .8 .19 .:  13.3; < =  13.4> ? @ A .B .C .D .E .F  13.5qG  H  .I  .J ; .K  .L  M ; Table 16.1 N 1O 0FiP !Q  .1R 1S .T . 13.7U &V >'W (X )Y >*Z >+[ >,\ >-] >.^ > .2_ >` >.a >.b >.c .d >.e >f >g >.h i >1j >k l ;m <n >=o >4>p >?q >@r >As  Figure 13.4 t >u v w >x >Gy >Hz >I{ >J| >K} >L~ >M; >  >1 0Fi  Figure 13.5  >1 > >  >  >& > >'  >(  >) > * > + > , > - > . > 2 Figure 13.6 ` a b c d e ef g h i 5j k l m n o p q r |s re  >      >  >  >  >  >  >  >  > ; 2v ^1 0 : 0e  :> :> :> > > ;> ;> ;>2 ^      .` a b c! d" e# f$ qg% 2h&  13.8' j ( ^k ) 5l * |m + n , o - ^p . 5q / r |0 s 1 e 2 > 3  13.94 5 6  Figure 13.7 7 ^8 59 1: 0; ;;< ^ ^= 51 > |0 :?  0@ <  10A >B e>C  Table 10.1 D E F G g2H gI gJ gK gL gM gN gO gP gQ gR gS gT gU eV eW i .8X  10.1Y eZ  10.1.1[ e\ ^] ^^^ 55_ e` ea b  Figure 10.1  c  10.3.1 d e e e f e  g ^h 5i 1j e0k ;l m 5n |o p < q er s t  u tv tw x 2y  z !{ "| #} 4$~ 4% 4& 4' 4( 4) 4* e+ e, ;- ;. V Note/  .10 e1  2 13 54 *5 *6 *7 *8 e9 e: ere;   10.1.2< e = e > ^ e? 5 ^@ *5A *1B *0C e;D E 05F *|G *H *<I *J eK eL k M eN kO eP kQ eR k S e!T " 10.2U eV  10.2.1W e&X ' 10.3Y eZ  10.3.2[ e+\ e,] ^-^ 5. _ * ` *1 a * b * c e 5d e *e 5 *f * *g * *h * ei * ej e ek ee l ;.2m ;en e 10.4o e?p e@q eAr  10.5s eCt D 10.5.1u eFv eGw VNotex < 10.5.2y ez {  | } ~      ! " U V e0 g& ' 10.3.3 Z  10 [+ \ ] ^ _ `1 a b  c ^d ;e f 10.6 e * n e  10.6.1 eke el me 5ne 4 ep eq  10.6.2 e e2  2 s.1 e ;e ;V 8x< 80 8 8 8  8 8  ^  ;  8! 8" 8U 8V 80 8& 8' e  eZ  0 10.6.3 e\ e] ^ _ `1 a b  c d e! f" # $ % 0& ke' l( me) ne* 4+ p, q- .  e/ ;e 0  s1  2 ; ;3  ;4  85 < 86  87  88  89  8:  8;  <  ^=  >  ;?  8@  8A  8B  8C  8D  8E  8F  eG  eH  I e.3J eeK e 10.6.4L i M e N 1 O e P  Q  R  S  T  U  V  W  X  Y e Z  [ e \ e ]  ^ p _ q ` e a e ;b i  c is  d i ; e i;  f i;  g i8 h 8 10.6.5i  8j  8k  8l ^ 8m * n  ^o  p  ;q * 8r  8s  8t p 8u  8v  8w  8x  ey  10.6.6 z e!{ ee"| ^e#} 50$~ * % 8 & 81 2 e ( ^ )  * 8 + 8 , 8 - e .  10.6.7/ e0 ee1 ^2 e3 8e4 85 8p6 eq7 ^8 e9 8: 8 s; 8< e ;=   10.6.8> e? e 10@ eA eB e C D eE ^F G 8H 8I 8J eK ^L M 8N 8O 8P 8Q e0R  10.7{S ee ^T ee 5U  10.7.1V e W e1 X .Y s Z .[ s \ .2 e 3\ 2 _  10.7.2` ea eeb ec  10.7.3d e4e e5f 6 10.7.4g e8h e9i  10.8j e;k e< l t= m 0n eo /  Table 10.6 p Aq Br Cs Dt Eu Fv Gw Hx Iy gJz uK{ vL| wM} gN~ gO gP xQ0 ;R g7S gT uU x 10 ;V gW1 gX gY  vZ ;[ y\ g u\ x_ ;0 g ge u x ; e g e g  u.4 ue ze g  g e u e u t z  y e g / ga.6 v ; g g u u z g g ug uu zv gw gg ug xg ;x g; gg ug xu ;x g; gg gg vg ;v y; gy gg vu ;x y; gg ug uu! zx" g;# gg$ ug% vu& ;u' gz( gg) ug* xu+ ;u, gz- gy. ug/ vg0 ;v1 g;2 eg3 /g Table 10.7 4  u5  z6  g7 : g8 : u9 : u: : z; ; g< ; g= ; u> ; x? g ;@ u gA u gB g uC g xD u ;E u gF g gG g gH u vI u ;J g yK g gL u gM u vN g ;O g yP u gQ u uR g uS g zT u gU u gV g uW g vX u ;Y u gZ g g[ g u\ u x] u ;^ g g_ g g` g ua u vb g ; c g g d g e e u / f ga.7 g gh gi uj g:k g:l g:m u:n g;o ;;p ;;q ;;r gs ;ut ;uu ;gv gw ;ux ;uy ;g z g!{ ;u"| ;u#} ;g$~ g% ;u& ;u' ;g( g) ;u* ;u+ ;g, ;g- gu. gu/ ug0 gg1 gu2 gu3 ug4 gg5 eu6 7 eg8 g9 eg: u; eg< /g Table 10.8 = e u> / g? 7 g@ g gA g uB g gC g gD g gE g uF e gG  ;H e ;I  ;J e K  ;L e ;M  ;N e O  ;P e ;Q  ;R e S  ;T e ;U  ;V e W / Table 10.9 X uY gZ g[ u\ u] gg^ gg_ gu` gua ggb ggc gud gue ggf ggg guh gi ggj ggk ggl gum ggn ggTao g p gu q gg r gg gs gg gt gu gu gg gv gg gw gg gx gu ey gg z g; e{ g; | g; e} g ~ g; e g;  g; e g  g; e g;  e; e e  t; e e;  e; e e / ea.9 e  e  e g 10.9 ^_ 5` *a *b *c ed ee ef eg eh  10.10 ^jg 5kg *lu *mg *ng eo epu eqg erg s 10.10.1 eu ov ew ^x 5y ?z ?{ ?| e}  10.11 ; ;  e; ; e; e VNote e e ;e e ge ; ue v ;e ;   ^ ;_ 5 g` * ;a * ;b *! c e" ;d e# e Table 13.1 $ g% h& ' j( k) l* m+ ^n, 5o- Lp. Lq/ r0 es1 0 Table 2.2 2 L3 L4 L5 6 7 8 9 : ; 1< = 0> 0? ^@ 5A ?B ?C ?D eeE ^eF 5eG *eH *eI *J eeK eL e 10.12M ^ N 5^ ;O *5 gP ** ;Q e* ;R e* S ^e ;T 5e U [a.1V [W [X e5Y eZ ^[ 5\ |] |^^ |5_ L` ^La 5b |e c | d   e ^ f 5 g |h |i |j k  13.10l m 1n ^o 5p |q |r |s t ^u 5v |ew |ex |ey e z ^e!{ 5"| |e#} |$~ |e% 1& ^' 5( |) |* + ^, 5- |. |/ |0 1 ^52 53 |4 5 ^6 57 |8 |9 |: |; | <  = ^ > 5 ? | @ |A B ^C 5D | .1E |F |G ^H ^5I 5|J ||K ||L |M ^N ^5O 5|P ||Q ||R |S ^T ^5U 5|V ||W ||X |Y ^Z 5 13.11[ )\ ^*] 5+^ |,_ |-` .a ^/b 50c |1d |2e 3f ^4g 55h |6i |7j 8k ^9l 5:m |;n |<o 2=p 2>3] 2?r ^@s 5At |Bu |Cv Dw ^Ex 5Fy |Gz |H{ |I| |J} K~ ^L 5M |N |O P Q 5R |S |T |U |V W X 5Y |Z | .1  ^ 55 || ||  ^ 55 || || | |^ 5 | 5| | |^ 5 | 5| |2 |2 |2 |^ 5 | 5| | |^ 5 | 5| || ||  ^ 55 || ||   55 || || | | 5 | |5 | | 5 | |5 | | 5! |" |5# ||$ % |& 5|' ( ) 5* |+ 5|, |- |. |5/ |0 |1 |2 |3 4 5 514.3.16  |7 7 8  9  Table 14.2 : |; |< := :^> :5? |@ ;|A ;B C ;5D ;|E |F ;|G ;|H I ;J ;5K |L ;|M ;N O ;5P ;|Q |R ;S ;T 5U ;|V ;W ^|X 5|Y Z [ 5\ |] |^ _ ,14.4.`  a  b   c   d   e   f   g ,14.5h i j k 14.5.1l ^m 5n o  Table 14.3 p q :;r :;s 0t ;u 0;v ;w 0;x ;;y ; z ;;!{ ;"| VNote#} |$~ % 14.5.2& ^|' 5|( *) ** *5+ |, - 14.5.3. ^/ 50 1 2 3 4  Table 14.4 5  6 : 7 : 8 0 9 ; : 0 ; ; < 0 ,= ;> 0? ;@ VNoteA 14B C 14.5.4D ^E 5e F *G *;H *;I J 1c.K L sM N sO 1d.P 1e.Q 4e#R 2.S <15T  ^U | 5V | *W X  *Y >5 Z >| [ > \ >.3] >^^ >5_ >` >a >b >c >d >45e >6f  Figure 15.1 g ,015.2h :i ;j <k =l >m ?n @o p 14q r  Table 15.1 s t :e u :v ;;w ;x y z  {  s|  }  s~   1d  eQ R  S   ^  5  *    * >  >  >  > 3 >  >  >  >  >  > ; > 0 > 5 > 6  ViNote  0 h15.2.1 j k l @m n o p @q r e  s .t .u .v .w x @y z { | } .~ . . .  @ S  ^^ 55 *  *   15.2.2 ^ 5     VNote! > " > # 15.2.3o$ ^% 5& 1' ( ) * + , - . / 0 15.2.41 ^.2 5.3 *.4 *.5 6 5@7 *8 *9 *: ; ,.15.3< = > ? @ 7A B 15.3.1C 5D VNoteE 5F **G *H *I eJ 5 ^K * 5L * M * N e O 15.3.2P  11.3.1!3^Q  R  S  Table 15.2 T  5U  V  W 0 X 0 Y 0 Z 0 [ 0 \ 0 ]  ^ 5 _ * ` *.4a e^b 55 c ** d ** e e f 55 g **4h g*i * 16.1.10j * ,k el 15.3.3m n 15.3.4o p 4q 15r 5s 5t * 5u * *v e* *w 5 *x * ey * 5 z *^ *!{ e5 *"| 5 *#} * e$~ * % e.2& 5 ' *13^( *) e* 5e + *, *- e. 5/ *0 *1 *2 *3 e4 15.3.55 ^6 57 *8 *9 * : * ;  <  =  > 15.3.6? @ 1A *B *C *15D *E *F *5G H I 15J 45K L  Table 15.3 M *N O P 0Q 0 ^R 0!5S 0"T 0#U 0$V 0%W 0&X '1Y (15.3.7Z ^*[ 5+\ *,] *-^ *._ /` 0a ;1b 2c VNoted ,15.4e 55f 6g 15.4.1h ^*i 5*j **k *l *m *n o 6?p @q 2a.r *2b.s 5 *t  *u  *v  w  x  y 5 4z 5 {  | a.3} ~   0 0 0 0 0 0 0 0  17.1.33 ^ 5 * * *   ;17.2 c 5 * *e5 *f g 5 * * *17.3  * ^ * 5  *  *?  *@  *2a * *bs t u ^v w x y z { | ;} ~ ^ 5 * * *  17.4 ^0 50 * * *7 *^ 5 * * *17.5      c  ! e5" f# g$ 5% * Table 17.2 & *' 3( ) * + , - . / 0 17.61 ^2 53 *4 *5 *6 7 8 9 : ; ^< 5= *> *? *@ A B 4C D VNoteE  *F .G  *H  I ; J  K  L M 18.2N  O ) Table 18.1 P Q R e5S :fT :gU :5V :*TaW ; X ;* Y ; Z ; [ ; \ ; ] ; ^ ; _ ; ` ; a ; b ; c ; d ; e ; f ; g ;h ;i ;j ;k ;l ;m ;n ;o ;p ;q ;r ;s ;t ;4u ;v ;tew ;x ;.y ; z ;!{ ;;"| ;#} ;$~ ;% ;& ; ' ; )( ;a.1) ;* ;+ ;, ;:- ;:. ;:/ ;:0 ;;1 ;;2 ;;3 ;;4 ;;5 ;;6 ;;7 ;;8 %;9 ;: ;;; ;;< ;;= ;18.3> ^ ? 5 @ *A *B *C .D E F G H *18.4I ^J 5K *L *4M *N *O *P .Q R  S !;T "U #V F$ Table 18.2 W &X 'Y (Z :)[ :*\ :+] :,^ ;-_ ;.` ;/a ;0b ;1c ;2d ;3e ;4f ;5g ;6h ;7i ;8j ;9k ;:l ;;m ;<n ;=o ;.3p ;^q ;5r ;*s ;*t ;*u ;.v ;w ;x ;y ;z ;{ ; ^| ; 5} ; *~ ^ * 54 *  *  *   .  18.5    F 2W ^X 5Y Z [ \ ] ^^ 5_ ` a b c <16 3 ; e4 ; q5 ; 6 ; 7 ; >8 ; >9 ; >: ; >; ; >< ; >= ; >3 ; > ; > ; > ; > ;  Figure 16.1  ,16.1  ;  ;  ;  ; ^ ; 55 ; ** ^ ** 5 e*  5*  **  *  e  5 * * ^ 5F *2W *X *Y Z 4[ 5\ *] *^ *_ *` a 16.1.1! " VNote# 4$ 16.1.2% & ' 7( ;) ;* ;+ , ;- ;. ;/ 0 ;1 ;2 ;re3 4 ;15 ;6 ;7 8 ;9 ;: ;; < ;= ;> ;? 16.1.3@ eA 5B b* Table 16.3 C  ^D : 5E : *F W *G ;X *H Y I ;Z 4J [ 5K ;\ *L ] *M ;^ *N _ *O ;` P a Q b Table 16.19 R qS  T q4 U .2V W :X :7Y ;Z ;;[ ;\ ] ;^ ;_ q;` a ;b ; c ;; d  e ;; f ; g ;h i b Table 16.2 j  ;k : l : ;m  ;n o p q r s bt 3u v w x y  z ;!{ "| ;#} $~ % ;& q' ( ) qe *  q+ e , 7 q- ^ . 21.3.1/ }0 71 ;2 ;3 e;4 55 *;6 *;7 e;8 16.1.49 ;: 7 ;; b  Table 16.4 <  = : > :? @ A B C D E F G H I J bK 3L b Table 16.5 M N :O :P  Q ;!R "S ;#T $U ;%V &W 5'X *(Y e)Z 5*[ *+\ *,] e-^ 16.1.5_ /` 70a 1b 2c 3d b Table 16.6 e *f :*g :eh i ;49j :k ;;l e m ;<n =o >p 5?q *br eAs 5Bt *Cu eDv 5Ew *Fx *Gy eHz 5I{ *J| *K} eL~  16.1.6 N O P bQ Table 16.7  S :T :U V    Z   ] ^ b Table 16.8  ` :a :b c ;d e  ;e* f* ;ge h16.1.7 j k l m b Table 16.9   :5 :* e ;5 * e ,515.1 5x *y ez 5{ *| *} e~ 16.1.8 e   e   b Table 16.10 : U  :V  :    ;  ;Z    ;  ]  ;^ b a.8 ; : ;:  ;;  b; Table 16.11 f! g" :h# :6$ j% ;k& ;l' m( ;Ta)  * ; :+  :, ; -  ;. ; /  0 ; ,1 2 ;x3 y4 ;z5  16.1.96 7 VNote8 79 8: b Table 16.13 ; < :e = :> Ta? ;@ A ;B C D ;E 5F *G eH 5I *J *K 5L qM (N O b Table 16.14 P ;TaQ :R :S T U V W X Y Z [ \ b Table 16.15 ]  ;^ : _ : `  ,a ;b x c ;y d z e   f   g 5 Vh *ei ej 5k * e l * m e :n   16.1.11o Tap 7q r s b Table 16.16 t ;u :5v :*w ex ;5y * z ;*!{ 5"| ;q#} ($~ % b& :1' ;Ta( ) * + , :- :. G/ 0 1 G2 3  16.1.124 5 :6 :7 8 ;9 : e;; < 5= *> e5? 5*@ *eA *5B e*C *D 5eE *F 41G 5H *I *J 4K  16.1.13L ;M 5N b* Table 16.17 eO ;P :Q :;R S ;T U V W :X Y Z [ b Table 16.18 \ ,] :-^ :._ /` ;0a 1b ;2c 3d ;16.1.14e 5:f 61.7.17g 16.1.15h i 5ej k 5l *m en 5o *p *q e16.1.16r  5s 5 *t * 4u * 5v * *w  *x  4y  z  .1{ | VNote} ,*16.26~ O; P 7Q; R bS Table 16.20 T    :  :    ;  ;  ; b a.1 ;\, ]- ^. _/ ;`0 a1 ;b2 c3 ;d; 6 516.2.3 .7 5 *  * 5 *  *        ,16.3   1r b Table 16.21 *  4 : 5 : *  * ; 4   ; .1  ;te , ;  ;  ; 7 ;  ; b a.2 ;  ; 16.3.1  5 * * * *    ,16.4 c d . . 6! .16.4.1" # 5$ *% *& *' ( ) * 316.4.2+ , 5- *b. *2 */ * 40 * 51  *2 > *3 > 44  5  18.66 ^ ;7 5e 8 * ;9 * : * ;; *7 4< g ;4= gb > 52 ;?  @  ;A  B .1C D >5E >*F >*G * Figure 20.1 H  Table 20.4 I J K L M N 0O ;P ;6Q 0.R ;6S ;T 0U ;V ;W 0X ;Y ;Z 0[ ;3\ ; ] 0 5^ ; *_ ; *` 0* *a ;4 *b 05  c 0* > d ;* > e 04  f   g h  ;i e j  Table 22.1 k l 7m n bo <21p 7q r s .t .u .>v q>w >x ;y ;. z ;e !{ ;"| ;#} ;$~ ;% ;& ;' ;( ) ;* 06+ 0, 4 g4 g/ 0 1 2 3  Table 20.2 4 5 6 7 :8 :9 :: : ; : < ; =  >  ? @ ;A B e C D ;E F G H ; 7I ; J ; K ; .L ; .M ; .N ; qO ; P ; ;Q ; ;R ; ;S ; ;T ; ;U ; ;V ; ;W ; ;X ; ;Y  ;Z ; [ ; ;\ ; 0] 6 0^ ; _ ; g` ; ga  b ; c ; d ; e  f ;a.2g ;h ;i j ;:k ;:l ;:m ;:n ;:o ;;p (q r s q;t u (v w .;x qy .z .{ ;| .;} ;~ ; q; ; ; ; ; ; ; (; ^; T; q; ; e;  ; ; ;  ; ;; ;; ; ;; ; ;  Table 5.1  ^2 ;  ;    ;  ;  ; 5 ; | ; ( ;  ( |  |   q |   ( , 12.1 . q . 12.1.1    12.1.2 ; ;4 g; ;4 g;4 g; ; ; ^; 5; *; *; *; ,;21.5   .        0  0 ; 0 ; 0 ;  ;  !  4" g # a1 $ ^5N% * *5& , 10.13' 5( e5O) *4* ^4+ , 0- 0. 0/ 00 ;1 2 Z Table 2.1 43 * 44 * 5P5 e 56 e.157 ^58  5.; *2? @  12.1.3A B gC gD E F ^G 5H *I *J 5*K |,L | M | N | O  P ^ Q 5 0R | 0S |; 0T |; 0U |; V ; W ^ X 5 gY | Z | [ | *\ | ,] ^ _ 5` |a |b | c | d  e <20 f  g h i 0e j ;k 0l ,P21.2m ;.1n 5o * p *2q *r *s * t 0 u ; v 0 w ; x  y   z  !{ ; "| ^ 5#} 5 |$~ * |%  |& * |' * ( * ^) 0 5* 00 |+ 00 |, 0 |- ;0 |. 0 / 0 ^0 0 51 *g |2 * |3 * |4 ** |5 ;, 6 0 7  58 0 |9 0 |:  |;  |< ^ = 5 <> *0 ? * @ *A *B *C 0D 0E 0.2F 0;G 05H 0*I *J 0*K **L **M 0N ;;O ;0P ;;Q ;R ;S ;T ;;U ;^V ;5W ,*21.3X ^&Y 5.'Z *([ *)\ **] ;+^ 0,_ 0-` .a ^/b 50c *1d *2e *3f 04g 05h 06i 7j 58k *9l 0:m e;n <o 5=p ^>q 5?r @s At Bu |Cv |Dw |Ex GFy ,21.4z H*{ I*| |J*} K*~ L* M0 5N; *O0 *P; Q eR 5S |T; |U^ V5 |W* |3X Y Z [ \ ] ^  Table 20.1   e^ ^5 5* ** ** *0 *0 '0 ' '5 '* 0 ee  ,521.6 q ^r 5s *t *u *v w x y .4   | 0 ; ; 05 ;* ;* 0 ^e 55 *| *| * ;| ;| 0  ; ( ;! " 0# ;1$ ;% 0& *' '( ;) * ;+ , - . / 20.10 e1 2 20.23 ^4 55 *6 *7 *8 *9 *: ; < = > ? |@ hA *B *F 5G H *L 7O 7eP 5Q ^|R 5|S *T 20.3V | Table 1.1 W X Y Z 0[ 0\ 0] 01_ 0` 0 20.4  ^ 5 * * * * * * l q  q2  q    q    q     q  q q    q  q  q  q  q  .3! q"  # $ % & ' ( ) * + , - . ^/ 50 *1 q*2 *3 q*4 *5 q*6 l7 qq8 9 q: ; q< q= q> q? q@ qA B qC qD qE qF qqG qH I J qK L qM N qO qP qQ qR qS T qU V W X Y qZ [ q\ q] ^ q_ ` qa 2c qd e qqf g qqh i qqj k qql m" qn# o& qp' qq( qr* qqs+ t/ qu0 qv1 qw2 qx3 qy4 qz5 q{6 qq|; }< q~= D qE F qG H qqI J qqK L qM N qO P qQ T qqV qW qX qqY \ qq] ^ qq_ 2a qqb c qqd e qqf ~ .q . .q . .q  q  q q Table 20.3     q    q   0 q 0  0 q 0  0 q 0  0 q 0  0 q 0  0 q 0  0 q 0  0 q 0  0 q 0  0 q 0  0 q 0 q 0  0 q 0  R q 0  0 q 0  0 q    q    q    .  .  .  .  .   d aSWTP9 b 4  5 h qH I K c 0H I K 0UTUTl . d: I# J KNovember 10, 1997 L MRunning H/F 1 N HH c HH d  4 q H  dHHH$1&  c qH$1&UTUTd  d  H I K  c H I K UTUTl  d: O# P QNovember 10, 1997 R SRunning H/F 1 T HH  c HH d 4P H  d 5HH IHH$1&  c H$1& .UTUTd ! der ,@1; ]  o  @1; ]@1@1 T Xkb Extensiond  a   ql  b  l %$ cd 6 )"<$paranum><$paratext><$pagenum> UUd 9 *"<$paranum><$paratext><$pagenum> "UUd : *K"<$paranum><$paratext><$pagenum> l U/E b  l U/El l 3Table of Contents Specificationberl'  b l' G-h c MouseKeysAccel Fields '  b P' G-d e 4 d a& l u  b l uV ,@1d - : Level2IX d Y : Level1IX xd b : 1, 23 %d v :$<$symbols><$numerics><$alphabetics> :d w eLSymbols[\ ];Numerics[0];A;B;C;D;E;F;G;H;I;J;K;L;M;N;O;P;Q;R;S;T;U;V;W;X;Y;Z Ed : <$pagenum> Rd )m> pl EYm E  b $ral EYm Ell 3Index Specificationum>d  a Ul   b  es l  d $ )"<$paranum><$paratext><$pagenum> l UE  b  bl UEl l 3List of Figures Specificationd  a l   b  l  d % )"<$paranum><$paratext><$pagenum> l U6E  b  12l U6El l 3List of Tables Specificationd  aC;Q;S;HH  b  em>HHm>--  b $- UT UTl 2* ZReplacing a Keyboard On the Fly $ 4 aQSome operating system and X server implementations allow hot plugging of input , 4Rdevices. When using these implementations, input devices can be unplugged and new 9 4raYones plugged in without restarting the software that is using those devices. There is no F 4\provision in the standard X server for notification of client programs if input devices are S 4Zunplugged and/or new ones plugged in. In the case of the X keyboard, this could result in `D 4Cthe X server having a keymap that does not match the new keyboard. lu$ 4WIf the X server implementation supports the X input device extension, a client program n 4Ymay also change the X keyboard programmatically. The  XChangeKeyboardDevice  4input  4[extension request allows a client to designate an input extension keyboard device as the X 2 4KeVkeyboard, in which case the old X keyboard device becomes inaccessible except via the  4t cinput device extension. In this case, core protocol  {XMappingNotify 4 and input extension n b {w [ XChangeDeviceNotify 4 events are generated to notify all clients that a new keyboard iceD 4'with a new keymap has been designated. rd $ 4icUWhen a client opens a connection to the X server, the server reports the minimum and n 4. Rmaximum keycodes. The server keeps track of the minimum and maximum keycodes last  4 t_reported to each client. When delivering events to a particular client, the server filters out ortD 4ce@any events that fall outside of the valid range for the client. ng, 4roYXkb provides an  {XkbNewKeyboardNotify 4 event that reports a change in keyboard u! 4t Lgeometry and/or the range of supported keycodes. The server can generate an Ke. {chSXkbNewKeyboardNotify 4 event when it detects a new keyboard or in response to an 4t ; enVXkbGetKeyboardByName 4 request that loads a new keyboard description. Selecting for H {SXkbNewKeyboardNotify 4 events allows Xkb-aware clients to be notified whenever a ardUD 4 3keyboard change occurs that may affect the keymap. j$ 4 aZWhen a client requests  {XkbNewKeyboardNotify 4 events, the server compares the range w 4ke]of keycodes for the current keyboard to the range of keycodes that are valid for the client. e 4enZIf they are not the same, the server immediately sends the client an  {XkbNewKeyboardNo {ha_tify 4 event. Even if the new keyboard is not new to the server, it is new to this particuXkD 4 lar client. re$ 4keZWhen the server sends an  {XkbNewKeyboardNotify 4 event to a client to inform it of a  4Znew keycode range, it resets the stored range of legal keycodes for the client to the key 4bcode range reported in the event; it does not reset this range for the client if it does not sent  4San  {XkbNewKeyboardNotify 4 event to a client. Because Xkb-unaware clients and ard 4 YXkb-aware clients that do not request  {XkbNewKeyboardNotify 4 events are never sent  4wKZthese events, the servers notion of the legal keycode range never changes, and these cli 4oa[ents never receive events from keys that fall outside of their notion of the legal keycode noD 4rvrange. ate#$ 4t [Clients that have not selected to receive  {XkbNewKeyboardNotify 4 events do, however, ot 0 4 i[receive the  {XkbNewKeyboardNotify 4 event when a keyboard change occurs. Clients that e s= 4XYhave not selected to receive this event also receive numerous other events detailing the dJD 4 t=individual changes that occur when a keyboard change occurs. _$ 4cofClients wishing to track changes in  min_key_code 4 and  max_key_code 4 must watch for both l { {SXkbNewKeyboardNotify 4 and  {XkbMapNotify 4 events, because a simple mapping y 4aw\change causes an  {XkbMapNotify 4 event and may change the range of valid keycodes, but  4enVdoes not cause an  {XkbNewKeyboardNotify 4 event. If a client does not select for ?@@  k    mey?@@de Qf` ' ]  k    ' Qf` ' ]e?Qf` T Core Xlibl@ ]  r    bN@ ]!x~@x~ TXkb t )P2 ]  r  '  wyb)P2 ]!7)7 T(Xkb* r/1 2  bXhah  d ts q ׼@K2  g ! tliq ׼@Kd  an kHH  b  g iHHM amust wat$ 4ybTMany Xkb functions do not actually communicate with the X server; they only require  4auYprocessing in the client-side portion of the library. Furthermore, some applications may " 4 nYnever actually need to communicate with the server; they simply use the Xkb library capa/ 4 ]bilities. The functions that do not communicate with the server return either a pointer to a < 4[structure, a Bool, or a Status. These functions check that the application has queried the x~ID 4P2LXkb library version and return the values shown in Table 1.1 if it has not. (Xd, aX { t XqV 2 ! g  0  0t XqV Kd " an # dH!v\3KE # g $ " gH!v\3KEH-H- 3FootnoteH1   $ b # & " % %nsFootnotetu  % e $lre   J co. QE & h $ E " rtJ co. QEJ czJ cz 3 TableFootnoten:?VE ' s  (  hse:?VE usth:?E?>QK ] ( r ' ) ) con>QK ]dii8>8 TXkb Modifications Q.%3 ] ) r ( * ( te,Q.%3 ]diiQ T functionst/]sh * r ) +/]shrarW'q[ + r * ,b 1W'q[ (XW'q#qP0}# ] , r + - P0}# ]afP0f TX Server57XE ] - r , . 57XE ]as5s TXkb Server Extension#~- . r - D D J #~-Ed / a @@qqV 2 0 g ! 1  ! qqV % e%qV 2 1 g 0 C  C%qV o. d 2 ac. TaHH 3 b 2 ( HHaE**?>* UT UTh 2on +Overview ]  4YThe X Keyboard Extension provides capabilities that are lacking or are cumbersome in the ,@ 4ticore X protocol. E` B 3&Core X Protocol Support for Keyboards Y 4 rkThe core X protocol specifies the ways that the  {Shift 4,  {Control, 4 and  {Lock 4 modifiers P0f 4fdand the modifiers bound to the  Mode_switch 4 or  Num_Lock 4 keysyms interact to generate ss 4xtZkeysyms and characters. The core protocol also allows users to specify that a key affects  4[one or more modifiers. This behavior is simple and fairly flexible, but it has a number of q 4%[limitations that make it difficult or impossible to properly support many common varieties @ 4Vof keyboard behavior. The limitations of core protocol support for keyboards include: URUT ( =WUse of a single, uniform, four-symbol mapping for all keyboard keys makes it difficult UPUT ( =X Uto properly support keyboard overlays, PC-style break keys, or keyboards that comply UNUT@ ( =coOwith ISO9995 1, = or a host of other national and international standards. ULUT ; =co]A second keyboard group may be specified using a modifier, but this has side 1  =effects fUJUT ; =Qthat wreak havoc with client grabs and X toolkit translations. Furthermore, this yUHUT@ ; =en7approach limits the number of keyboard groups to two. coUFUT = =llWPoorly specified locking key behavior requires X servers to look for a few magic key beUDUT = =nd^syms to determine  1that = keys should lock when pressed. This leads to incompatibilities UBUT@ = = tPbetween X servers with no way for clients to detect implementation differences. viU@UT > =s YPoorly specified capitalization and control behavior requires modifications to X library o'U>UT > =ppWsource code to support new character sets or locales and can lead to incompatibilities ke3U<UT@ > =C-Cbetween system 1  =wide and X library capitalization behavior. h I?U:UT ? = aTLimited interactions between modifiers specified by the core protocol make many com kKU8UT ? =beVmon keyboard behaviors difficult or impossible to implement. For example, there is no WU6UT ? =h Xreliable way to indicate whether or not the shift modifier should cancel the lock mod lcU4UT@ ? =f ifier. grooU2UT @ =UF`The lack of any explicit descriptions for indicators, most modifiers 1, = and other aspects c{U0UT @ =Wof the keyboard appearance requires clients that wish to clearly describe the keyboard ompU.UT@ @ =UTFto a user to resort to a mishmash of prior knowledge and heuristics. h A 3es1,Xkb Keyboard Extension Support for Keyboards z 4beZThe X Keyboard Extension makes it possible to clearly and explicitly specify most aspects  4 l[of keyboard behavior on a per-key basis. It adds the notion of a keyboard group to the glo an 4liZbal keyboard state and provides mechanisms to more closely track the logical and physical  4l Wstate of the keyboard. For keyboard-control clients, Xkb provides descriptions and symmpl@ 4, Bbolic names for many aspects of keyboard appearance and behavior.   4diXIn addition, the X Keyboard Extension includes additional keyboard controls designed to Th @ 4icDmake keyboards more accessible to people with movement impairments. ct"h < 3 @-Xkb Extension Components e6  4thTThe Xkb extension is composed of two parts: a server extension, and a client-side X toC 4ioVlibrary extension. These consist of a loadable module that may be activated when an X P 4cserver is started and a modified version of Xlib. /.Both server and Xlib versions must be at ts ]@ 4 lleast X11 R6. avid 4 af kanHH 5 b 4 odeHHnd physi l ' 4boIFigure 1.1  6shows the overall structure of the Xkb extension 4: h Zl / boOverall Xkb Structure v$H 4anUThe server portion of the Xkb extension encompasses a database of named keyboard comoH 4olZponents, in unspecified format, that may be used to configure a keyboard. Internally, the H 4cserver maintains a  fkeyboard description 4 that includes the keyboard state and configuration f tH 4 eV(mapping). By keyboard we mean the logical keyboard device, which includes not only DH 4e _the physical keys, but also potentially a set of up to 32 indicators (usually LEDs) and bells. Xl,  4er`0The keyboard description is a composite of several different data structures, each of which ̀  4fSmay be manipulated separately. When manipulating the server components, the design Hـ  4Yallows partial components to be transmitted between the server and a client. The individ6D  4 s(ual components are shown in Figure 1.1. YUTlr 1Client Map uctd} 4MThe key mapping information needed to convert arbitrary keycodes to symbols. e%WUTls 2Server Map Zpo8$~ 4ieOThe key mapping information categorizing keys by functionality (which keys are HED~ 4ai(modifiers, how keys behave, and so on). lu[UUTlt ta 3Controls an$ 4RClient configurable quantities effecting how the keyboard behaves, such as repeat {D 4Abehavior and modifications for people with movement impairments. od 6 al??keoaHH 7 b 6 freHHch((  4f?ul(UTUTlw pu4Indicators cod 4gn'The mapping of behavior to indicators. com0URUTlz sm 5Geometry hB$ 4enVA complete description of the physical keyboard layout, sufficient to draw a represenOD 4Cltation of the keyboard. }fUPUTl{ in 6Names x$ 4t QA mapping of names to various aspects of the keyboard such as individual virtual D 4ma"modifiers, indicators, and bells. UNUTl| wh7Compatibility Map d 4fiQThe definition of how to map core protocol keyboard state to Xkb keyboard state. $ 4onVA client application interrogates and manipulates the keyboard by reading and writing  4 mZportions of the server description for the keyboard. In a typical sequence a client would  4?]fetch the current information it is interested in, modify it, and write it back. If a client ( 4([wishes to track some portion of the keyboard state, it typically maintains a local copy of 'Th 4Vthe portion of the server keyboard description dealing with the items of interest and D 4e ^updates this local copy from events describing state transitions that are sent by the server. $ 4WA client may request the server to reconfigure the keyboard either by sending explicit ybo& 4du_reconfiguration instructions to it, or by telling it to load a new configuration from its datapat3 4Vbase of named components. Partial reconfiguration and incremental reconfiguration are @D 4both supported. aYd 3gaGroups and Shift Levels ybm$ 4d ZThe graphic characters or control functions that may be accessed by one key are logically z 4enXarranged in groups and levels. See section 14.1for a complete description of groups and , D 4 Ilevels. (l 3(^Radio Groups o$ 4ke[A radio group is a set of keys whose behavior simulates a set of radio buttons. Once a key the 4es\in a radio group is pressed, it stays logically depressed until another key in the group is fr 4ngZpressed, at which point the previously depressed key is logically released. Consequently,  4fiZat most one key in a radio group can be logically depressed at one time. A radio group is  4y Ydefined by a radio group index, an optional name, and by assigning each key in the radio D 4l Cgroup  {XkbKB_RadioGroup 4 behavior and the radio group index. 4l " 3 a8Client Types a"d + 4 LZThis specification differentiates between three different classes of client applications: 7ULUTl 1 =lo9Xkb-aware applications XarCUJUT$ 4 =ndVThese applications make specific use of Xkb functionality and APIs not present in the PUHUTD 4 =core protocol. Ra]UFUTl 2 =:Xkb-capable applications aiUDUT$ 5 = bUThese applications make no use of Xkb extended functionality and  1Application ProovUBUT 5 1 iagramming Interfaces ( =APIs 1)  =directly. However, they are linked with a version of Xlib hU@UTD 5 1ioRthat = includes Xkb 1  =and indirectly benefit from some of Xkbs features. H 8 a : prHad ; ]is UU$ 7 deuX11R6.1 is the first release by the X Consortium, Inc. *,that  includes the X Keyboard Extension in Xlib. X11R6 UUD 7 4]included work in progress on this extension as no *n standard additions to the library. +HH 9 b / wn HHs ##7ULUT@# T 4arZversions of the compile time and run time libraries are compatible,  XkbLibraryVersion D T 4UH7returns  {True 4, otherwise, it returns  {False. *$ R 4icVIn addition, in order to use the Xkb extension, you must ensure that the extension is 7 R 4ti\present in the server and that the server supports the version of the extension expected by reDD R 4siXthe client. Use  XkbQueryExtension 4 to do this, as described in the next section. m ]l S 3ur4Initializing the Keyboard Extension 4a 3 q$ U 4ad_Call  XkbQueryExtension 4 to check for the presence and compatibility of the extension in tha~ U 4 XYthe server and to initialize the extension. Because of potential version mismatches, you  U 4nacannot use the generic extension mechanism functions ( XQueryExtension  4and  XInitExtenD U Qsion 4) for checking for the presence of, and initializing the Xkb extension. h$ X 4 reYou must call  XkbQueryExtension 4 or  XkbOpenDisplay 4 before using any other Xkb library e X 4 ^interfaces, unless such usage is explicitly allowed in the interface description in this docu X 4ongment. The exceptions are:  XkbIgnoreExtension 4,  XkbLibraryVersion 4, and a handful of audi ex X 4Wble-bell functions. You should not use any other Xkb functions if the extension is not ext X 4`present or is uninitialized. In general, calls to Xkb library functions made prior to initializXD X 44?ing the Xkb extension cause  {BadAccess 4 protocol errors. tha$ Z X[XkbQueryExtension  both determines whether a compatible Xkb extension is present in the D Z caUPUTd \ =bQ9Display * dpy; =/* connection to the X server */ yKUNUTd ] = eMint * opcode_rtrn =;/* backfilled with the major extension opcode */ eXULUTd ^ =tiOint * event_rtrn =;/* backfilled with the extension base event code */ nsieUJUTd _ =raOint * error_rtrn =;/* backfilled with the extension base error code */ YorUHUTd ` =ny_int * major_in_out =;/* compile time lib major version in, server major version out */ . IUDUTd a =o ]int * minor_in_out; =/* compile time lib min version in, server minor version out */ s$ h 4 \The  XkbQueryExtension 4 function determines whether a compatible version of the X Keyat h 4 i[board Extension is present in the server. If a compatible extension is present,  XkbQueresD h LryExtension 4 returns  {True 4; otherwise, it returns  {False 4. e$ i 4n_cIf a compatible version of Xkb is present,  XkbQueryExtension 4 initializes the extension. It ect i 4r jbackfills the bmajor opcode for the keyboard extension in  opcode_rtrn 4, the ebase event code  i 4inrin  event_rtrn , the fbase error code 4 in  error_rtrn 4, and the major and minor version numbers  i 4ckgof the extension in  major_in_out 4 and  minor_in_out 4. The major opcode is reported in the pil i er^req_major 4 fields of some Xkb events. For a discussion of the base event code, see section D i 4 v4.1. id : a hnsnHH ; b : eerHH!Extensio 8n !UTUTl 3 =e ;Xkb-unaware applications eURUT$' = hYThese applications make no use of Xkb extended functionality or APIs 1  =and require UPUTD' = cQXkbs functionality to be mapped to core Xlib functionality to operate properly. n9l C 3)<Compatibility With the Core Protocol eM$ 4exUBecause the Xkb extension allows a keyboard to be configured in ways not foreseen by eZ 4fVthe core protocol, and because Xkb-unaware clients are allowed to connect to a server g 4ofTusing the Xkb extension, there must be a means of converting between the Xkb domain ept 4Yand the core protocol. The Xkb server extension maintains a compatibility map as part of n 4n [its keyboard description; this map controls the conversion of Xkb generated events to core  4[protocol events and the results of core protocol requests to appropriate Xkb state and consioD 4 figuration. l 3un>Additional Protocol Errors $', 4atdThe Xkb extension adds a single protocol error, = {BadKeyboard 4, to the core protocol error s D 4e Qset. See section 2.6 for a discussion of the  {BadKeyboard 4 protocol error. ol 3he ?Extension Library Functions ex$ D 4exTThe X Keyboard Extension replaces the core protocol definition of a keyboard with a f D 4l,Tmore comprehensive one. The X Keyboard Extension library interfaces are included in ofL D 4te Xlib. ] 1$ E 4f VXlib detects the presence of the X Keyboard server extension and uses Xkb protocol to > E 4maZreplace some standard X library functions related to the keyboard. If an application uses K E 4co[only standard X library functions to examine the keyboard or process key events, it should ultX E 4 rVnot need to be modified when linked with an X library containing the X keyboard extene E 4AdZsion. All of the keyboard-related X library functions have been modified to automatically rD E 4ey7use Xkb protocol when the server extension is present. 4e $ F 4 2[The Xkb extension adds library interfaces to allow a client application to directly manipuensD F 4onlate the new capabilities. X d 3 rError Indications $H 4XXkb functions that communicate with the X server check to be sure the Xkb extension has lH 4ar]been properly initialized prior to doing any other operations. If the extension has not been H 4se^properly initialized or the application, library, and server versions are incompatible, these H 4 t\functions return an error indication as shown in Table 1.1. Because of this test,  {BadAc eH {d acess 4 and  {BadMatch 4 (due to incompatible versions) protocol errors should normally not aBLH 4nibe generated. r d < akbotis HH = b < HHoc--sion is -$ 8 4ex_As a convenience, you can use the function  XkbOpenDisplay 4 to perform these three tasks D F 8 4 cUat once: open a connection to an X server, check for a compatible version of the Xkb i"D 8 4teTextension in both the library and the server, and initialize the extension for use. p6UTUT, l =d jDisplay *g tXkbOpenDisplay =( display_name, event_rtrn, error_rtrn, major_in_out, minor_in_out, CURUTD l io reason_rtrn) PUPUT$ m =e Xchar * display_name =;/* hardware display name, which determines the display and T]UNUTD m =of$communications domain to be used */ HjULUTd n = Nint * event_rtrn =;/* backfilled with the extension base event code */ wUJUTd o =HNint * error_rtrn =;/* backfilled with the extension base error code */ UHUTd p =ti^int * major_in_out =;/* compile time lib major version in, server major version out */ UFUTd q =^int * minor_in_out =;/* compile time lib minor version in, server minor version out */ UDUTd r = t?int * reason_rtrn =;/* backfilled with a status code */ ion$ V he\XkbOpenDisplay  4is a convenience function that opens an X display connection and initiald  V 4iteizes the X keyboard extension. In all cases, upon return  reason_rtrn 4 contains a status value a V 4rorindicating success or the type of failure. If  major_in_out 4 and  minor_in_out 4 are not  {NULL 4,  V ddXkbOpenDisplay 4 first calls  XkbLibraryVersion 4 to determine whether the client library is * V 4 nfcompatible, passing it the values pointed to by  }major_in_out 4 and  }minor_in_out 4. If the  V 4rtmlibrary is incompatible,  XkbOpenDisplay 4 backfills  }major_in_out 4 and  }minor_in_out 4 with * V 4mabthe major and minor extension versions of the library being used and returns  {NULL 4. If the   V 4r mlibrary is compatible,  XkbOpenDisplay  4next calls  XOpenDisplay 4 with the  display_name 4. t V 4mIf this fails, the function returns  {NULL 4. If successful,  XkbOpenDisplay  4calls  XkbQueryEx & V it^tension 4 and   4backfills the major and minor Xkb server extension version numbers in 3 V nmajor_in_out 4 and  minor_in_out 4.   4If the server extension version is not compatible with the @ V 4clibrary extension version or if the server extension is not present,  XkbOpenDisplay  4closes t lM V 4_the display and returns  {NULL 4. When successful, the function returns the display connecin_ZD V 4 tion {. od z 4nc1The possible values for  reason_rtrn 4 are: oUBUTd { { }XXkbOD_BadLibraryVersion = indicates  XkbLibraryVersion  =returned  {False =. e U@UTd | { aGXkbOD_ConnectionRefused = indicates the display could not be opened. le,U>UT$ } {y RXkbOD_BadServerVersion = indicates the library and the server have incompatible U<UTD } =s,extension versions.  U:UTd ~ {ceOXkbOD_NonXkbServer = indicates the extension is not present in the X server.  4U8UTd  {fi9XkbOD_Success = indicates that the function succeeded. sl 3 V-Disabling the Keyboard Extension =i 3 .$ 4rvUIf a server supports the Xkb extension, the X library normally implements preXkb key  4seVboard functions using the Xkb keyboard description and state. The server Xkb keyboard  4rnZstate may differ from the preXkb keyboard state. This difference does not affect most cli 4Zents, but there are exceptions. To allow these clients to work properly, you may instruct  D 4io,the extension not to use Xkb functionality. rn5$ 4e ^Call  XkbIgnoreExtension 4 to prevent core X library keyboard functions from using the X B 4y ]Keyboard Extension. You must call  XkbIgnoreExtension 4 before you open a server connecO 4n Ytion; Xkb does not provide a way to enable or disable use of the extension once a connecs\D 4r.tion is established. iqU6UTl = 4Bool t hXkbIgnoreExtension =( ignore =) ~U4UTd =e CBool ignore =;/*  {True = means ignore the extension */ pord > aympssHH ? b > brdHHj. sHst e UTUT =atCunsigned shortrepeat_delay;/* ms delay until first repeat */ s, URUT =ptCunsigned shortrepeat_interval;/* ms delay between repeats */ !UPUT =exTunsigned shortslow_keys_delay;/* ms minimum time key must be down to be ok */ io.UNUT =orIunsigned shortdebounce_delay;/* ms delay before key reactivated */ a;ULUT =muIunsigned shortmk_delay;/* ms delay to second mouse motion event */ HUJUT =Kunsigned shortmk_interval;/* ms delay between repeat mouse events */ onnUUHUT = Ounsigned shortmk_time_to_max;/* # intervals until constant mouse move */  =bUFUT = Junsigned shortmk_max_speed;/* multiplier for maximum mouse speed */ oUDUT =;shortmk_curve;/* determines mouse move curve type */ |UBUT =Funsigned shortax_options;/* 1 bit => Access X option enabled */ U@UT =Eunsigned shortax_timeout;/* seconds until Access X disabled */ gU>UT =deVunsigned shortaxt_opts_mask;/* 1 bit => options to reset on Access X timeout */ U<UT =s Kunsigned shortaxt_opts_values;/* 1 bit => turn option on, 0=> off */ delU:UT =m Uunsigned intaxt_ctrls_mask;/* which bits in  enabled_ctrls = to modify */ aU8UT =efVunsigned intaxt_ctrls_values;/* values for new bits in  enabled_ctrls = */ U6UT =ioSunsigned charper_key_repeat[XkbPerKeyBitArraySize]; /* per key auto repeat */ reU4UTL =*//}  XkbControlsRec =, *XkbControlsPtr; e_t$ 4rv]The general-purpose functions that work with the  {XkbControlsRec 4 structure use a mask u 4um\to specify which controls are to be manipulated. Table 10.6 lists these controls, the masks */ 4dused to select them in the general function calls ( }which 4 parameter), and the data fields in ig 4ou`the  {XkbControlsRec 4 structure that comprise each of the individual controls. Also listed  4s [are the bit used to turn boolean controls on and off and the section where each control is 1 b+BL 4ondescribed in more detail. d @ ahh tt =toHH A b @ tHHw* (( enabltL/ ($ 4igcThe fields pertaining to each control are relevant only when the  =control is enabled ( {XkbAc/}  {sRbcessXFeedbackMask 4 or  {XkbStickyKeysMask 4 bit is turned on in the  enabled_cntrls 4 "D 4 4field). e 7$ 4]Xkb provides a set of convenience macros for working with the  ax_options 4 field of an DD {XkbControlsRec 4 structure: ]UTUTl =un@#define tXkbAX_NeedOption =(c,w)((c)->ax_options&(w)) q$ 4thZThe  XkbAX_NeedOption 4 macro is useful for determining whether a particular AccessX ~ 4boption is enabled or not. It accepts a pointer to an  {XkbControlsRec 4 structure and a valid  4ondmask bit from Table 10.9. If the specified mask bit in the  ax_options 4 field of the controls D 4Ustructure is set, the macro returns the mask bit. Otherwise, it returns zero. Thus, ed 4/ 9XkbAX_NeedOption(ctlrec, XkbAX_ =LatchToLockMask 4) $ 4nt_is nonzero if the latch to lock transition for latching keys is enabled, and zero if it is disr  4sk]abled. Note that  XkbAX_NeedOption 4 only determines whether or not the particular capa 4id\bility is configured to operate; the  {XkbAccessXFeedbackMask 4 bit must also be turned D 4olKon in  enabled_ctrls 4 for the capability to actually be functioning. (cURUTlu =nsU#define tXkbAX_AnyFeedback =(c)((c)->enabled_ctrls&XkbAccessXFeedbackMask) i$ 4cu`The  XkbAX_AnyFeeback 4 macro accepts a pointer to an  {XkbControlsRec 4 structure and ro$ 4e dtells whether the  {AccessXFeedback 4 control is enabled or not. If the  {AccessXFeedback 4 ti1 4he\control is enabled, the macro returns  {XkbAccessXFeedbackMask 4. Otherwise, it returns i>D 4uszero. XUPUT,v =Xk-#define tXkbAX_NeedFeedback =(c,w) keUNUTDv =/(XkbAX_AnyFeedback(c)&&XkbAX_NeedOption(c,w)) iony$ 4 i[The  XkbAX_NeedFeedback 4 macro is useful for determining if both the  {AccessXFeedon {s [back 4 control and a particular AccessX feedback option are enabled. The macro accepts a e  4ac^pointer to an  {XkbControlsRec 4 structure and a feedback option from the table above. If  4ly\both the  {AccessXFeedback 4 control and the specified feedback option are enabled, the edD 4ee@macro returns  {True 4. Otherwise it returns  {False 4. roULUT$ t@ax_timeout, axt_opts_mask, axt_opts_values, axt_ctrls_mask, and teUJUTD {axt_ctrls_values $ oyax_timeout 4,  act_opts_mask 4,  axt_opts_values 4,  axt_ctrls_mask 4, and  axt_ctrls_values  are a i_attributes of the  {AccessXTimeout  control. Refer to section 10.6.2 for a description of =D %these fields and the units involved. _UHUTl onper_key_repeat [Th%$ 4edkThe  per_key_repeat 4 field mirrors the  auto_repeats 4 field of the core protocol  {XKeyboardl a2 {cejState 4 structure: changing the  auto_repeats 4 field automatically changes  per_key_repeat 4 ? 4nd\and vice versa. It is provided for convenience and to reduce protocol traffic. For example,  L 4 s_to obtain the individual repeat key behavior as well as the repeat delay and rate, use  XkberwY FgGetControls 4. If the  per_key_repeat 4 were not in this structure, you would have to call both UTf ctcXGetKeyboardControl 4 and  XkbGetControls 4 to get this information. The bits correspond to axs 4anckeycodes. The first seven keys (keycodes 1-7) are indicated in  }per_key_repeat 4[0], with bit l. d B af=xxelgqV =p 2 C g 1  1 zongqV =p eat:I DNn ] D r . I . I J eat:I DNn ]b:I TServer Database of corHA  E b & G "ce F Fng TableFootnoteoD~ F e EerD~?DDPX˭ E! G h E H " H c endPX˭ EVUQPXUQ c@e_'rvL E" H h G ] " G ] c idu_'rvL Ee9_'r c@e3:\po ]# I r D J D J 3:\po ]b "q3 "q TKeyboard Componentswer#~-$ J a I Kcl #~- . Ibܿ$% K n J Lketbܿ$et isbbܿ(VE%& L l K Mnke(VE% sen (VEZEn?QLQ' M l L N[, n?QLQn?Qn?MZV@2( N s M OZV@2 ZV(V'$J) O s N Pn]'$J . J'$J'$P-AP ]* P r O Q sof-AP ] ?ll T Client Map]gJ+ Q s P Rneo]gJ ]gJ]gP+.{ ], R r Q S D+.{ ]Bl+l T Server MapgQL[ ]- S r R  rvLgQL[ ]lgQl TCompatibility Mapd. T a#uw:HH/ U b T ontHH l #u I` f 4 n LH0 V euv TH%HH I K1 W b T VEH I K Q[, vQUTUTh g =Zr gNovember 10, 1997 iLibrary Version  j1.0 n 1/ =Document Revision 1  1/1.1. = u1 x H62 X fv Y T Y [$JH6-AP]H66H'o bx3 Y a X Z T X Z [ lH'o bxH2XH2X b+'o 4 Z a Y [ T Y [  'o /Ŝ/Ŝ b,H'ol5 [ a Zw TlH'ol X ZH'˚ K6 \ b T rH'˚ K ibility wUTUTh s =7The X Keyboard Extension = y1  =Overview  PXvL E7 ] h H ^ " H ^ c PXvL EVPX c@_'r˭ E8 ^ h ] _ " ] a c L_'r˭ Ee9UQ_'rUQ c@L\$$9 _ i ^ ` " ` dL\$$H-6: ` i _ a " _ c dQH-6_'rȀ; E; a i ` b " ^ b c T_'rȀ; Ee9 _'r c@rPXȀ; E< b i a c " a c vioPXȀ; EV PX c@PX˭.:= c i b d " ` dJPX˭.: G bH-6> d i c "a ZH-6 _ cHH? e b B oHHx Y(( xM( 45[position 0 (low order) corresponding to the fictitious keycode 0. Following array elements HD 4Ycorrespond to 8 keycodes per element. A 1 bit indicates that the key is a repeating key. d.l 3yQuerying Controls Bd 47MUse  XkbGetControls 4 to find the current state of Xkb server controls. VUTUTl = ];Status  tXkbGetControls =( display, which, xkb) $cURUTd = `:Display * display =;/* connection to X server */ pUPUTd =@unsigned long which =;/* mask of controls requested */ T}UNUTd =EMXkbDescPtr xkb =;/* keyboard description for controls information*/ ;$ X`XkbGetControls 4 queries the server for the requested control information, waits for a reply,  4fand then copies the servers values for the requested information into the  ctrls 4 structure of  4(ethe  }xkb 4 argument. Only those components specified by the  }which 4 parameter are copied. t 4ll_Valid values for  which 4 are any combination of the masks listed in Table 10.7 that have ateD 4a "ok in the  }which 4 column. $ 4tr|If  xkb 4-> ctrls  4is  {NULL 4,  XkbGetControls 4 allocates and initializes it before obtaining the val ] 4kb~ues specified by  which 4. If  xkb 4-> ctrls 4 is not  {NULL 4,  XkbGetControls 4 modifies only those D 4un_portions of  }xkb 4-> }ctrls 4 corresponding to the values specified by  }which 4. $ bokXkbGetControls 4 returns  {Success 4 if successful; otherwise, it returns  {BadAlloc 4 if it canhe  4inznot obtain sufficient storage,  {BadMatch 4 if  }xkb 4 is  {NULL 4 or  }which 4 is empty, or  {BadImple"D { smentation 4. 7$ 4 eTo free the  ctrls 4 member of a keyboard description, use  XkbFreeControls 4 (see section DD 4d 10.12) r Y$ 4nyrThe  num_groups 4 field in the  }ctrls 4 structure is always filled in by  XkbGetControls 4, regardfD 4tr2less of which bits are selected by  which 4. l 3 Changing Controls $# 4thTThere are two ways to make changes to controls: either change a local copy keyboard s# 4Lbdescription and call  XkbSetControls 4, or, to reduce network traffic, use an   {XkbConD# {diBtrolsChangesRec 4 structure and call  XkbChangeControls 4. $ 44fTo change the state of one or more controls, first modify the  ctrls 4 structure in a local copy  4in_of the keyboard description and then use  XkbSetControls 4 to copy those changes to the X r D 4server. sULUTl =9Bool  tXkbSetControls =( display, which, xkb) UJUTd =on:Display * display =;/* connection to X server */  UHUTd =@unsigned long which =;/* mask of controls to change */  UFUTd =s RXkbDescPtr xkb =;/*  }ctrls = field contains new values to be set */ +$ 4 hFor each bit that is set in the  }which 4 parameter,  XkbSetControls 4 sends the corresponding ke8 4lssvalues from the  xkb 4-> ctrls 4 field to the server. Valid values for  which 4 are any combination uceED 4usNof the masks listed in Table 10.7 that have ok in the  }which 4 column. Z$ 4sIf  xkb 4-> ctrls 4 is  {NULL 4, the server does not support a compatible version of Xkb, or the Xkb n ag 4iextension has not been properly initialized,  XkbSetControls 4 returns  {False 4. Otherwise, it XtD 4UTUT, =ro\Adjusts core protocol  {MappingNotify = events to refer only to keys that match the omJURUTD =stored legal range. asVUPUT$ = 1UReports keyboard mappings for keys that match the stored legal range to clients that bUNUTD =N:issue a core protocol  {GetKeyboardMapping = request. nULUT$ = aUReports modifier mappings only for keys that match the stored legal range to clients 4zUJUTD =e?that issue a core protocol  {GetModifierMapping = request. e XUHUT$ =s QRestricts the core protocol  {ChangeKeyboardMapping = and  {SetModifierMapUFUTD {Cping = requests to keys that fall inside the stored legal range. $ 4ntZIn short, Xkb does everything possible to hide from Xkb-unaware clients the fact that the  4e Zrange of legal keycodes has changed, because such clients cannot be expected to deal with  4ilYthem. Xkb events and requests are not modified in this manner; all Xkb events report the  4evYfull range of legal keycodes. No requested Xkb events are discarded, and no Xkb requests PD 4Re"have their keycode range clamped. d 4PThe structure for the  {XkbNewKeyboardNotify 4 event is defined as follows: boUDUT$ =ue'typedef struct _XkbNewKeyboardNotify { r mUBUT =ey2inttype;/* Xkb extension base event code */ U@UT =th@unsigned longserial;/* X server serial number for event*/ UH)U>UT =ReCBoolsend_event;/*  {True = => synthetically generated */ dif6U<UT =MDisplay *display;/*  1server connection where event generated = */ CU:UT =nt>Timetime;/*  1server time when event generated = */ PU8UT = t5intxkb_type;/*  pXkbNewKeyboardNotify = */ a]U6UT = s8intdevice;/* device  1ID = of new keyboard */ jU4UT =en<intold_device;/* device  1ID = of old keyboard */ s wU2UT =8intmin_key_code;/* min keycode of new keyboard */ kbU0UT =de8intmax_key_code;/* max keycode of new keyboard */ eyU.UT =. <intold_min_key_code;/* min keycode of old keyboard */ NoU,UT =de<intold_max_key_code;/* max keycode of old keyboard */ ewU*UT = mBunsigned intchanged;/* changed aspects - see masks below */ U(UT =;charreq_major;/* major request that caused change */ evU&UT =;charreq_minor;/* minor request that caused change */ ly U$UTL =U<)}  XkbNewKeyboardNotifyEvent =; $ 4io`To receive name notify events, use  XkbSelectEvents 4 (see section 4.3) with  {XkbNewKey g {U8bboardNotifyMask 4 in both the  }bits_to_change 4 and  }values_for_bits 4 parameters. To  4e freceive events for only specific names, use  XkbSelectEventDetails 4. Set the  event_type 4   4UT[parameter to  {XkbNewKeyboardNotify 4, and set both the  bits_to_change  4and  8i Zvalues_for_bits 4 detail parameter to a mask composed of a bitwise OR of masks in Table &BL 4oa 19.1. [ dB h a m _ *ewHHC i b h dHHpeeeq/*Pd 4t hThe  -req_major 4 and  -req_minor 4 fields indicate what type of keyboard change has occurred. U$e$ 4} dIf  -req_major 4 and  -req_minor 4 are zero, the device change was not caused by a software kbr 4seVrequest to the server a spontaneous change has occurred, such as hot-plugging a new  4gefdevice. In this case,  -device 4 is the device identifier for the new, current X keyboard device,  4elebut no implementation-independent guarantee can be made about  -old_device 4.  -old_device 4 t 4otcmay be identical to  -device 4 (an implementor is permitted to reuse the device specifier when a  4 bjthe device changes); or it may be different. Note that  -req_major 4 and  -req_minor 4 being zero  4Ydo not necessarily mean that the physical keyboard device has changed; rather, they only  4Timply a spontaneous change outside of software control (some systems have keyboards q_D 4nd4that can change personality at the press of a key). $ 4IfZIf the keyboard change is the result of an X Input Extension  {ChangeKeyboardDevice 4  4irequest,  -req_major 4 contains the input extension major opcode, and  -req_minor 4 contains the  4Indinput extension request number for  {X_ChangeKeyboardDevice 4. In this case,  -device 4 and   -mpgold_device 4 are different, with  -device 4 being the identifier for the new, current X keyboard  D 4icKdevice, and  -old_device 4 being the identifier for the former device. er +$ 4]If the keyboard change is the result of an  XkbGetKeyboardByName 4 function call, which m8 4o egenerates an  {X_kbGetKbdByName 4 request,  -req_major 4 contains the  =Xkb extension base eE =fevent code 4 (see section 2.4), and  -req_minor 4 contains the event code for the Xkb extension R 4 chrequest  {X_kbGetKbdByName 4.  -device 4 contains the device identifier for the new device, but o_ 4siknothing definitive can be said for  -old_device 4; it may be identical to  -device 4, or it may be malD 4-,different, depending on the implementation. IndD j aCng `isasHHE k b j polHHnrebeing thMor UT UTle 2rd/Server Database of Keyboard Components ice$ 4ntRThe X server maintains a database of keyboard components, identified by component , 4kbWtype. The database contains all the information necessary to build a complete keyboard tKb9 4t,]description for a particular device, as well as to assemble partial descriptions. Table 20.1 eFBL 4d Midentifies the component types and the type of information they contain. $+ 4X_VWhile a keymap is a database entry for a complete keyboard description, and therefore + 4Zlogically different from the individual component database entries, the rules for process+ 4be[ing keymap entries are identical to those for the individual components. In the discussion D+ 4C[that follows, the term component is used to refer to either individual components or a keyD+ 4map. $, 4VThere may be multiple entries for each of the component types. An entry may be either  , ficomplete 4 or  fpartial 4. Partial entries describe only a piece of the corresponding keyboard b, 4seXcomponent and are designed to be combined with other entries of the same type to form a t,D, 4a complete entry. a$- 4blSFor example, a partial symbols map might describe the differences between a common pes!- 4nfUASCII keyboard and some national layout. Such a partial map is not useful on its own r.- 4rdRbecause it does not include those symbols that are the same on both the ASCII and ;- 4ta]national layouts (such as function keys). On the other hand, this partial map can be used to hHD- 4du?configure  any 4 ASCII keyboard to use a national layout. llo]$. 4neYWhen a keyboard description is built, the components are processed in the order in which jD. 4Dthey appear in Table 20.1; later definitions override earlier ones. trlz F l b o folelz  4 g [0l erih &XkbNewKeyboardNotifyEvent Details z G m b fdo z  e g [0 thsad 4t, 2z H n b f2z  a g [0symlsd 4e  lI o b l p f-lnd g [1ion l   iaXkbNewKeyboardNotify i@ Event Details 6J p b o q fehe6I g [1` lValue 2K q b p  fts 2d g [1` e Circumstances dL r a JardeHHM s b r eedHH ey appea~~1; UT UTl d 2e "The Xkb Compatibility Map $r 4ZAs shown in Figure 17.1, the X server is normally dealing with more than one client, each ,r 4Pof which may be receiving events from the keyboard, and each of which may issue sa9 r 4t,[requests to modify the keyboard in some manner. Each client may be either Xkb-unaware, Fr 4 UXkb-capable, or Xkb-aware. The server itself may be either Xkb-aware or Xkb-unaware. lSr 4iaVIf the server is Xkb-unaware, Xkb state and keyboard mappings are not involved in any `r 4heYmanner, and Xkb-aware clients may not issue Xkb requests to the server. If the server is Kmr 4tZXkb-aware, the server must be able to deliver events and accept requests in which the keyzr 4Wboard state and mapping are compatible with the mode in which the client is operating. er 4TConsequently, for some situations, conversions must be made between Xkb state / key"Lr 4ilPboard mappings and core protocol state / keyboard mappings, and vice versa. y l -Server Interaction with Types of Clients i$ 4g _In addition to these situations involving a single server, there are cases where a client that the 4maWdeals with multiple servers may need to configure keyboards on different servers to be Xk 4r Zsimilar and the different servers may not all be Xkb-aware. Finally, a client may be deal 4anZing with descriptions of keyboards (files, and so on) that are based on core protocol and D 4XkMtherefore may need to be able to map these descriptions to Xkb descriptions. e3$ 4leVAn Xkb-aware server maintains keyboard state and mapping as an Xkb keyboard state and @ 4coPan Xkb keyboard mapping plus a compatibility map used to convert from Xkb compoCoM 4me[nents to core components and vice versa. In addition, the server also maintains a core keyappZ 4ocLboard mapping that approximates the Xkb keyboard mapping. The core keyboard erg 4TyVmapping may be updated piecemeal, on a per-key basis. When the server receives a core t 4 a]protocol  {ChangeKeyboardMapping 4 or  {SetModifierMapping 4 request, it updates its o 4onVcore keyboard mapping, then uses the compatibility map to update its Xkb keyboard mapl N t b v dl an 6h dcrh ds Library Control Masks 2 O u bXk2 o  6o m tUVUTd 8to bP v b t wbwayb 7e a m ` 7eyLibrary Control Mask ?Q w b v xaom? c 7om b ` 7Value R x b w yIad o  8 a re UTUTh =XkbLC_ForceLatin1Lookup pp? S y b x zey?  8pinma UTUT` =me (1 << 0) r T z b y { oc 9angey UTUTh =r XkbLC_ConsumeLookupMods ue? U { b z |o k? us 9mpabi UTUT` = i (1 << 1) o V | b { }  : 6 UTUTh =$XkbLC_AlwaysConsumeShiftAndLock ? W } b | 2k?   : tUV UTUT` = b (1 << 2)  X ~ b 3   a ; UTUTh =Co#XkbLC_ConsumeKeysOnComposeFail w b? Y  b ~ c ?  ;Vae UTUT` = (1 << 29) # Z b  8#  <XkC_ UTUTh =ppXkbLC_ComposeLED S#? [ b  #? UT <=me(1 UTUT` = (1 << 30) 1 \ b oc1 UT ==r  UTUTh =kuXkbLC_BeepOnComposeFail U;>7j] s S us;>7j UTUT;>7j07j1? ^ b 1?  = : UTUT` = (1 << 31) ? _ b ?  > UTUTh = XkbLC_AllControls ?? ` b X??  > UTUT` = (0xc0000007) da al b b HHb b ;HH eI  fj$2 4<\Table 10.7 shows the actual values for the individual mask bits used to select controls for  2 4[modification and to enable and disable the control. Note that the same mask bit is used to 2 4cspecify general modifications to the parameters used to configure the control ( }which 4), and ]&2 4bto enable and disable the control ( enabled_ctrls 4). The anomalies in the table (no ok in 32 4 ]column) are for controls that have no configurable attributes; and for controls that are not @BL2 4Cboolean controls and therefore cannot be enabled or disabled. ?dc aUTHHd b HHfwJfjqd 4VThe individual fields of the  {XkbControlsRec 4 structure are defined as follows. UTUTd mk_dflt_btn 2$ hormk_dflt_btn  is an attribute of the  {MouseKeys  control 4 (see section 10.5 ). It 4 specifies the & 4isUmouse button number to use for keyboard simulated mouse button operations. Its value f3D 4tiEshould be one of the core symbols  {Button1 4 -  {Button5 4. dJURUTd 2 num_groups le \$ ntenum_groups 4 is not a part of any control, but is reported in the  {XkbControlsRec 4 structure oi 4veUwhenever any of its components are fetched from the server. It reports the number of av 4reWgroups the particular keyboard configuration uses and is computed automatically by the D 4.server whenever the keyboard mapping changes. UPUTd groups_wrap , qgroups_wrap  is an attribute of the  {GroupsWrap  control ( 4see section 10.7.1 ). It specifies t d athe handling of illegal groups on a global basis. Valid values for  groups_wrap  are shown tBL Kein Table 10.8. 4 ect2$ 4aWhen  groups_wrap  is set to  {XkbRedirectIntoRange 4, its four low-order bits specify n?D 4althe index of the group to use. be VUHUTd mb internal th$ ondinternal  is an attribute of the  {InternalMods  control (see section 10.7.4). It specifies cou 4rtTmodifiers to be consumed in the server and not passed on to clients when events are co 4ed]reported. Valid values consist of any combination of the eight core modifier bits:  {ShiftdD {s VMask 4,  {LockMask 4,  {ControlMask 4,  {Mod1Mask 4 -  {Mod5Mask 4. UFUTd . ignore_lock , iignore_lock  is an attribute of the  {IgnoreLockMods  control (see section 10.7.2). It specin pe_fies  4modifiers to be ignored in grab calculations. Valid values consist of any combination   4renof the eight core modifier bits:  {ShiftMask 4,  {LockMask 4,  {ControlMask 4,  {Mod1Mask 4 - D {toMod5Mask 4. UDUTl senabled_ctrls $ x benabled_ctrls 4 is an attribute of the  {EnabledControls 4 control (see section 10.1.1). It  4InXcontains one bit per boolean control. Each bit determines whether the corresponding cons de a tcoHHf b nstHH` tits:  {xK" 4{rol is enabled or disabled; a one bit means the control is enabled. The mask bits used to ig/ 4Xenable these controls are listed in Table 10.7, using only those masks with ok in the ee<D }Itenabled_ctrls 4 column. SUBUTl rs)repeat_delay and repeat_interval ve$ nykrepeat_delay  and  repeat_interval  are attributes of the  {RepeatKeys  control (see section {r {c10.3.2).  repeat_delay  is the initial delay before a key begins repeating, in milliseconds; D ctQrepeat_interval  is the delay between subsequent key events, in milliseconds. .UTUTl slow_keys_delay p$ . dslow_keys_delay  is an attribute of the  {SlowKeys  control (see section 10.6.6). Its value & ]specifies the  {SlowKeys  acceptance delay period in milliseconds before a key press is 3D accepted by the server. JURUTl idebounce_delay ; a\, cidebounce_delay  is an attribute of the $ {BounceKeys  control (see section 10.6.7). Its value i hobspecifies the  {BounceKeys  delay period in milliseconds for which the key is disabled after vD Thaving been pressed before another press of the same key is accepted by the server. aUPUTd Bmk_delay, mk_interval, mk_time_to_max, mk_max_speed, and mk_curve $ dexmk_delay 4,  mk_interval 4,  mk_time_to_max 4,  mk_max_speed 4, and  mk_curve  are attributes of is sbthe  {MouseKeysAccel  control. Refer to section 10.5.2 for a description of these fields and D lathe units involved. ofUNUTl ax_options cti$ 4lu_The  ax_options 4 field contains attributes used to configure two different controls, the bef { ]StickyKeys 4 control (see section 10.6.8) and the  {AccessXFeedback 4 control (see sec 4de_tion 10.6.3). The  ax_options 4 field is a bitmask and may include any combination of the val BL 4!bits defined in Table 10.9.  dg ahke KHHh b rreHH@&acUPUT 6 6[ 4me^ping. When the server receives an  {XkbSetMap 4 request, it updates those portions of its  4,YXkb keyboard mapping specified by the request, then uses its compatibility map to update " 4Uthe corresponding parts of its core keyboard map. Consequently, the servers Xkb key/ 4voWboard map and also its core keyboard map may contain components that were set directly 4<D 4trLand others that were computed. Figure 17.2 illustrates these relationships. StPUTUT$: =olSThe core keyboard map is contained only in the server, not in any client-side data \URUT"L: =. structures.  g@&l asCServer Derivation of State and Keyboard Mapping Components s d@&l 4.9OThere are three kinds of compatibility transformations made by the server: @&d Xkb State to Core State r@&$ 4ZKeyboard state information reported to a client in the state field of various core events @& 4ceNmay be translated from the Xkb keyboard state maintained by the server, which @&D 4oaAincludes a group number, to core protocol state, which does not. p@&$ 4LIn addition, whenever the Xkb state is retrieved, the  compat_state 4, th@& `compat_grab_mods 4, and  compat_lookup_mods 4 fields of the  {XkbStateRec 4 returned t @& 4Vindicate the result of applying the compatibility map to the current Xkb state in the @&D 4:server. co@&d c.Core Keyboard Mapping to Xkb Keyboard Mapping -@&$ 4UTSAfter core protocol requests received by the server to change the keyboard mapping and:@& 4CoX( {ChangeKeyboardMapping 4 and  {SetModifierMapping 4) have been applied to the nsG@& 4r:Uservers core keyboard map, the results must be transformed to achieve an equivalent sT@&D 4ep=change of the Xkb keyboard mapping maintained by the server. &i@&d ma.Xkb Keyboard Mapping to Core Keyboard Mapping ~@&$ 4erRAfter Xkb protocol requests received by the server to change the keyboard mapping @& 4X( {XkbSetMap 4) have been applied to the servers Xkb keyboard map, the results are thHi i b y d Hi  z @ ofheh  4Mask Bits for XkbDescRec  i j b ytili  X z @in e d  4: ei k b y ppi pp z @d  4re oy~l b yae y~nd z A`  ey Mask Bit g)yHm b ye a)yH z A4r:se   rd XkbDescRec ult@  meField qyHn b yhgeqyH z Ataid `  @&Value ~ o b yod ~  z Ber b UTUT` =reXkbControlsMask er)H p b y)H 4 z Ben pl UTUT` ! =s ctrls qH q b yqH  z Bi UTUT` " =@(1L<<0) ~ r b y ~ j z Cy UTUT` # =XkbServerMapMask @)H s b y)H  z C UTUT` $ = server qH t b ylqH e z C~ UTUT` % =(1L<<1) ~ u b ym~  a z xH UTUT` & =r:XkbIClientMapMask )H v b yid )H n z xy UTUT` ' =map qH w b yae qH o z xy UTUT` ( =(1L<<2) ~ x b ynol~  z y b UTUT` ) =XkbIndicatorMapMask #֎y s 0#֎ b #֎#֔)H z b yTUT)H  z y~ UTUT` * = indicators qH { b yTqH Ma z y UTUT` + = (1L<<3) ~ | b yUT~ er z z UTUT` , = XkbNamesMask l)H } b yTUT)H  z z~ UTUT` - =names qH ~ b yUTqH Cl z zsk  UTUT` . =v(1L<<4) ~  b yx~  z {q UTUT` / = bXkbCompatMapMask )H  b yTUT)H  z {~ UTUT` 0 =compat olqH  b yTUTqH at z {  UTUT` 1 =y(1L<<5) ~  b y~  z |  UTUT` 2 =XkbGeometryMask )H  b ys)H { z |y UTUT` 3 =geom l  b 1<3l  J h = m Xkb Event Types,   b   JTUTd > 4 ſ  b ſ  b Jd ? 4 l  b 1<4l  K  ` @ 7 Event Type  ? b mtM ? K b ` A 7Conditions Generating Event ſ - b 0 ſ - KUT ` B 7atSection l  b0 l  L UTUTh C p_XkbNewKeyboardNotify ?  b ? s L UTUT` D 1|(Keyboard geometry; keycode range change ſ-  b Z ſ- J L UTUT` E 1Xk19 t l,  bZ l,  M  UTUTh F p`XkbMapNotify ,?  b ,?  M UTUT` G 1 Keyboard mapping change bſ,-  b [ ſ,-  M Evt UTUT` H 1 14.4 l:  b[ l:  N` A UTUTh I pataXkbStateNotify -:?  b :? UT N UTUT` J 1 Keyboard state change ſ:-  b \ ſ:- UT Np UTUT` K 1ti5.4 lH  b\ lH  OUT UTUTh L pKebXkbControlsNotify H?  b bZH?  O J UTUT` M 1UTKeyboard controls state change ſH-  b ] ſH-  OUT UTUT` N 1ap10.11 lV  b] lV  P UTUTh O p cXkbIndicatorStateNotify V?  b V?  Pt UT UTUT` P 1!Keyboard indicators state change ſV-  b ^ NſV-  I PXkta UTUT` Q 18.5 ld  b^ ld  Q J UTUTh R ptedXkbIndicatorMapNotify d?  b d? UT Q` Kti UTUT` S 1Keyboard indicators map change ſd-  b _ TUTſd- on Qfy  UTUT` T 18.5 lr  b_ Olr  M Rboa c UTUTh U pgeeXkbNamesNotify r?  b r? UT R` Nap UTUT` V 1Keyboard name change d aPXkHH b HHy)) PUT) UT UTdG 2ic3Initialization and General Programming Information #l G 3Extension Header Files ^ ta7d I 4:The following include files are part of the Xkb standard: LURUT, J {T UTXUPUTD J {Xk[XKBlib.h  =is the main header file for Xkb; it declares constants, types, and functions. dUNUT, K {UTU pULUT K {UXKBstr.h  =declares types and constants for Xkb. It is included automatically from T|UJUT K {8.W =; you should never need to reference it directly in your application  cUHUTD K =gecode. UFUT, L {V UDUT L {TXKB.h  =defines constants for Xkb. It is included automatically from  { =; you should never need to reference it directly in your application code. U@UT, M {Z )U>UT M {UXKBgeom.h  =declares types, symbolic constants, and functions for manipulating keyU<UTD M =board geometry descriptions. l W 3Extension Name[ de d 4thFThe name of the Xkb extension is given in  {: d) #define XkbName XKEYBOARD X&$ k 4nsdMost extensions to the X protocol are initialized by calling  XInitExtension 4 and passing the 3 k 4laVextension name. However, as explained in section 2.4, Xkb requires a more complex ini@D k 4=\tialization sequence, and a client program should not call  XInitExtension 4 directly. coYl H 3 L&Determining Library Compatibility\ m, 4XK]If an application is dynamically linked], both the X server and the client-side X library z 4=Ymust contain the Xkb extension in order for the client to use the Xkb extension capabiliM 4on\ties. Therefore a dynamically linked application must check both the library and the server d  4puYfor compatibility before using Xkb function calls. A properly written program must check s 4Xfor compatibility between the version of the Xkb library that is dynamically loaded and  4#dWthe one used when the application was built. It must then check the server version for nitD 4 6compatibility with the version of Xkb in the library. $ 4me\If your application is statically linked, you must still check for server compatibility and ti 4, \may check library compatibility. (It is possible to compile against one set of header files De 4Co]and link against a different, incompatible, version of the library, although this should not eD 4t-normally occur.)  l N 4mu\^To determine the compatibility of a library at runtime, call  XkbLibraryVersion 4. !U:UTl O =. [Bool  4_ tXkbLibraryVersion =( lib_major_in_out =,  lib_minor_in_out =) .U8UTd P =co]int * lib_major_in_out; =/* specifies and returns the major Xkb library version. */ ;U6UTd Q =at]int * lib_minor_in_out; =/* specifies and returns the minor Xkb library version. */ N$ T 4 w`Pass the symbolic value  {XkbMajorVersion 4 in  lib_major_in_out 4 and  {XkbMinorVerco[ T {hecsion 4 in  lib_minor_in_out 4. These arguments represent the version of the library used at usth T 4er[compile time. The  XkbLibraryVersion  4function backfills the major and minor version e tu T 4oninumbers of the library used at run time in  lib_major_in_out 4 and  lib_minor_in_out 4. If the bſr-  b ` ſr-  R N UTUT` W 1mi18.5 l  b` Xl  S O UTUTh X pfXkbCompatMapNotify  ?  b )? co S b_ UTUT` Y 1"Keyboard compatibility map change ſ-  b a tinſ- ut S* sci UTUT` Z 1he17.5 l  ba wPal  TrVeio UTUTh [ pajgXkbBellNotify ?  b i?  T arme UTUT` \ 1veKeyboard bell generated atſ-  b b ſ- fu Tckfls UTUT` ] 1or9.4 onli  b bryli  Ur_iou UTUTh ^ pmihXkbActionMessage bi?  b i?  U N UTUT` _ 1miKeyboard action message ſi-  b c ſi- UT Uh X UTUT` ` 1UT16.1.11 lv  bc )lv  Vb_UT UTUTh a pKeiXkbAccessXNotify pv?  b v?  V S UTUT` b 1AccessX state change ſv-  b  ſv- T V UTUT UTUT` c 1Xk10.6.4 fy l  b il  W arme UTUTh d pvejXkbExtensionDeviceNotify ?  b ?  WlsUT UTUT` e 19.Extension device change ſ-  b  ſ- UT Wpmi UTUT` f 1 b21.6 k  b k U X UTUTh moa# XkbSelectEvents Mask Constants s  b s UT X` `UTd 4 mB b  mBb_ YUT ` 7cc Event Mask up b  up YSUT ` 7AcNotification Wanted m)B  b  m)B  ZUTUT UTUT` p10XkbNewKeyboardNotifyMask u)p  b  u)p UT Zh dve UTUT` 1DeKeyboard geometry change m7B  b  m7B UT [ e UTUT` pviXkbMapNotifyMask u7p  b  u7p W [ UTUT UTUT` 1 Keyboard mapping change bmEB  b  U mEB  \# Xk UTUT` p CXkbStateNotifyMask uEp  b  uEp  ` \ UTUT` 1Keyboard state change mSB  b  YUTmSB cc ]ask UTUT` pXkbControlsNotifyMask uSp  b  TuSp fi ]nte UTUT` 1Keyboard control change maB  b  TUTmaB yb ^yMa UTUT` pXkbIndicatorStateNotifyMask uap  b  Tuap me ^e  UTUT` 1!Keyboard indicator state change moB  b  vimoB  _  UTUT` pXkbIndicatorMapNotifyMask uop  b  eoauop  _  UTUT` 1Keyboard indicator map change m}B  b  ofym}B  ` b UTUT` pXkbNamesNotifyMask u}p  b  steu}p B ` b UTUT` 1UTKeyboard name change mB  b  nolmB p a b UTUT` pXkbCompatMapNotifyMask up  b  ctrup B a b UTUT` 1UTKeyboard compat map change ^mB  b  teNmB p b b UTUT` pXkbBellNotifyMask up  b  eoaup ng boB UTUT` 1 Bell mB  b  mB Xk crMaot UTUT` ppXkbActionMessageMask up  b  _up  cd iic UTUT` 1 Action message mB  b  mB UT d`  UTUT` p `XkbAccessXNotifyMask up  b  up UT d` UT UTUT` 1anAccessX features mB  b  mB  b e UTUT` pNoXkbExtensionDeviceNotifyMask up  b  up UT e` UT UTUT` 1maExtension device miB  b  miB b f UTUT UTUT` pelXkbAllEventsMask uip  b  uip b f UTUT UTUT` 1 All Xkb events d aUTHH b HH   ic$ onZXkbIgnoreExtension 4 tells the X library whether to use the X Keyboard Extension on any  4csubsequently opened X display connections. If ignore is  {True 4, the library does not initialUT" 4UTWize the Xkb extension when it opens a new display. This forces the X server to use com/ 4 Vpatibility mode and communicate with the client using only core protocol requests and < 4ievents. If ignore is  {False 4, the library treats subsequent calls to  XOpenDisplay 4 normally I 4Zand uses Xkb extension requests, events, and state. Do not explicitly use Xkb on a connecV 4 bjtion for which it is disabled.  XkbIgnoreExtension 4 returns  {False 4 if it was unable to apply cD 4 athe ignore request. |l 3LProtocol Errorsj $ 6WMany of the Xkb extension library functions described in this document can cause the X  6Xkbserver to report an error, referred to in this document as a  {BadXxx 6 protocol error, where  {UT_Xxx 6 is some name. These errors are fielded in the normal manner, by the default Xlib error  6thchandler 4  6or one replacing it. Note that X protocol errors are not necessarily reported imme4 D 6anXdiately 4 because of  6the buffering of X protocol requests in Xlib and the server. evBl1 4 QTable 2.1 lists the protocol errors that can be generated, and their causes. $0 4`The Xkb extension adds a single protocol error,  {BadKeyboard 4, to the core protocol error 0 4 fjset. This error code will be reported as the  }error_rtrn 4 when  XkbQueryExtension 4 is called. 0 4igbWhen a  {BadKeyboard 4 error is reported in an  {XErrorEvent 4, additional information is 0 4y mreported in the  resource_id 4 field. The most significant byte of the  resource_id 4 is a further e0 4en\refinement of the error cause, as defined in Table 2.2. The least significant byte will conerBL0 4n Ftain the device, class, or feedback ID as indicated in the table.c GlF 3ne8vDisplay and Device Specifications in Function Calls ri[$ 4 LWhere a connection to the server is passed as an argument (Display*) and an eqh {th_XkbDescPtr 4 is also passed as an argument, the Display* argument must match the  dpy 4 theu 4mfield of the  {XkbDescRec 4 pointed to by the  {XkbDescPtr 4 argument, or else the  dpy 4 field o 40tof the  {XkbDescRec 4 must be  {NULL 4. If they dont match or the  dpy 4 field is not  {NULL 4, a d ar irEntHH b 0HH~  The mos by { 4eBadMatch 4 error is returned (either in the return value or a backfilled  {Status 4 variable).  4ileUpon successful return, the  dpy 4 field of the  {XkbDescRec 4 always contains the Display* "D 4value passed in. e7$ 0 4 FUThe Xkb extension can communicate with the X input extension if it is present. ConseaD 0 4 a[quently, there can potentially be more than one input device connected to the server. Most menQ 0 4 ZXkb library calls that require communicating with the server involve both a server connec^ 0 4t,ltion (Display *  }dpy 4) and a device identifier (unsigned int  }device_spec 4). In some cases, the dok 0 4 kdevice identifier is implicit and is taken as the  device_spec 4 field of an  {XkbDescRec 4 strucxD 0 4ture passed as an argument. ,L 4ewThe device identifier can specify any X input extension device with a  KeyClass 4 comporL 4errnent 4, 4 or  4it can specify  4the constant,  {XkbUseCoreKbd 4. 4 The use of  {XkbUseCoreKbd 4 L 4 tiallows applications to indicate the core keyboard without  4having to  4determin 4e 4 its device 0DL 4ns identifier. ic$ 4utZWhere an Xkb device identifier is passed as an argument and an  {XkbDescPtr 4 is also  4t epassed as an argument, if either the argument or the  {XkbDescRec 4  }device_spec 4 field is i { ihXkbUseCoreKbd 4, and if the function returns successfully, the  {XkbDescPtr 4  -device_spec 4 si 4e__field will have been converted from  {XkbUseCoreKbd 4 to a real Xkb device ID. If the funcas  4c\tion does not complete successfully, the  -device_spec 4 field remains unchanged. Subse   4cquently, the device id argument must match the  }device_spec 4 field of the  {XkbDescPtr 4 or 4ercargument. If they dont match, a  {BadMatch 4 error is returned (either in the return value or Use$D 4(a backfilled  {Status 4 variable). at9$ 4d YWhen the Xkb extension in the server hands an application a device identifier to use for cF 4ut^the keyboard, that ID is the input extension identifier for the device if the server supports S 4paZthe X Input Extension. If the server does not support the input extension, the meaning of ` 4]the identifier is undefined the only guarantee is that when you use  {XkbUseCoreKbd 4, m {si]XkbUseCoreKbd 4 will work and the identifier returned by the server will refer to the core ezD 4nckeyboard device. d at emnsHH b utlHHen++ice_spec th+ UT UTl 2Data Structures6 me$ 4maTAn Xkb keyboard description consists of a variety of data structures, each of which , 4llYdescribes some aspect of the keyboard. Although each data structure has its own peculiarh9 4n Xities, there are a number of features common to nearly all Xkb structures. This chapter xtFD 4foGdescribes these common features and techniques for manipulating them. ens[$ 4 dSMany Xkb data structures are interdependent; changing a field in one might require ierh 4e Vchanges to others. As an additional complication, some Xkb library functions allocate u 4orWrelated components as a group to reduce fragmentation and allocator overhead. In these ke 4Xcases, simply allocating and freeing fields of Xkb structures might corrupt program mem 4Wory. Creating and destroying such structures or keeping them properly synchronized dur+D 4-ing editing is complicated and error prone. n$ 4riVXkb provides functions and macros to allocate and free all major data structures. You D 4t Kshould use them instead of allocating and freeing the structures yourself. d 3heAllocating Xkb Data Structures n t, 4tr_SXkb provides functions, known as allocators, to create and initialize Xkb data structures. man 4ns\In most situations, the Xkb functions that read a keyboard description from the server call ht 4^these allocators automatically. As a result, you will seldom have to directly allocate or iniD 4 tialize Xkb data structures. r'$ 4meYHowever, if you need to enlarge an existing structure or construct a keyboard definition a4 4ofYfrom scratch, you may need to allocate and initialize Xkb data structures directly. Each iA 4 oYmajor Xkb data structure has its own unique allocator. The allocator functions share comdN 4 n[mon features: allocator functions for structures with optional components take as an input tru[ 4Yargument a mask of subcomponents to be allocated. Allocators for data structures containhD 4heUing variable-length data take an argument specifying the initial length of the data. n}$ 4 tXYou may call an allocator to change the size of the space allocated for variable-length th 4at\data. When you call an allocator with an existing data structure as a parameter, the allocaom 4ul\tor does not change the data in any of the fields, with one exception: variable-length data uc 4Vmight be moved. The allocator resizes the allocated memory if the current size is too  4Xsmall. This normally involves allocating new memory, copying existing data to the newly re 4Wallocated memory, and freeing the original memory. This possible reallocation is imporons 4\tant to note because local variables pointing into Xkb data structures might be invalidated s D 4!by calls to allocator functions. bd 3ll(Adding Data and Editing Data Structures ta, 4 [ _You should edit most data structures via the Xkb-supplied helper functions and macros, } 4YoWalthough a few data structures can be edited directly. The helper functions and macros  4daWmake sure everything is initialized and interdependent values are properly updated for om, 4ulZthose Xkb structures that have interdependencies. As a general rule, if there is a helper 9 4 ]function or macro to edit the data structure, use it. For example, increasing the width of a F 4smYtype requires you to resize every key that uses that type. This is complicated and ugly, SD 4al;which is why theres an  XkbResizeKeyType 4 function. e rh$ 4or\Many Xkb data structures have arrays whose size is reported by two fields. The first field, esu 4tecwhose name is usually prefixed by  sz_ 4, represents the total number of elements that can be tin 4taastored in the array. The second field, whose name is usually prefixed by  num_ 4, specifies sd au ae itHH b sHHma++itialize en+ 4pd[the number of elements currently stored there. These arrays typically represent data whose ral 4 aZtotal size cannot always be determined when the array is created. In these instances, the "D 4e 8usual way to allocate space and add data is as follows: iz6UTUTd 1seACall the allocator function with some arbitrary size, as a hint. hBURUT$ 1 a_For those arrays that have an  <Xkb...Add... 1 function, call it each time you want to add s wNUPUTD 1 Dnew data to the array. The function expands the array if necessary. s `d 4y For example, call: ts ud 4f XkbAllocGeomShapes(geom,4) $ 4edTto say Ill need space for four new shapes in this geometry. This makes sure that fi hsz_shapes 4 -  num_shapes 4 >= 4, and resizes the shapes array if it isnt. If this function suc sD 4Lceeds, you are guaranteed to have space for the number of shapes you need. $ 4f WWhen you call an editing function for a structure, you do not need to check for space,  4zelbecause the function automatically checks the  sz_ 4 and  num_ 4 fields of the array, resizes the y D 4anZarray if necessary, adds the entry to the array, and then updates the  num_ 4 field. d 3in4Making Changes to the Servers Keyboard Description n , 41_ `In Xkb, as in the core protocol, the client and server have independent copies of the data fun  4arXstructures that describe the keyboard. The recommended way to change some aspect of the ll 44)Ykeyboard mapping in the X server is to edit a local copy of the Xkb keyboard description i' 4fiXand then send only the changes to the X server. This method helps eliminate the need to y 4 4isYtransfer the entire keyboard description or even an entire data structure for only minor rAD 4d. changes. V$ 4 yWTo help you keep track of the changes you make to a local copy of the keyboard descripc 4usftion, Xkb provides separate special  changes 4 data structures for each major Xkb data strucp 4an]ture. These data structures do not contain the actual changed values: they only indicate the }D 4MaSchanges that have been made to the structures that actually describe the keyboard. as$ 4coYWhen you wish to change the keyboard description in the server, you first modify a local t 4 tScopy of the keyboard description and then flag the modifications in an appropriate Yke 4thWchanges data structure. When you finish editing the local copy of the keyboard descripXan 4heRtion, you pass your modified version of the keyboard description and the modified  4 eTchanges data structure to an Xkb function. This function uses the modified keyboard  4 [description and changes structure to pass only the changed information to the server. Note eyb 4Uthat modifying the keyboard description but not setting the appropriate flags in the eD 4kb6changes data structure causes indeterminate behavior. d 3in(Tracking Keyboard Changes in the Server ca$ 4]The server reports all changes in its keyboard description to any interested clients via spes' 4co\cial Xkb events. Just as clients use special changes data structures to change the keyboard 4 4co\description in the server, the server uses special changes data structures to tell a client AD 4da4what changed in the servers keyboard description. f V$ 4ipXUnlike clients, however, the server does not always pass the new values when it reports ac 4[changes to its copy of the keyboard description. Instead, the server only passes a changes keyp 4Zdata structure when it reports changes to its keyboard description. This is done for effi} 4Vciency reasons some clients do not always need to update their copy of the keyboard D 4/description with every report from the server. ermqH  b yi KqH  S z | UTUT` 4 =se(1L<<6) ts~  b y y ~  s z } UTUT` 5 = eXkbAllComponentsMask u)H  b yehe)H  z }\deri UTUT` 6 =r, All Fields sesqH  b ycenqH da z }ang i UTUT` =bo(0x7f) iptlHc  bp  sholHc  n ~ pa t UTUTh = ikBadAccess HM   b q eeyHM te ~erv o UTUT` =es4The Xkb extension has not been properly initialized ts?   bido? QVcicyUVUTd  8ie \?  b t k\? Rcriio `  7t Boolean Control? mlc   b~  i Klc  S  UTUTh =se pBadValue M   b  M  UT UTUT` =XkAn argument is out of range d  a priUTHH  b  HHw** da i* }f)device_info 4-> leds 4.  }device_info 4-> leds 4-> led_class 4 and  led_id 4 specify the input extension H 4 bXclass and device ID for each indicator device to modify; if they have invalid values, a ex" {enkBadValue 4 protocol error results and  XkbSetDeviceInfo 4 returns  {False 4. If they have legal cy/ 4ie]values but do not specify a keyboard or indicator class feedback for the device in question, < 4Bo{a  {BadMatch 4 error results. If any of the values in  device_info 4-> leds }-> names 4 are not a valid ID 4@Atom or  {None 4, a  {BadAtom 4 protocol error results. ^$w 4UTWXkb provides convenience functions to modify subsets of the information accessible via kw `XkbSetDeviceInfo 4. Only the parts of the structure indicated in the function description are xDw 4@modified. These convenience functions are described as follows. s$ 4foYTo change only the button actions for an input extension device, use  XkbSetDeviceButD cltonActions 4. foUTUTl =evlBool O tXkbSetDeviceButtonActions =( dpy =,  device, first_button, num_buttons, actions =)  URUTd = 6Display * dpy =;/* connection to X server */ UPUTd =es^XkbDeviceInfoPtr device_info =;/* structure defining the device and modifications */ UNUTd ={Xunsigned int first_button =;/* number of first button to update, 0 relative */ nULUTd = vFunsigned int num_buttons =;/* number of buttons to update */ $ tsXXkbSetDeviceButtonActions 4 assigns actions to the buttons of the device specified in rm iamdevice_info 4-> device_spec .  4Actions are assigned to  }num_buttons 4 buttons beginning with iD }dfirst_button 4 and are taken from the actions specified in  }device_info 4-> btn_acts 4. To$$k 4ut^If the server does not support assignment of Xkb actions to extension device buttons,  Xkb1k UTgSetDeviceButtonActions 4 has no effect and returns  {False 4. If the device has no buttons or if ns,>k URdfirst_button 4 or  num_buttons 4 specify buttons outside of the valid range as determined by eIKk }_iodevice_info 4-> num_btns 4, the function has no effect and returns  {False 4. Otherwise,  XkbSettonXk f ^DeviceButtonActions 4 sends a request to the server to change the actions for the specified eDk 4to"buttons and returns  {True 4. z$u 4oncIf the actual request sent to the server involved illegal button numbers, a  {BadValue 4 protoinfu 4spHcol error is generated. If an invalid device identifier is specified in wiu idevice_info 4-> device_spec 4, a  BadKeyboard 4 protocol error results. If the actual device ou 4utgspecified in  }device_info 4-> device_spec 4 does not contain buttons and a request affecting Du 4eBAbuttons is made, a  {BadMatch 4 protocol error is generated. vd 3 oXkbExtensionDeviceNotify Event st_, 4nu[The Xkb extension generates " {XkbExtensionDeviceNotify 4 events when the status of }_i 4>n input extension device changes or when an attempt is made to use an Xkb feature that is tonD 4f 'not supported by a particular device. to UJUT$ =ngUEvents indicating an attempt to use an unsupported feature are delivered only to the UHUTD =onclient requesting the event. *$ 4d YTo track changes to the status of input extension devices or attempts to use unsupported r7 4d [features of a device, select to receive  {XkbExtensionDeviceNotify 4 events by calling , DD 4 4Seither  XkbSelectEvents 4 or  XkbSelectEventDetails 4 (see section 4.3). }dY$! 4WTo receive  {XkbExtensionDeviceNotify 4 events under all possible conditions, call Abuf! {aXkbSelectEvents 4 and pass  {XkbExtensionDeviceNotifyMask 4 in both  }bits_to_change 4 _sD! 4nuand  }values_for_bits 4. d  ah t qHH b  wn HHus.. tonf .$f 4cuWThe  {XkbExtensionDeviceNotify 4 event has no event details. However, you can call feaf odXkbSelectEventDetails 4 using  {XkbExtensionDeviceNotify 4 as the  }event_type 4 and spec t"f 4puiifying  {XkbAllExtensionDeviceMask 4 in  }bits_to_change 4 and  }values_for_bits. 4 This has e/Df 4si6the same effect as a call to  XkbSelectEvents 4. Dd# kb>The structure for  {XkbExtensionDeviceNotify  events is: XUTUT$$ =typedef struct { eeURUT$ =ev1inttype;/* Xkb extension base event code */ rUPUT$ =Aunsigned long serial;/* X server serial number for event */ MUNUT$ =}BBool send_event;/*  {True = => synthetically generated*/ ULUT$ =LDisplay *display;/*  1server connection where event generated = */ UJUT$ =>Time time;/*  1server time when event generated = */ UHUT$ =f >int xkb_type;/*  pXkbExtensionDeviceNotifyEvent = */ UFUT$ =enOint device;/* Xkb device  1ID =, will not be  pXkbUseCoreKbd = */ 4 UDUT$ =si5unsigned int reason;/* reason for the event */ tUBUT$ =pu=unsigned int supported;/* mask of supported features */ eU@UT$ =s_Vunsigned int unsupported;/* unsupported features this client attempted to use */ U>UT$ =3int first_btn;/* first button that changed */ eNoU<UT$ =: 6intnum_btns;/* number of buttons that changed */ U:UT$ =/Cunsigned int leds_defined;/* indicators with names or maps */ ongU8UT$ =erBunsigned int led_state;/* current state of the indicators */ U6UT$ = 8int led_class;/* feedback class for LED changes */ pl(U4UT$ = :int led_id;/* feedback  1ID = for LED changes */ 5U2UTL$ =e -}  XkbExtensionDeviceNotifyEvent =; dH$C 4[The  {XkbExtensionDeviceNotify 4 event has fields enabling it to report changes in the OiUC 4kb\state (on/off) of all of the buttons for a device, but only for one LED feedback associated t bC 4onTwith a device. You will get multiple events when more than one LED feedback changes rtoDC 4U@state or configuration. d l 3.MTracking Changes to Extension Devices $ 4UChanges to an Xkb extension device may be tracked by listening to  {XkbDeviceExteni {nu[sionNotify 4 events and accumulating the changes in an  {XkbDeviceChangesRec 4 strucato 4apVture. The changes noted in the structure may then be used in subsequent operations to  4Zupdate either a server configuration or a local copy of an Xkb extension device configuraD 4ee3tion. The changes structure is defined as follows: =e U0UT$ =en#typedef struct _XkbDeviceChanges { U.UT =Xk@unsigned intchanged;/* bits indicating what has changed */ chU,UT =Punsigned shortfirst_btn;/* number of first button which changed, if any */ on U*UT =ocNunsigned shortnum_btns;/* number of buttons  1that  =have changed */ U(UT =eeXkbDeviceLedChangesRec leds; &U&UTL =fi8}  XkbDeviceChangesRec =,*XkbDeviceChangesPtr; Ex:U$UT$ = &typedef struct _XkbDeviceLedChanges { GU"UT =ayKunsigned shortled_class;/* class of this indicator feedback bundle */ ifyTU UT =cuMunsigned shortled_id;/*  1ID = of this indicator feedback bundle */ aUUT =anFunsigned intnames;/* bits indicating which names have changed */ nUUT =Dunsigned intmaps;/* bits indicating which maps have changed */ si{UUT =aZstruct _XkbDeviceLedChanges *next;/* link to indicator change record for next set */ UUTL =ct>}  XkbDeviceLedChangesRec =,*XkbDeviceLedChangesPtr; lc  b *chlc u \horfi UTUTh j =errBadDevice M  b  ocM  \numr UTUT` =t 7Device, Feedback Class, or Feedback  1ID = invalid ang\?  b +bD\? kbSngetr UTUT` 1No &ty\?  b T\? orTss;/ UTUT` 1diBoolean ba \?   b .gd  \? IUthiin UTUT` 1unNo / 3\?   b * 3\? naVchaed UTUT` 1Boolean igO\?   b phaO\? UTW=as UTUT`C 1dCBoolean xtk\?   b  xtk\? X UTUT`D 1sRBoolean bDd  a bHH  b  jerHH** *$ 4umUThe global locked or effective group changes. In this case, the changed group is nor 4`malized into range according to the settings of the  }groups_wrap 4 field of the  {XkbCon"D { b>trolsRec 4 structure for the keyboard (see section 10.7.1). 7$ 4BoWThe Xkb library is interpreting an event with an effective group that is legal for the thiD 4Ykeyboard as a whole, but not for the key in question. In this case, the group to use for VQ ~_this event only 4 is determined using the  }group_info 4 field of the key symbol mapping W^D 6.( {XkbSymMapRec 6) 4 for the event key. s$ 4xtTEach nonmodifier key on a keyboard has zero or more symbols, or keysyms, associated  4]with it. These are the logical symbols that the key can generate when it is pressed. The set  4[of all possible keysyms for a keyboard is divided into groups. Each key is associated with ed  4 cUzero or more groups; each group contains one or more symbols. When a key is pressed, e 4seZthe determination of which symbol for the key is selected is based on the effective group D 4heEand the shift level, which is determined by which modifiers are set. s$ 4ve[A client that does not explicitly call Xkb functions, but that otherwise makes use of an X , b 4 i]library containing the Xkb extension, will have keyboard state represented in bits 0 - 14 of t 4 ]the state field of events that report modifier and button state. Such a client is said to be ) 4 kr fXkb-capable 4. A client that does explicitly call Xkb functions is an  fXkb-aware 4 client. The  4wiVXkb keyboard state includes information derived from the effective state and from two   4 Vserver parameters that can be set through the keyboard extension. The following compoD 4Fnents of keyboard state pertain to Xkb-capable and Xkb-aware clients: +UTUTl 4pr8 =lookup state: lookup group and lookup modifiers ym7URUTl = s.grab state: grab group and grab modifiers I, 4thsThe  flookup modifiers 4 and  flookup group 4 are represented in the state field of core X events. ly V 4, WThe modifier state and keycode of a key event are used to determine the symbols associextc 4kebated with the event. For  {KeyPress 4 and  {KeyRelease 4 events, the lookup modifiers are pD 4ut computed as: d 4o A((base | latched | locked) & ~ }server_internal_modifiers 4) ed 4Xk0Otherwise the lookup modifiers are computed as: e d 4wi\(((base | latched | (locked & ~ }ignore_locks 4)) & ~ }server_internal_modifiers 4) d 4er5The lookup group is the same as the effective group. i$ 4coPWhen an Xkb-capable or Xkb-aware client wishes to map a keycode to a keysym, it waD 4UTQshould use the  flookup state 4 the lookup group and the lookup modifiers. $ t 4 sbThe  fgrab state 4 is the state used when matching events to passive grabs. If the event acti t 4 uvates a grab, the   fgrab modifiers 4 and   fgrab group 4 are represented in the state field of core X vD t 4teQevents; otherwise, the lookup state is used. The grab modifiers are computed as: r*d 4yRL(((base | latched | (locked & ~ignore_locks)) & ~server_internal_modifiers) ?$ 4o cIf the servers  {IgnoreGroupLock 4 control (see section 10.7.3) is not set, the grab group is he L 4reUthe same as the effective group. Otherwise, the grab group is computed from the base 4YD 4in4group and latched group, ignoring the locked group. upn$ 4 a[The final three components of Xkb state are applicable to clients that are not linked with to { 4 kWan Xlib containing the X keyboard extension library and therefore are not aware of the andL 4er6keyboard extension ( fXkb-unaware  4clients): d  agbsHH  b  dieHHvb d in thef UTUTl =te%The compatibility modifier state sURUTd =di(The compatibility lookup modifier state yRUPUTd =d &The compatibility grab modifier state 1$ 4 ZThe X11 protocol interpretation of modifiers does not include direct support for multiple > 4b Ugroups. When an Xkb-extended X server connects to an Xkb-unaware client, the compatigK 4roWbility states remap the keyboard group into a core modifier whenever possible. The comnX 4Th[patibility state corresponds to the effective modifier and effective group state, with the {e 4anYgroup remapped to a modifier. The compatibility lookup and grab states correspond to the r 4keYlookup and grab states, respectively, with the group remapped to a modifier. The compati 4\bility lookup state is reported in events that do not trigger passive grabs; otherwise, the D 4&compatibility grab state is reported. d 3ThChanging the Keyboard State sd 3diChanging Modifiers ook$x 4yR[The functions in this section that change the use of modifiers use a mask in the parameter tocBLx }ofOaffect 4. It is a bitwise inclusive OR of the legal modifier masks:  upsdN 4ndWTo lock and unlock any of the eight real keyboard modifiers, use  XkbLockModifiers: staU>UTl =oaT =Bool  tXkbLockModifiers =( display, device_spec, affect, values =) biU<UTd =on=Display * display =;/* connection to the X server */ eU:UTd =Uunsigned int device_spec =;/* device  1ID =, or  wXkbUseCoreKbd = */ U8UTd =Yunsigned int affect =;/* mask of real modifiers whose lock state is to change */ cU6UTd =junsigned int values =;/* 1 => lock, 0 => unlock; only for modifiers selected by  affect = */ $ co_XkbLockModifiers  sends a request to the server to lock the real modifiers selected by both  } Mvaffect  and  }values  and to unlock the real modifiers selected by  }affect  but not selected by  }val }lues .  XkbLockModifiers  does not wait for a reply from the server. It returns  {True  if the ndD ck/request was sent, and  {False  otherwise. X*d 4taZTo latch and unlatch any of the eight real keyboard modifiers, use  XkbLatchModifiers: ?U4UTl =Q Bool  tXkbLatchModifiers =(d isplay, device_spec, affect, values =) :LU2UTd =un=Display * display =;/* connection to the X server */ kYU0UTd = Uunsigned int device_spec =;/* device  1ID =, or  {XkbUseCoreKbd = */ kfU.UTd =e Uunsigned int affect =;/* mask of modifiers whose latch state is to change */ sU,UTd =ctgunsigned int values =;/* 1 => latch, 0 => unlatch; only for mods selected by  affect = */ thed  a }alHH  b  lteHHt $$ ue$$ saXkbLatchModifiers  sends a request to the server to latch the real modifiers selected by both k }, oaffect  and  }values  and to unlatch the real modifiers selected by  }affect  but not selected by rs," }odpvalues .  XkbLatchModifiers  does not wait for a reply from the server. It returns  {True  if the U2/D Di/request was sent, and  {False  otherwise. serHl& 3!Changing Groups \Bl3 4;JReference the keysym group indices with these "symbolic constants:  d4 4ec1To lock the keysym group, use  XkbLockGroup. oULUTl5 =UTC#Bool  tXkbLockGroup =( display, device_spec, group =) ch;UJUTd6 =ec=Display * display =;/* connection to the X server */ UHUTd7 =Uunsigned int device_spec =;/* device  1ID =, or  wXkbUseCoreKbd = */ UFUTd8 =Eunsigned int group =;/* index of the keysym group to lock */ t$$9 ndiXkbLockGroup 4 sends a request to the server to lock the specified  }group  4and  does not wait d1D9 d Zfor a reply. It returns  {True  if the request was sent and  {False  otherwise. Fd: 42To latch the keysym group, use  XkbLatchGroup. [UDUTl; = ID$Bool  tXkbLatchGroup =( display, device_spec, group =) , hUBUTd< =ot=Display * display =;/* connection to the X server */ uU@UTd= =reUunsigned int device_spec =;/* device  1ID =, or  {XkbUseCoreKbd = */ cU>UTd> =ymFunsigned int group =;/* index of the keysym group to latch */ $? spkXkbLatchGroup 4 sends a request to the server to latch the specified group   4and  does not wait er D? 7Zfor a reply. It returns  {True  if the request was sent and  {False  otherwise. l@ 3%Determining Keyboard State indA 4grKXkb keyboard state may be represented in an  {XkbStateRec 4 structure: seU<UT$B =petypedef struct { 4U:UTB =wa5unsigned chargroup;/* effective group index */ rU8UTB =es5unsigned charbase_group;/* base group index */ : U6UTB =;unsigned charlatched_group;/* latched group index */ BoU4UTB =up9unsigned charlocked_group;/* locked group index */ <%U2UTB =2unsigned charmods;/* effective modifiers */ 2U0UTB =un2unsigned charbase_mods;/* base modifiers */ ?U.UTB =re8unsigned charlatched_mods;/* latched modifiers */ =LU,UTB = k6unsigned charlocked_mods;/* locked modifiers */ YU*UTB =quCunsigned charcompat_state;/* effective group => modifiers */ ot fU(UTB =<unsigned chargrab_mods;/* modifiers used for grabs */ wasU&UTB =seQunsigned charcompat_grab_mods;/* mods used for compatibility mode grabs */ U$UTB =oaFunsigned charlookup_mods;/* modifiers used to lookup symbols */ U"UTB =tyOunsigned charcompat_lookup_mods;/* mods used for compatibility lookup */ ind  arba ainx HH  b  heHHgr--Bd -l/ 3ocComponent Names UT,0 4ighComponent names have the form  fclass(member) 4 where  fclass 4 describes a subset of the if)0 4aavailable components for a particular type and the optional  fmember 4 identifies a specific 60 4Ucomponent from that subset. For example, the name atlantis(acme) for a symbols comiC0 4erWponent might specify the symbols used for the atlantis national keyboard layout by the waP0 4se]vendor acme. Each class has an optional  fdefault 4 member references that specify a ]0 4d [class but not a member refer to the default member of the class, if one exists. Xkb places harj0 4dsUno constraints on the interpretation of the class and member names used in component wD0 4names. $1 4gThe  class 4 and  member 4 names are both specified using characters from the Latin-1 characd 1 4Vter set. Xkb implementations must accept all alphanumeric characters, minus (-) and 1 4 [underscore (_) in class or member names, and must not accept parentheses, plus, vertical nen1 4r [bar, percent sign, asterisk, question mark, or white space. The use of other characters is romD1 4eximplementation-dependent. l2 3 c*Listing the Known Keyboard Components $3 4d UYou may ask the server for a list of components for one or more component types. The 3 4 oZrequest takes the form of a set of patterns, one pattern for each of the component types, 3 4 t`including a pattern for the complete keyboard description. To obtain this list, use  XkbListtsD3 tiComponents 4. d (UTUTl4 =invXkbComponentListPtr t BXkbListComponents =( dpy =,  device_spec =,  ptrns =,  max_inout =) 5URUTd5 =ac7Display * dpy =;/* connection to X server */ seBUPUTd6 =ioWunsigned int device_spec =;/* device  1ID =, or  wXkbUseCoreKbd = */ oreOUNUTd7 = mQXkbComponentNamesPtr ptrns =;/* namelist for components of interest */ \ULUTd8 =n,Dint * max_inout =;/* max # returned names, # left over */ iso$: 1XXkbListComponents 4 queries the server for a list of component names matching the pats|: 43cterns specified in  }ptrns 4. It waits for a reply and returns the matching component names in : 4ta\an  {XkbComponentListRec 4 structure. When you are done using the structure, you should 3: 4pagfree it using  XkbFreeComponentList 4.  }device_spec 4 indicates a particular device in which Co: 4UT^the caller is interested. A server is allowed (but not required) to restrict its reply to porD: 4,Dtions of the database that are relevant for that particular device. c$; }vebptrns 4 is a pointer to an  {XkbComponentNamesRec 4, described below. Each of the fields in ; }re\ptrns 4 contains a pattern naming the components of interest. Each of the patterns is comer; 4`posed of characters from the ISO  {Latin1 4 encoding, but can contain only parentheses, the 1; 4siwildcard characters  {? 4 and  {* 4, and characters permitted in a component class or member e; 4. ]name (see section 20.1). A pattern may be  {NULL 4, in which case no components for that {; 4ec`type is returned. Pattern matches with component names are case sensitive. The  {? 4 wildus; 4po`card matches any single character, except a left or right parenthesis; the  {* 4 wildcard th ; 4st[matches any number of characters, except a left or right parenthesis. If an implementation Dti-; 4e Rallows additional characters in a component class or member name other than those :; 4XZrequired by the Xkb extension (see section 20.1), the result of comparing one of the addiGD; 4teTtional characters to either of the wildcard characters is implementation-dependent. \$< 4er[If a pattern contains illegal characters, the illegal characters are ignored. The matching ;iD< 4raSprocess is carried out as if the illegal characters were omitted from the pattern. emb~$= };amax_inout 4 is used to throttle the amount of data passed to and from the server. On input, it {= 4ecWspecifies the maximum number of names to be returned (the total number of names in all 4d  aa s[[ ble og   b Srthg maT nuerho ce XkbAllocClientMap Masks .    bS al teTompendp 4na ol  b  Sr bleeT20., `q arMask    b  Sact ilTracrs `r -dEffect l3  b  S lel3 leTcte a UTUT`s =tcXkbKeyTypesMask  3 b  !Sieg 33ttThe tt  t 4DThe  type_count  4field specifies the number of entries to pretot 4er?allocate for the  types 4 field of the client map. If the r o"t rnCtype_count  4field is less than  {XkbNumRequiredTypes 4 (see .@t 4+section 15.2.1), returns  {BadValue 4. l9 ! b "Sl9 T hoce UTUT`u =ntXkbKeySymsMask  9 " b ! #S 99T  UTUT v =LThe  min_key_code 4 and  max_key_code 4 fields of the  xkb 4 0.URUTv 4qHparameter are used to allocate the  syms 4 and  key_sym_map 4 UPUTv 4ac>fields of the client map. The fields are allocated to contain *UNUTv 4le,the maximum number of entries necessary for UT5ULUT@v -ey6max_key_code 4 -  min_key_code 4 + 1 keys =. lK9 # b " qStlK9  T unt 4 UTUT`w =heXkbModifierMapMask prd $ at ]ntapHH % b $ t 4HH{(see t$ 4ur]To update the local copy of the keyboard description with the actual values, pass to  XkbD UTSGetNameChanges 4 the results of one or more calls to  XkbNoteNameChanges 4. )UTUTl =PStatus ? tXkbGetNameChanges =( dpy =,  xkb =,  changes =) e6URUTd = :Display * dpy =;/* connection to the X server */ CUPUTd = 4OXkbDescPtr xkb =;/* keyboard description to which names are copied */ ielPUNUTd =o [XkbNameChangesPtr changes =;/* names components to be obtained from the server */ -eyc$ -^XkbGetNameChanges 4 examines the  }changes 4 parameter, retrieves the necessary informapD 4 Xtion from the server, and places the results into the  }xkb 4 keyboard description. $4 fXkbGetNamesChanges 4 can generate  {BadAlloc 4,  {BadImplementation, 4 and  {BadMatch 4 D4 4errors. l5 3.=Allocating and Freeing Symbolic Names $6 4 wZMost applications do not need to directly allocate symbolic names structures. Do not allo6 4llhcate a names structure directly using  malloc 4 or  Xmalloc 4 if your application changes the ,6 4haWnumber of key aliases or radio groups or constructs a symbolic names structure without */ D6 4 4Wloading the necessary components from the X server. Instead use  XkbAllocNames 4. UTULUTl7 =amJStatus @ tXkbAllocNames =( xkb, which, num_rg, num_key_aliases) UJUTd8 =WXkbDescPtr xkb; =/* keyboard description for which names are to be allocated */ neUHUTd9 =@unsigned int which; =/* mask of names to be allocated */ o "UFUTd: =ybCint num_rg; =/* total number of radio group names needed */ gen/UDUTd; = Fint num_key_aliases; =/* total number of key aliases needed */ B$ ,xXkbAllocNames 4 can return  {BadAlloc 4,  {BadMatch, 4 and  {BadValue 4 errors. }  4The  }which 4 y OD 4naZparameter is the bitwise inclusive OR of the valid names mask bits defined in Table 18.1. d$ 4XmmDo not free symbolic names structures directly using  ,free 4 or  ,XFree 4. Use  ,XkbFreeNames 4 tqD 4am instead. eUBUTl> =8void A tXkbFreeNames =( xkb, which, free_map) seU@UTd? = SXkbDescPtr xkb =;/* keyboard description for which names are to be freed */ b, U>UTd@ =_kGunsigned int which =;/* mask of names components to be freed */ criU<UTdA =meZBool free_map =;/*  {True = => XkbNamesRec structure itself should be freed */ $B 4 *`The  }which 4 parameter is the bitwise inclusive OR of the valid names mask bits defined in UDDB 4in Table 18.1. all\  & b eedl\ cNash BXkbDeviceInfoRec Mask Bits d \  ' bc 4\ naer  td 4ve j\  ( bl18j\ Xmfresyd 4tu \  ) bUs\  t d 4UB T\?  * b (\? seY? UTUT`E 1 No =l  + b ,rtol UT=_kun UTUT` 1ch Vl  , b + -/riVl Boee_p UTUTh 1=AutoReset \?  - b , \? heteis UTUT` 1siNo ofl  . b  /l .1\ UTUT` 1  Vl  / b . NaVl BDeveI UTUTh 1 RepeatKeys k"n[ ] 0 r 1 k"n[ ] ?lkl TControlsf֎ 1 s 0 38f֎Xmf֎f֔d 2 a b g(8 ] 3 r 1 6 UB(8 ]E l(l T Indicator Mapd 4 aTUT sHH 5 b 4 HHp_k++ V+$ 4ri]A local description of the configuration and state of a device may be kept in an  {XkbDevi {\ceInfoRec 4 structure. The actual state or configuration of the device may change because " 4hof  XkbSetDeviceInfo 4 and  XkbSetButtonActions 4 requests made by clients or by user interac/  4Ztion with the device. The X server sends an # XkbExtensionDeviceNotify 4 event to < 4_all interested clients when the state of any buttons or indicators or the configuration of the 8I 4Vbuttons or indicators on the core keyboard or any input extension device changes. The V 4^event reports the state of indicators for a single indicator feedback, and the state of up to c 4W128 buttons. If more than 128 buttons or more than one indicator feedback are changed, p 4Zthe additional buttons and indicator feedbacks are reported in subsequent events. Xkb pro} 4riZvides functions with which you can track changes to input extension devices by noting the D 4cTchanges that were made and then requesting the changed information from the server. $ 4ofRTo note device changes reported in an  {XkbExtensionDeviceNotify 4 event, use D XkbNoteDeviceChanges 4. UTUTl =e Avoid P tXkbNoteDeviceChanges = ( old, new, wanted =) URUTd =alLXkbDeviceChangesPtr old =;/* structure tracking state changes */ urUPUTd =VXkbExtensionDeviceNotifyEvent * new =;/* event indicating state changes */ UNUT$ =Dunsigned int wanted =;/* mask indicating changes to note ndULUTD =nd*/ sta$ 4kThe  wanted 4 field specifies the changes that should be noted in  }old 4, and is composed of the  4adjbitwise inclusive OR of one or more of the masks from Table 21.1 . 4 The  reason 4 field of the ! 4 wievent in  }new 4 indicates the types of changes the event is reporting.  XkbNoteDeviceChanges 4 . 4es`updates the  {XkbDeviceChangesRec 4 specified by  }old 4 with the changes that are both te;D 4enJspecified in  }wanted 4 and contained in  }new 4-> reason 4. P$ 4ZTo update a local copy of the state and configuration of an X input extension device with ] 4Pt]the changes previously noted in an  {XkbDeviceChangesRec 4 structure, use  XkbGetDeviejD *ceInfoChanges 4. nt $ 4haZTo query the changes that have occurred in the button actions or indicator names and indiD 4Wcator maps associated with an input extension device, use  XkbGetDeviceInfoChanges. shUJUTl = }ZStatus Q tXkbGetDeviceInfoChanges =( dpy =,  device_info , changes =) UHUTd =m 6Display * dpy =;/* connection to X server */ UFUTd =evOXkbDeviceInfoPtr device_info =;/* structure to update with results */ NotUDUTd = bXkbDeviceChangesPtr changes =;/* contains notes of changes  1that  =have occurred */ $  4teYThe  changes->changed  4field indicates which attributes of the device specified in   }achanges 4-> device 4 have changed. The parameters describing the changes are contained in   4?kthe other fields of  }changes 4.  XkbGetDeviceInfoChanges 4 uses that information to call  Xkb*  .^GetDeviceInfo 4 to obtain the current status of those attributes that have changed. It then D  4i]updates the local description of the device in  }device_info 4 with the new information. e$$ 4UJZTo update the servers description of a device with the changes noted in an  XkbDevice1D UH1ChangesRec 4, use  XkbChangeDeviceInfo 4. cFUBUTl =/ IBool R tXkbChangeDeviceInfo = ( dpy, device_info, changes =) tSU@UTd =lt6Display * dpy =;/* connection to X server */ `U>UTd =nt[XkbDeviceInfoPtr device_info =;/* local copy of device state and configuration */ angmU<UTd =at\XkbDeviceChangesPtr changes =;/* note specifying changes in  device_info = */ 4k7 ] 6 r 3 7 hchk7 ]y4lkl TNamesr֎ 7 s 6 8XGer֎s  ur֎r֔' ] 8 r 7 9 .Ge' ]ll TGeometryf +01Z 9 r 8   +01Z]upH : a n }Hth ormioUU$ Keys may be logically down when they are physically up  *because of  their electrical properties * or because of  the 4UUD eDZkeyboard extension in the X server having filtered the key release, for esoteric reasons. 7  ; b ilaP < }econ#Kϴ < r = ; = >veI#Kϴe_itFQoL[ ] = k < > ; < > nftFQoL[ ]tFZ$tFZ$ yCompatibility Mapt#Kϴ > a = ? ;ns #Kϴ < =@ @n`( ? r > @ ;@ @n`(7;i @ n ? A ; { ~l;i;it?itWP A n @ B ;]tWPtWP4[Pt9hOx5 B r A C ;0t9hOx59 r t9;.tW;.tWhO^$hO&*2b ] C k B D ; n&*2b ]@& yXkb State z [T D r C E ; E Feth[T upBd7N ] E k D F ; D F tsBd7N ]@@mBm yEffective Modifiersd e[T F a E G ; u veey[T D E\ o?! G r F H ; H I\ o?P"Ue ]" H k G I ; G I "Ue ]U Tu"Uu yServer Internal Modifiers\ o?# I a H J ; L j]tF\ o? G H\5o?$ J r I K ; K La ?\5o?#6t&[=X ]% K k J L ; J L r @6t&[=X ]U T/v6t/v yBase Modifiers\5o?& L a K M ; I O j\5o? J K\?ho?' M r L N ; N O\?ho?=dH/v ]( N k M O ; M O =dH/v ]U TQC=dQC y Base Group\?ho?) O a N P ; L R jb]\?ho? M N\ao?* P r O Q ; Q R\ao?1.YjG ]+ Q k P R ; P R h1.YjG ]U Tsv1.Ysv yLocked Modifiers F\ao?, R a Q S ; O U jEf\ao? P Q\o?- S r R T ; T Ueey\o?D E8J': ]. T k S U ; S U 8J': ]U T8J y Locked Group I\o?/ U a T V ; R X ju\o? S T\Oo?0 V r U W ; W XJ\Oo? 0X['J ]1 W k V X ; V X K0X['J ]U TB0XB yLatched Modifiers%\Oo?2 X a W Y ; U [ jTv\Oo? V W\Ȃ4o?3 Y r X Z ; Z [I j\Ȃ4o?o?7IюZ<: ]4 Z k Y [ ; Y [ O7IюZ<: ]U Tv7Iv y Latched Group(\Ȃ4o?5 [ a Z \ ; X ^ jTC\Ȃ4o? Y Z\go?6 \ r [ ] ; ] ^jb\go?*TgS ]7 ] k \ ^ ; \ ^ R*TgS ]U TB*B yCore Pointer Buttons P\go?8 ^ a ] _ ; [ a jv\go? \ ]\/o?9 _ r ^ ` ; ` aEf\/o?P Q( 8'X ]: ` k _ a ; _ a eey( 8'X ]U TA( A yIgnoreLock Modifiers U\/o?; a a ` b ; ^ d jLo\/o? _ `\QOo?< b r a c ; c d\\QOo?O1 Z[&H) ]= c k b d ; b d \O1 Z[&H) ]U TcB1 cB yIgnoreGroupLock K\QOo?> d a c e ; a jahe\QOo? b c'??? e r d f ; f g\O'??Ȃ4V"M5 ]@ f k e g ; e g 4V"M5 ]7 qǐV"ǐ y Lookup State ['??A g a f h ; y zLa'?? e fp0ax?B h r g i ; i k\4p0ax?g)9N ]C i k h j ; h k \g)9N ]B<)B< TCompatibility State\5o?ND j a i k ;Pnt\5o?N I dp0ax?E k a j l ; n r\gp0ax? h ipSx?F l r k m ; m n\pSx?8'uq\'o` ]G m k l n ; l n 'uq\'o` ]eouqeo TCompatibility Lookup StatepSx?H n a m o ; k q r?pSx? l mpuNx?I o r n p ; p q?puNx?H) z~Zd8 ]J p k o q ; o q &) z~Zd8 ]BzB TCompatibility Grab StatepuNx?K q a p r ; n r cpuNx? o pp0ax?_ffL r a q s ;4p0ax?_ff k q~DTM s r r t ; t u] q~DT Lo3j@ ]N t k s u ; s u h3j@ ]@@3 yEffective GroupB~DTO u a t v ; F vg)~DT s t[T=33P v a u w ;<[T=33 F uZ??Q w r v x ; x ya kZ??\!ۀ*ww ]R x k w y ; w y a l!ۀ*ww ]7 q5!5 y Grab StateZ??S y a x z ; g z?Z?? w x'??=33T z a y { ;`'??=33 g y9+EU { r z | ; @ } ~9+E; k r9+;+;pV4gdO<V | r { } ;qV4gdO<) V4gX!\iX!\idO9oOD@W } r | ~ ; { ~B9oOD@patil9oO;oO;99+"X ~ a }  ;9+" @ }<O@Y  n ~ ;ff<O@<4?Ot7L -EZ r  ;]t7L -E; s ut7LhdLhdt7 .D@[ r ;Dt7 .D@u a vt7hehet7}-(\ k ; }-(FyFy |.V-(] k ; V-(lFylFy |.wx-(^ k ; 5x-(FyFy |.a\-(_ k ; '\-(rFyrFy |.`8(` k ; U r8(FF |.ktWPa n ;<tWPqtWP4[Pѧ8(b k ; ѧ8( |.95 .D@c r ;95 .D@"5cc^#5^#?(gL(d k ; n ?(gL(?=Ƙ?=Ƙ |.tV@o$ e n ;r tV@o$ t7tVd\md\m@otq@Vkab@f n ;Vkab@ .@Vk`tn`tnanqaV! H&g r ;V! H&(V!]!`ti]!`tiY,P(h k ; Y,P(Y,fFjY,fFj |.w],4(i k ; 5],4(],], |.aWi/b`ej n ;'Wi/b`eFyWie"oe"/ooOU! H|%k r ;(U! H|%|.kU!a!eia!eib,ї5(l k ; qb,ї5(b,b, |.bZi m b Zi WchN ,XBell Sounding and Bell Event Generating cl n b l (  D=Ƙ?`' Symbolic Group Names  o b V   D@d(  lp b nl  Eg `) 7Symbolic Name h$q b (h$  E, `* 7FjValue l r b l   F], UTUT`+ =XkbGroup1Index h$ s b ih$ O  F H% UTUT`, =0 l t b i!l   G k UTUT`- =,XkbGroup2Index h$ u b b h$   G  UTUT`. =1 l v b e Gl   Hn b UTUT`/ =XkbGroup3Index h$ w b wolh$   Ho UTUT`0 =V2 l x b l   Ip UTUT`1 =nXkbGroup4Index h$ y b Syh$   Iq b UTUT`2 =(3 l z b l  grhM & XkbStateNotify Event Detail Masks  { b   b giUTUTdN 8 | b  b hi `O 7Mask hH} b o2IhH h b `P 7Value  ~ b .  i  UTUT`Q =XkbModifierStateMask HhH  b xhH w i UTUT`R = (1L << 0)   b   j UTUT`S =XkbModifierBaseMask UThH  b hH  jSy UTUT`T = (1L << 1)   b   k UTUT`U =gXkbModifierLatchMask MhH  b hH  b k UTUT`V = (1L << 2)   b   l UTUT`W = bXkbModifierLockMask hH  b } bhH  l UTUT`X = (1L << 3)   b b   m  UTUT`Y =UTXkbGroupStateMask hH  b  bhH  m  UTUT`Z = (1L << 4)   b b  n  UTUT`[ =XkbGroupBaseMask hH  b hH  nH UTUT`\ =Sy (1L << 5)   b   o UTUT`] =XkbGroupLatchMask h H  b h H  o UTUT`^ =k (1L << 6)   b   p UTUT`_ =lXkbGroupLockMask hH  b hH  ph UTUT`` = (1L << 7) '  b '  q UTUT`a = XkbCompatStateMask h'H  b h'H  q UTUT`b = (1L << 8) 5  b 5  r UTUT`c =nXkbGrabModsMask h5H  b h5H  r UTUT`d =n (1L << 9) C  b C  s  UTUT`e =oXkbCompatGrabModsMask hCH  b hCH  sH UTUT`f = (1L << 10) Q  b bQ  t  UTUT`g =XkbLookupModsMask hQH  b bhQH  t  UTUT`h = (1L << 11) ``_  b b _  u  UTUT`i =UTXkbCompatLookupModsMask tSh_H  b h_H  u UTUT`j =UT (1L << 12) (1m  b m  v r UTUT`k =XkbPointerButtonMask shmH  b hmH  vr UTUT`l =d (1L << 13) 9) {  b {  w  UTUT`m =oXkbAllStateComponentsMask h{H  b h{H  wUT UTUT`n =(1 (0x3fff) d a b tHH b Mk HHhQ $ 4WWhen your client application receives a report from the server indicating the keyboard  4Ydescription has changed, you can determine the set of changes by passing the event to an " 4YXkb function that notes event information in the corresponding changes data structure. / 4SThese note changes functions are defined for all major Xkb components, and their m< 4 b`names have the form  XkbNote{Component}Changes 4, where  Component 4 is the name of a I 4cmajor Xkb component such as  Map 4 or  Names 4. When you want to copy these changes from oneV 4Xthe server into a local copy of the keyboard description, use the corresponding  Xkbnc `Get{Component}Changes 4 function ,  4passing it the changes structure. The function then p 4 MZretrieves only the changed structures from the server and copies the modified pieces into }D 4 y the local keyboard description. red 3erFreeing Data Structures , 4e bFor the same reasons you should not directly use  malloc 4 to allocate Xkb data structures,  4tihyou should not free Xkb data structures or components directly using  free 4 or  Xfree 4. Xkb e  4ct`provides functions to free the various data structures and their components.  ~Always 4 use or 4on[the free functions supplied by Xkb. There is no guarantee that any particular field can be ompD 4Ma/safely freed by  free 4 or  Xfree 4. se d aeerkeoaHH b knHHGefunctionbin es UT UTd 7 2nc Xkb Events p, 8 4re[TThe primary way the X server communicates with clients is by sending X events to them. , 8 4lo_Some events are sent to all clients, while others are sent only to clients that have requested e 9 8 4soWthem. Some of the events that can be requested are associated with a particular window F 8 4ld[and are only sent to those clients who have both requested the event and specified the win e SD 8 4ct"dow in which the event occurred. h$ 9 4esXThe Xkb extension uses events to communicate the keyboard status to interested clients. ieu 9 4 n[These events are not associated with a particular window. Instead, all Xkb keyboard status e  9 4.\events are reported to all interested clients, regardless of which window currently has the L 9 4Ekeyboard focus and regardless of the grab state of the keyboard. n$v 4XThe X server reports the events defined by the Xkb extension to your client application thv 4ca\only if you have requested them. You may request Xkb events by calling either  XkbSelect tv leqEvents   4or  XkbSelectEventDetails 4.  XkbSelectEvents 4 requests Xkb events by their event type rv 4ia[and causes them to be reported to your client application under all circumstances. You can havv 4heespecify a finer granularity for event reporting by using  XkbSelectEventDetails 4; in this case 9Dv 4nsXevents are reported only when the specific detail conditions you specify have been met. 9l : 3 a _Xkb Event Types ar$ ; 4stWThe Xkb Extension adds new event types to the X protocol definition. An Xkb event type ed  ; 4s fis defined by two fields in the X event data structure. One is the  type 4 field, containing the , ; bbase event code. 4 This base event code is a value the X server assigns to each X extension 9 ; 4^at runtime and thatidentifies the extension that generated the event; thus, the event code in F ; 4athe  type 4 field identifies the event as an Xkb extension event, rather than an event from S ; 4r \another extension or a core X protocol event. You can obtain the base event code via a call de` ; 4fto  XkbQueryExtension 4 or  XkbOpenDisplay 4. The second field is the Xkb event type, which m ; 4inYcontains a value uniquely identifying each different Xkb event type. Possible values are ozD ; 4e Mdefined by constants declared in the header file  . t$ < 4n ]Table 4.1 lists the categories of events defined by Xkb and their associated event types, as s < 4elddefined in  Xkb.h 4. Each event is described in more detail in the section referenced for that baBL < 4 T event.  eved aeh  ;HH b othHH{; &&F th & f^d g 3e Xkb Event Data Structures r, h 4n `Xkb reports each event it generates in a unique structure holding the data values needed to b h 4 a\describe the conditions the event is reporting. However, all Xkb events have certain things nd h 4evVin common. These common features are contained in the same fields at the beginning of D h 4 PQall Xkb event structures and are described in the  {XkbAnyEvent 4 structure: eUNUT$ i 1tetypedef struct { ULUT i 1Ta9inttype; /*  =Xkb extension base event code 1 */ hUJUT i 1ntGunsigned longserial;/*  =X server serial number for event 1 */ deUHUT i 1taEBoolsend_event;/*  {True = => synthetically generated 1 */ UFUT i 1CDisplay *display;/* server connection where event generated */ HUDUT i 1 b4Timetime;/* server time when event generated */ UBUT i 1+intxkb_type;/* Xkb minor event code */ d g U@UT i 1taZunsigned intdevice;/*  =Xkb device  1ID =, will not be  pXkbUseCoreKbd 1 */ U>UTL i 1ta}  XkbAnyEvent 1; )$ j 4 t_For any Xkb event, the  type 4 field is set to the base event code for the Xkb extension,  h6 j 4hepassigned by the server to all Xkb extension events. The  serial 4,  send_event 4, and  display 4 urC j 4edefields are as described for all X11 events. The  time 4 field is set to the time when the event iP j 4Xk^was generated and is expressed in milliseconds. The  xkb_type 4 field contains the minor ] j 4r \extension event code, which is the extension event type, and is one of the values listed in raj j 4UT`Table 4.1. The  device 4 field contains the keyboard device identifier associated with the iw j 4/gevent. This is never   {XkbUseCoreKbd 4, even if the request that generated the event specid g j 4taZfied a device of  {XkbUseCoreKbd 4. If the request that generated the event specified  j {tabXkbUseCoreKbd 4,  device 4 contains a value assigned by the server to specify the core key j 4nteboard. If the request that generated the event specified an X input extension device,  device 4 sD j 44 contains that same identifier. la$ k 4YOther data fields specific to individual Xkb events are described in subsequent chapters tD k 4 i where the events are described. d l l 3n  Selecting Xkb Events y$ m 4inWXkb events are selected using an event mask, much the same as normal core X events are , a m 4alXselected. However, unlike selecting core X events, where you must specify the selection bo m 4ieZstatus (on or off) for all possible event types whenever you wish to change the selection ! m 4re[criteria for any one event, Xkb allows you to restrict the specification to only the event Kbd. m 4stVtypes you wish to change. This means that you do not need to remember the event selec;D m 4ueMtion values for all possible types each time you want to change one of them. P$ n 4enVMany Xkb event types are generated under several different circumstances. When select] n 4t Ying to receive an Xkb event, you may specify either that you want it delivered under all tj n 4 sVcircumstances, or that you want it delivered only for a subset of the possible circumwD n 4ct stances. d alteh e HH b HH?we''re X eve m'$ 4boZYou can also deselect an event type that was previously selected for, using the same granD 4n ularity. *$ o 4 fXXkb provides two functions to select and deselect delivery of Xkb events.  XkbSelect7 o s ^Events 4 allows you to select or deselect delivery of more than one Xkb event type at once. D o 4]Events selected using  XkbSelectEvents 4 are delivered to your program under all circumeQ o 4er\stances that generate the events. To restrict delivery of an event to a subset of the condin ^ o 4 sctions under which it occurs, use  XkbSelectEventDetails 4.  XkbSelectEventDetails 4 only wank o 4y ^allows you to change the selection conditions for a single event at a time, but it provides a xD o 4teHmeans of fine-tuning the conditions under which the event is delivered. $ p 4[To select and / or deselect for delivery of one or more Xkb events and have them delivered alD p 4nt4under all conditions, use  XkbSelectEvents 4. gUTUTl q 1` Bool  tXkbSelectEvents 1( display, device_spec, bits_to_change, values_for_bits 1) f URUTd r 1bSselect, 0->deselect; for events in  bits_to_change 1 */ $ v 4etPThis request changes the Xkb event selection mask for the keyboard specified by o D v ondevice_spec 4. i$ w 4me^Each Xkb event that can be selected is represented by a bit in the  bits_to_change 4 and $ w avalues_for_bits 4 masks. Only the event selection bits specified by the  bits_to_change 4 h1 w 4\parameter are affected; any unspecified bits are left unchanged. To turn on event selection > w 4ctbfor an event, set the bit for the event in the  bits_to_change 4 parameter and set the correK w 4yesponding bit in the  values_for_bits 4 parameter. To turn off event selection for an event, set cX w 4cthe bit for the event in the  bits_to_change 4 parameter and do not set the corresponding bit to e w 4le_in the  values_for_bits 4 parameter. The valid values for both of these parameters are an t; r w 4bi[inclusive bitwise OR of the masks shown in Table 4.2. There is no interface to return your or  w 4fiYclients current event selection mask. Clients cannot set other clients event selection aD w 4epmasks. y $ x 4iteIf a bit is not set in the  bits_to_change 4 parameter, but the corresponding bit is set in the i x tshvalues_for_bits 4 parameter, a  {BadMatch 4 protocol error results. If an undefined bit is set in tu x 4ioneither the  bits_to_change 4 or the  values_for_bits 4 parameter, a  {BadValue 4 protocol error D x 4 results. $ y 4th^All event selection bits are initially zero for clients using the Xkb extension. Once you set  y 4fo^some bits, they remain set for your client until you clear them via another call to  XkbSeD y inlectEvents 4. _ $a . kXkbSelectEvents 4 returns  {False 4 if the Xkb extension has not been initilialized and  {True 4 ks Da 4. otherwise. nte.$ z 4urWTo select or deselect for a specific Xkb event and optionally place conditions on when cl; z 4tidevents of that type are reported to your client, use  XkbSelectEventDetails 4. This allows you ed a t tsvaHH b  HH. et in tu  x er z 4haZto exercise a finer granularity of control over delivery of Xkb events with  XkbSelectD z lt Events 4. )UTUTl 1t z UBool  tXkbSelectEventDetails 1( display, device_spec, event_type, bits_to_change 1,  values_for_bits 1) 6URUTd { 1cl$ 4ed^For each type of Xkb event, the legal event details that you can specify in the  XkbSelectKD dXEventDetails 4 request are listed in the chapters that describe each event in detail. didd 3va Event Masks 4x$ 4rn[The X server reports the events defined by Xkb to your client application only if you have in  4anirequested them via a call to  XkbSelectEvents 4 or  XkbSelectEventDetails 4. Specify the event 4D 4Jtypes in which you are interested in a mask, as described in section 4.3. , 4uldTable 4.2 lists the event mask constants that can be specified with the  XkbSelectEvents 4 poBL 4n Irequest and the circumstances in which the mask should be specified.  d a t HH b luHHte w 4   Bl 3 t Unified Xkb Event Type venV$ 4 c]The  {XkbEvent 4 structure is a union of the individual structures declared for each Xkb ec 4crgevent type and for the core protocol  {XEvent 4 type. Given an  {XkbEvent 4 structure, you may s tp 4bymuse the  type 4 field to determine if the event is an Xkb event ( type 4 equals the Xkb base event e} 4 `code; see section 2.4). If the event is an Xkb event, you may then use the  any.xkb_type 4 es 4deYfield to determine the type of Xkb event and thereafter access the event-dependent compotD 4edMnents using the union member corresponding to the particular Xkb event type. mURUT$ 1hetypedef union _XkbEvent { UPUT 1 inttype; UNUT 1XkbAnyEventany; ULUT 1 XkbStateNotifyEventstate; UJUT 1teXkbMapNotifyEventmap; UHUT 1 #XkbControlsNotifyEventctrls; fieUFUT 1en)XkbIndicatorNotifyEventindicators; sUDUT 1n XkbBellNotifyEventbell; UBUT 1 e$XkbAccessXNotifyEventaccessx; or!U@UT 1  XkbNamesNotifyEventnames; kb.U>UT 1e,%XkbCompatMapNotifyEventcompat; h;U<UT 1ld$XkbActionMessageEventmessage; veHU:UT 1qu+ XkbExtensionDeviceNotifyEventdevice; `coUU8UT 14)( XkbNewKeyboardNotifyEventnew_kbd; enbU6UT 1kb XEvent core; oU4UTL 1 d}  tXkbEvent 1; ve$ 4acaThis unified Xkb event type includes a normal  {XEvent 4 as used by the core protocol, so it  4 e^is straightforward for applications that use Xkb events to call the X library event functions  4[without having to cast every reference. For example, to get the next event, you can simply D 4ot6declare a variable of type  {XkbEvent 4 and call: U2UTd 1ieXNextEvent(dpy,&xkbev.core); nd a enbeHH b tyEHHwUTmesNotif ; ;kb UT UTl 2X |Keyboard State mpa$ 4 YKeyboard state encompasses all of the transitory information necessary to map a physical t, 4co[key press or release to an appropriate event. The Xkb keyboard state consists of primitive ven9 4UTYcomponents and additional derived components that are maintained for efficiency reasons. nF"L 4{SFigure 5.1 shows the components of Xkb keyboard state and their relationships. } ard快l thXkb State ~ l 3br#Keyboard State Description 4$ 4o YThe Xkb keyboard state is comprised of the state of all keyboard modifiers, the keyboard " 4Xgroup, and the state of the pointer buttons. These are grouped into the following compo n/D 4nents: DUTd 1&The locked group and locked modifiers PUTd 1(The latched group and latched modifiers \UTd ="The base group and base modifiers hUTd = ,The effective group and effective modifiers KetUTd =pa&The state of the core pointer buttons d acoanppHH b is HHb%% and add : :d %, 4inThe  fmodifiers 4 are  {Shift 4,  {Lock 4,  {Control 4, and  {Mod1 4- {Mod5 4, as defined by the core proto 4Xk]col. A modifier can be thought of as a toggle that is either set or unset. All modifiers are h" 4teYinitially unset. When a modifier is locked, it is set and remains set for all future key r/ 4 o`events, until it is explicitly unset. A latched modifier is set, but automatically unsets after < 4Xthe next key event that does not change the keyboard state. Locked and latched modifier d ID 4UTRstate can be changed by keyboard activity or via Xkb extension library functions. ^l 4e aThe Xkb extension provides support for  fkeysym 4  fgroups 4, as defined by ISO9995: arUTUT$ =coVGroupA logical state of a keyboard providing access to a collection of characters. A URUT =%Vgroup usually contains a set of characters  1that = logically belong together and UPUTD 1{Dthat = may be arranged on several shift levels within that group. ,$ 4 cUThe Xkb extension supports up to four keysym groups. Groups are named beginning with  4t.[one and indexed beginning with zero. All group states are indicated using the group index. et  4r \At any point in time, there is zero or one locked group, zero or one latched group, and one i 4icXbase group. When a group is locked, it supersedes any previous locked group and remains oa 4ndYthe locked group for all future key events, until a new group is locked. A latched group X 4ry[applies only to the next key event that does not change the keyboard state. The locked and fD 4inZlatched group can be changed by keyboard activity or via Xkb extension library functions. $ 4chZChanging to a different group changes the keyboard state to produce characters from a dif 4etYferent group. Groups are typically used to switch between keysyms of different languages gD 4 and locales. k1l 4tshThe  fpointer buttons 4 are  {Button1 4 -  {Button5 4, as defined by the core protocol. g F, 4uppThe  fbase group 4 and  fbase modifiers 4 represent keys that are physically or logically down. ocS 4 oQThese and the pointer buttons can be changed by keyboard activity and not by Xkb d` 4y ^requests. It is possible for a key to be logically down, but not physically down, and neither mL 4grlatched nor locked.  rol 4 kThe  feffective modifiers 4 are the bitwise union of the locked, latched, and the base modifiers. , 4grhThe  feffective group 4 is the arithmetic sum of the group indices of the latched group, locked gi 4grWgroup, and base group, which is then normalized by some function. The result is a meanentD 4 tingful group index. h UNUTd = d*n = number of keyboard groups, 1<= n <= 4 ULUTd =/0 <= any of locked, latched, or base group < n  UJUTd ={?effective group = f(locked group + latched group + base group) 4up$ 4 gYThe function f ensures that the effective group is within range. The precise function is n  4 Yspecified for the keyboard and can be retrieved through the keyboard description. It may  4reZwrap around, clamp down, or default. Few applications will actually examine the effective 'D 4grNgroup, and far fewer still will examine the locked, latched, and base groups. <l 4isCThere are two circumstances under which groups are normalized: i  bshei  gWcesf dO 4 l e\?  b / rp,\? ze futi UTUT` 1a Boolean lA  b  NUTlA erardro UTUT` 1UL TVAl  b obaVAl UT={ef UTUT` 1lo Overlay2 +A\?  b  A\? ns thef UTUT` 1 Boolean Tl]  b  spl] rdbe tr UTUT`! 1ke aV]l  b ewrV]l  o. F a UTUTh" 1ctMouseKeysAccel ect]\?  b w s]\? loche a UTUT`# 1Boolean l  b  icl d:i UTUT`$ 1 Vl  b esVl  l? UTUTh% 1 StickyKeys \?  b T\?   UTUT`& 1Boolean l  b Tl  b UTUT`' 1ba Vl  b TVl   UTUTh( 1 SlowKeys \?  b  \?  UTUT`) 1Boolean l  b !l  b UTUT`* 1 d a"ctHH b sHHt`# 1 UTUTB = Qunsigned shortptr_buttons;/* 1 bit => corresponding pointer btn is down */ URUTLB =(} & XkbStateRec =,*XkbStatePtr; 'dC 4?3To obtain the keyboard state, use  XkbGetState. Display * display =;/* connection to the X server */ VULUTdF =Vunsigned int device_spec =;/* device  1ID =, or  wXkbUseCoreKbd = */ cUJUTdG =DXkbStatePtr state_return =;/* backfilled with Xkb state */ ?v$H 4`The  XkbGetState  4function queries the server for the current keyboard state, waits for a DH 4Areply, and then backfills  }state_return 4 with the results. $I 4WAll group values are expressed as group indices in the range [0..3]. Modifiers and the tI 4Wcompatibility modifier state values are expressed as the bitwise union of the core X11 s;DI 4esRmodifier masks. The pointer button state is reported as in the core X11 protocol. lJ 3( Tracking Keyboard State =) 3 , ,K 4e.\The Xkb extension reports   {XkbStateNotify  4events to clients wanting notification K 4)Vwhenever the Xkb state changes. The changes reported include changes to any aspect of K 4Xthe keyboard state: when a modifier is set or unset, when the current group changes, or UJK 4Xk]when a pointer button is pressed or released. As with all Xkb events,  {XkbStateNotify 4 K 4fu[events are reported to all interested clients without regard to the current keyboard input Are DK 4fifocus or grab state. 5$L 4 VThere are many different types of Xkb state changes. Xkb defines an event detail mask BBLL 4he^corresponding to each type of change. The event detail masks are (listed in Table 5.3.  V$o 4;ZTo track changes in the keyboard state for a particular device, select to receive  {Xkbco {gStateNotify 4 events by calling either  XkbSelectEvents 4 or  XkbSelectEventDetails 4 (see  pDo 4 section 4.3). d aK)haesHH b nasHHK//: when aet/$p 4t dTo receive  {XkbStateNotify 4 events under all possible conditions, use  XkbSelectEvents 4 b Dp 4te`and pass  {XkbStateNotifyMask 4 in both  }bits_to_change 4 and  }values_for_bits 4. th*$q 4 i_To receive  {XkbStateNotify 4 events only under certain conditions, use  XkbSelectEventt t7q chdDetails 4 using  {XkbStateNotify 4 as the  }event_type 4 and specifying the desired state e DDq 4 a^changes in  }bits_to_change 4 and  }values_for_bits 4 using mask bits from Table 5.3. Ydr 4ce4The structure for  {XkbStateNotify 4 events is: eNmUTUT$s =y typedef struct { XzURUTs = o1inttype;/* Xkb extension base event code */ UPUTs =4.@unsigned longserial;/* X server serial number for event */ UNUTs =BBoolsend_event;/*  {True = => synthetically generated */ ULUTs =LDisplay *display;/*  1server connection where event generated = */ atUJUTs = u=Timetime;/*  1server time when event generated = */ UHUTs =an.intxkb_type;/*  pXkbStateNotify = */ UFUTs =ndNintdevice;/* Xkb device  1ID =, will not be  pXkbUseCoreKbd = */ UDUTs =de@unsigned intchanged;/* bits indicating what has changed */ chUBUTs =g 3intgroup;/* group index of effective group */ speU@UTs =d 3intbase_group;/* group index of base group */ chaU>UTs =lu9intlatched_group;/* group index of latched group */  U<UTs =ct7intlocked_group;/* group index of locked group */ $sU:UTs =ct0unsigned intmods;/* effective modifiers */ ns#U8UTs =e 0unsigned intbase_mods;/* base modifiers */ /0U6UTs =nu6unsigned intlatched_mods;/* latched modifiers */ =U4UTs = =4unsigned intlocked_mods;/* locked modifiers */ DJU2UTs =8intcompat_state;/* computed compatibility state */ UJWU0UTs =T;unsigned chargrab_mods;/* modifiers used for grabs */ UHdU.UTs =iQunsigned charcompat_grab_mods;/* modifiers used for compatibility grabs */ qU,UTs = =Eunsigned charlookup_mods;/* modifiers used to lookup symbols */ ~U*UTs =biPunsigned charcompat_lookup_mods;/* mods used for compatibility look up */ ndU(UTs =ou/intptr_buttons;/* core pointer buttons */ /* U&UTs =e GKeyCodekeycode;/* keycode causing event, 0 if programmatic */ 1 laU$UTs =U<Xcharevent_type;/* core event if  req_major = or  req_minor = non zero */ sU"UTs =tGcharreq_major;/* major request code if program trigger, else 0 */ basU UTs =odGcharreq_minor;/* minor request code if program trigger, else 0 */ d mUUTLs =UT#} * XkbStateNotifyEvent =; ods$t 4ie`When you receive an  {XkbStateNotify 4 event, the  changed 4 field indicates which elet 4d Vments of keyboard state have changed. This will be the bitwise inclusive OR of one or t 4;^more of the  {XkbStateNotify 4 event detail masks shown in Table 5.3. All fields reported Dt 4seYin the event are valid, but only those indicated in  changed 4 have changed values. $u 4libThe  group 4 field is the group index of the effective keysym group. The  base_group 4, (u clatched_group 4, and  locked_group 4 fields are set to a group index value representing the pe;5u 4 \base group, the latched group, and the locked group, respectively. The X server can set the * Bu 4 i^modifier and compatibility state fields to a union of the core modifier mask bits; this union Ou 4 ebrepresents the corresponding modifier states. The  ptr_button 4 field gives the state of the \u 4XkWcore pointer buttons as a mask composed of an inclusive OR of zero or more of the core 4d iDu 4d pointer button masks. ~$v 4seYXkb state changes can occur either in response to keyboard activity or under application iv 4abdcontrol. If a key event caused the state change, the  keycode 4 field gives the keycode of the  Vl  b Vl p ishe UTUTh+ 1e BounceKeys gro\?  b u\? nded_ou UTUT`, 1etBoolean p l  b ul laup,nd UTUT`- 1 r eVl  b Vl  cityta UTUTh. 1onAccessXTimeout ma\?  b ees\?  mtat. UTUT`/ 1 Boolean ivly  b  o ply sk ofn UTUT`0 1rophysically impaired persons Vyl  b Vyl anccuei UTUTh1 1o AccessXKeys ory\?  b oroy\? ede cng UTUT`2 1 Boolean ivl  b l l UTUT`3 1is eVl  b Vl  u UTUTh4 1InternalMods u\?  b \? l UTUT`5 1No up,lv  b lv  UTUT`6 1 yVvl  b tmaVvl  UTUTh7 1?IgnoreLockMods tatv\?  b v\?  p UTUT`8 1skNo li  b preli  b UTUT`9 1 Vil  b TVil eyy? UTUTh; 1 IgnoreGroupLock i\?  b 2i\?  UTUT`< 1Boolean X׼ 2 g C y  0 y3 X׼ lp$*  n Y $p$* up$*s$*f`[`/@ 2 a # $ Yf`[`/@ 2 #7Y  n Y %7Y 1No7YDY``^  n # Y``^ ``^c`^;i  b;i WdP 4UT E :'h ] r 9  9  E :'h ]XCE C TKeyboardHH b 2 kNoHH&rel$ TXkbChangeDeviceInfo 4 updates the servers description of the device specified in ey }UTddevice_info 4-> device_spec 4 with the changes specified in  }changes 4 and contained in "D }Ldevice_info 4. The update is made by an  XkbSetDeviceInfo 4 request. lc  b  lc  ]  UTUTh =s qBadAtom @ M  b `@ M  ] n UTUT` =+A name is neither a valid Atom or  {None l%  b ^l% ci UTUT`G 1 +01Z  a +01Z 9 i   b9 i ]WE dQ 4 ly"  b ly"W`R 7Function called yQ"  b  thyQ" oWicepe`S 7 AudibleBell ded  a anes4HH  b  eceHHMisviceInfov 4 brkey event, and the  event_type 4 field is set to either  {KeyPress 4 or  {KeyRelease 4. If a pointer v 4mbutton event caused the state change, the  }keycode 4 field is zero, and the  }event_type 4 field is e"v 4aset to either  {ButtonPress 4 or  {ButtonRelease 4. Otherwise, the major and minor codes 0/v 4eof the request that caused the state change are given in the  req_major 4 and  req_minor 4 <v 4rfields, and the  keycode 4 field is zero. The  req_major 4 value is the same as the  =major extension IDv =R opcode 4. cd  a oHH  b  lelHHv!!an! UT UTl  2& Complete Keyboard Description $? 4XThe complete Xkb description for a keyboard device is accessed using a single structure he,? 4 Zcontaining pointers to major Xkb components. This chapter describes this single structure 9? 4 cVand provides references to other sections of this document that discuss the major Xkb FD? 4components in detail. _l  3 ! The XkbDescRec Structure ,s$  4orYThe complete description of an Xkb keyboard is given by an  {XkbDescRec 4. The compo  4nd]nent structures in the  {XkbDescRec 4 represent the major Xkb components outlined in FigD  4ue ure 1.1. eURUT$  =extypedef struct { UPUT  =4=struct _XDisplay *display;/* connection to X server */ UNUT  = o>unsigned shortflags;/* private to Xkb, do not modify */ ULUT  =9unsigned shortdevice_spec;/* device of interest */ UJUT  =le;KeyCodemin_key_code;/* minimum keycode for device */ b dUHUT  =ey;KeyCodemax_key_code;/* maximum keycode for device */ UFUT  =ng)XkbControlsPtrctrls;/* controls */ pUDUT  = s0XkbServerMapPtrserver;/* server keymap */ r UBUT  = s-XkbClientMapPtrmap;/* client keymap */ U@UT  =?4XkbIndicatorPtrindicators;/* indicator map */ Th$U>UT  =tr6XkbNamesPtrnames;/* names for all components */ 1U<UT  =is4XkbCompatMapPtrcompat;/* compatibility map */ >U:UT  =uc=XkbGeometryPtrgeom;/* physical geometry of keyboard */ nKU8UTD  =#}  XkbDescRec =, *XkbDescPtr; UT^$  4deoThe  display 4 field points to an X display structure. The  flags 4 field is private to the library: = ok  4emodifying  flags 4 may yield unpredictable results. The  device_spec 4 field specifies the vx  4 [device identifier of the keyboard input device, or  {XkbUseCoreKeyboard 4, which speci  4dfies the core keyboard device. The  min_key_code 4 and  max_key_code 4 fields specify the cD  4UTBleast and greatest keycode that can be returned by the keyboard. $ 4XRThe other fields specify structure components of the keyboard description and are  4nd\described in detail in other sections of this document. Table 6.1 identifies the subsequent U<BL 4X`sections of this document that discuss the individual components of the  {XkbDescRec 4. /e$ 4y XEach structure component has a corresponding mask bit that is used in function calls to r 4la[indicate that the structure should be manipulated in some manner, such as allocating it or ry:ll b & g 4llbl. T ` fName el\ b eifl\pu or {   dXkbDeviceInfoRec @ Fields Effected ybjl6 b  majl6sp c` leValue l b eeyl otr ` ucCapability If Set l. b l. air sti UTUT` =ntXkbXI_KeyboardsMask t\.  b o o\. isindid UTUT` =th j6.  b   Eaj6.  hespdi UTUT` =s (1L << 0) .  b  a t..ulad UTUT  =ch%Clients can use all Xkb requests and URUT =)events with  pKeyClass = devices supUPUT =!ported by the input device exten*UNUT@ =sion. l#  b  l# eI UTUT` =dsXkbXI_ButtonActionsMask \#  b \# UTUT ? = num_btns URUT@? = btn_acts l   b q  fl f g [ UTUT` p XkbNKN_KeycodesMask 6   b   f6 as g [ UTUT` (1L<<0) ol'   bo dUTl'  .h2 Xkb Protocol Errors '   b 1<<'   UTUTdf 8 2   b   fch2 Xk g [s a UTUT` =-Notification of keycode range changes wanted Pl   b  fextl  g [l UTUT` p bXkbNKN_GeometryMask d  aT  TonasHH  b  HH[**UT bt*l 3bt0#Changing the Servers Compatibility Map $ 4WTo modify the servers compatibility map, first modify a local copy of the Xkb compati) 4\bility map, then call  XkbSetCompatMap 4. You may allocate a new compatibility map for 6 4\this purpose using  XkbAllocCompatMap 4 (see section 17.6). You may also use a compatiC 4ability map from another server, although you need to adjust the  device_spec 4 field in the P { bTXkbDescRec 4 accordingly. Note that symbol interpretations in a compatibility map fi] 4raf( sym_interpret 4, the vector of  {XkbSymInterpretRec 4 structures) are also allocated using jD 4this same function. as~UTUTl =NBool 7 tXkbSetCompatMap =( display, which, xkb, update_actions =) URUTd =9Display *  display =;/* connection to server */ *UPUTd =Iunsigned int which =;/* mask of compat map components to set */ aUNUTd =BXkbDescPtr  xkb =;/* source for compat map components */ ULUTd =kbUBool  update_actions =;/*  {True = => apply to servers keyboard map */ y$ mpWXkbSetCompatMap 4 copies compatibility map information from the keyboard description ee  4 mnin  }xkb 4 to the server specified in  }display 4s compatibility map for the device specified by the  fijdevice_spec 4 field of  }xkb 4. Unless you have specifically modified this field, it is the default  4_keyboard device. } which 4 specifies the compatibility map components to be set, and is an so D 4.inclusive OR of the bits shown in Table 17.2. $ 4 jAfter updating its compatibility map for the specified device, if  }update_actions 4 is  {True, 4  4 c\the server applies the new compatibility map to its entire keyboard for the device to generma( 4t Uate a new set of key semantics, compatibility state, and a new core keyboard map. If s5 }dupdate_actions 4 is  {False 4, the new compatibility map is not used to generate any modificaB 4mpWtions to the current device semantics, state, or core keyboard map. One reason for not O 4kbWapplying the compatibility map immediately would be if one server was being configured ied\ 4Yto match another on a piecemeal basis; the map should not be applied until everything is fi 4faeupdated. To force an update at a later time, use  XkbSetCompatMap 4 specifying  }which 4 as bvD 4o 2zero and  }update_actions 4 as  {True 4. $ iXkbSetCompatMap 4 returns  {True 4 if successful and  {False 4 if unsuccessful. The server may i 4Treport problems it encounters when processing the request subsequently via protocol foD 4neerrors. $ 4a aTo add a symbol interpretation to the list of symbol interpretations in an  qXkbCompatRec 4, D 44 use  XkbAddSymInterpret 4. biUJUTlK 4ed[XkbSymInterpretPtr =  tXkbAddSymInterpret =( xkb, si, updateMap, changes =) e, UHUTd& 4apCXkbDescPtr xkb =;/* keyboard description to be updated */ ityUFUTd9 4ouIXkbSymInterpretPtr si =;/* symbol interpretation to be added */ aUDUTdA =NBool updateMap =;/*  {True ==>apply compatibility map to keys */ UBUTdB 4e synthetically generated */ -ULUT = aKDisplay *display;/*  1server connection where event generated = */ :UJUT = 4Timetime;/* server time when event generated */ veGUHUT =ot1intxkb_type;/*  pXkbCompatMapNotify = */ TUFUT =Mintdevice;/* Xkb device  1ID =, will not be  pXkbUseCoreKbd = */ taUDUT =ifBunsigned intchanged_groups;/* number of group maps changed */ nUBUT =}Aintfirst_si;/* index to 1st changed symbol interpretation */ {U@UT =t =intnum_si;/* number of changed symbol interpretations */ eU>UT =Gintnum_total_si;/* total number of valid symbol interpretations */ {U<UTL =Ev'}  XkbCompatMapNotifyEvent =; st$ [changed_groups 4 is the number of group compatibility maps that have changed. If you are ong 4veXmaintaining a corresponding copy of the compatibility map, or get a fresh copy from the >  4raHserver using  XkbGetCompatMap 4,  }changed_groups 4 references n D teRgroups 4[0.. changed_groups 4-1] in the  {XkbCompatMapRec 4 structure. $+ ffirst_si 4 is the index of the first changed symbol interpretation,  num_si 4 is the number of + 4 n]changed symbol interpretations, and  num_total_si 4 is the total number of valid symbol o+ 4edZinterpretations. If you are maintaining a corresponding copy of the compatibility map, or  + 4t fget a fresh copy from the server using  XkbGetCompatMap 4,  first_si 4,  num_si 4, and + ofdnum_total_si 4 are appropriate for use with the  compat.sym_interpret 4 vector in this struc%D+ 4chture. d  atma  VoureHH  b  rpoHHatesh copy l0 3si5(Allocating and Freeing the Compatibility Map8 r$1 4YIf you are modifying the compatibility map, you need to allocate a new compatibility map )D1 4Sif you do not already have one available. To do so, use  XkbAllocCompatMap 4.  i=UTUTl2 =AStatus 9 tXkbAllocCompatMap =( xkb, which, num_si =) _JURUTd3 =l UXkbDescPtr  xkb =;/* keyboard description in which to allocate compat map */ WUPUTd4 = oTunsigned int which =;/* mask of compatibility map components to allocate */ ngdUNUTd5 =apQunsigned int num_si =;/* number of symbol interpretations to allocate */ aw$6 } u]xkb 4 specifies the keyboard description for which compatibility maps are to be allocated. D6 4EThe compatibility map is the  compat 4 field in this structure. $7 }[which 4 specifies the compatibility map components to be allocated (see  XkbGetCompatD7 ]Map 4, in section 17.2).  }which 4 is an inclusive OR of the bits shown in Table 17.2. t$8 }apanum_si 4 specifies the total number of entries to allocate in the symbol interpretation vector eD8 4so$( }xkb.compat.sym_interpret 4). UT$9 4SteNote that symbol interpretations in a compatibility map (the  sym_interpret 4 vector of  {Xkbk9 {d \SymInterpretRec 4 structures) are also allocated using this same function. To ensure that =9 4at[there is sufficient space in the symbol interpretation vector for entries to be added, use * n9 te`XkbAllocCompatMap 4 specifying  }which 4 as  {XkbSymInterpretMask 4 and the number of hiD9 4ap6free symbol interpretations needed in  }num_si 4. &$: yXkbAllocCompatMap 4 returns  {Success 4 if successful,  {BadMatch 4 if  }xkb 4 is  {NULL 4, or  {Badl3D: {bGIAlloc 4 if errors are encountered when attempting to allocate storage. iHd; 4of_To free an entire compatibility map or selected portions of one, use  XkbFreeCompatMap 4. tri]ULUTl< =th@void : tXkbFreeCompatMap =( xkb, which, free_map =) pajUJUTd= =)SXkbDescPtr  xkb =;/* Xkb description in which to free compatibility map */ e wUHUTd> =4Punsigned int which =;/* mask of compatibility map components to free */ aUFUTd? =s ZBool  free_map =;/*  {True = => free  pXkbCompatMap = structure itself */ $@ }ecbwhich 4 specifies the compatibility map components to be freed (see  XkbGetCompatMap 4, in D@ 4InPsection 17.2).  }which 4 is an inclusive OR of the bits shown in Table 17.2 on$A }m_]free_map 4 indicates whether the  {XkbCompatMap 4 structure itself should be freed. If BA }xnfree_map 4 is  {True 4,  }which 4 is ignored, all non- {NULL 4 compatibility map components are DA 4 ipfreed, and the  }compat 4 field in the  {XkbDescRec 4 referenced by  }xkb 4 is set to  {NULL 4. .d  arCo  W, eeHH b  HHcr,,compatib  , UT UTlk 2gngSymbolic Names 3 2 co$l 4mp\The core protocol does not provide any information to clients other than that actually used X,l 4ru[to interpret events. This makes it difficult to write an application that presents the key be9l 4bGXboard to a user in an easy-to-understand way. Such applications have to examine the venofFl 4 TVdor string and keycodes to determine the type of keyboard connected to the server and Sl 4 sVthen examine keysyms and modifier mappings to determine the effects of most modifiers `l 4 m(the  {Shift 4,  {Lock 4 and  {Control 4 modifiers are defined by the core protocol but no seman{mDl 4fe+tics are implied for any other modifiers). .$m 4WTo make it easier for applications to present a keyboard to the user, Xkb supports symm 4Rbolic names for most components of the keyboard extension. Most of these symbolic Dm 4SyPnames are grouped into the  names 4 component of the keyboard description. deln 3o The XkbNamesRec Structure do 4GThe names component of the keyboard description is defined as follows: atiURUT$p =he#defineXkbKeyNameLength4 XboUPUTp =n #defineXkbKeyNumVirtualMods16 caUNUTp =in#defineXkbKeyNumIndicators32 Vdo ULUTp =de#defineXkbKeyNumKbdGroups4 oUJUTDp =he#defineXkbMaxRadioGroups32 s+UHUT$- =sytypedef struct { p8UFUT- =th7charname[XkbKeyNameLength];/* symbolic key names */ {SEUDUTL- = -}  XkbKeyNameRec =,*XkbKeyNamePtr; YUBUT$/ =butypedef struct { fU@UT/ = aLcharreal[XkbKeyNameLength];/* this key name must be in the keys array */ r sU>UT/ =o Lcharalias[XkbKeyNameLength];/* symbolic key name as alias for the key */ c U<UTL/ =po.}  XkbKeyAliasRec =,*XkbKeyAliasPtr; U:UT$B =typedef struct _XkbNamesRec { U8UTB = c?Atomkeycodes;/* identifies range and meaning of keycodes */ ThU6UTB =ctTAtomgeometry;/* identifies physical location, size 1, = and shape of keys */ s U4UTB =UTPAtomsymbols;/*  4identifies the symbols logically bound to the keys = */ mVU2UTB =UN7Atomtypes;/*  4identifies the set of key types */ UTU0UTB =inHAtomcompat;/*  4identifies actions for keys using core protocol */ sU.UTB =syTAtomvmods[XkbNumVirtualMods]; /*  4symbolic names = for virtual modifiers */ y U,UTB =UTQAtomindicators[XkbNumIndicators]; /*  4symbolic names = for indicators */ yU*UTB =U@MAtomgroups[XkbNumKbdGroups]; /*  4symbolic names for keyboard groups */  U(UTB =U>CXkbKeyNamePtrkeys;/*  4symbolic key name =  4array  =*/ asU&UTB = *HXkbKeyAliasPtrkey_aliases;/* real/alias symbolic name pairs array */ U:#U$UTB =ty3Atom *radio_groups;/* radio group name array */ om0U"UTB =ifRAtomphys_symbols;/*  4identifies the symbols engraved on the keyboard = */ =U UTB =ocHunsigned charnum_keys;/* number of keys in the  }keys = array */ mbJUUTB =fiVunsigned charnum_key_aliases;/* number of keys in the  }key_aliases = array */ WUUTB =he5unsigned shortnum_rg;/* number of radio groups */ pdUUTLB =ie,}  XkbNamesRec =,*XkbNamesPtr;/* U.w,C 4AcThe  keycodes 4 name identifies the range and meaning of the keycodes returned by the key=UTC 4[Xcboard in question. The  geometry 4 name, on the other hand, identifies the physical location, bNul'  ! b # brdl'  CXKeh  #XkbIndicatorMapRec flags Field */'  " b eal' ym e prsd UT l7l # b ! ! o nl7lUT =ifA ` /*Value 7 $ b ! % d=7oc ed ar ` erEffect in lHl  % b $ " BfilHl ey /*um UTUTh = kXkbIM_NoExplicit yH & b " ' urgH ro dUUT UTUT` =>Client applications cannot change the state of the indicator. lVl#  ' b & # rgelVl# yc rneby UTUTh =lXkbIM_NoAutomatic V#  ( b # ) oerV##ph catn, UTUT  ==Xkb does not automatically change the value of the indicator URUT ==based upon a change in the keyboard state, regardless of the UPUT@ =2values for the other fields of the indicator map. lzl  ) b ( $ lzl  n l UTUTh =ifmXkbIM_LEDDrivesKB z  * b $ z  UTUT  =@A client application changing the state of the indicator causes fiURUT@ =%the state of the keyboard to change. Hi  + b - Hi rg #h UJ$XkbIndicatorMapRec which_groups and groups, Keyboard Drives Indicator i  , b #i  #ycd UT lyl  - b + . lyl # `  which_groups TyD  . b - / yhayDnd #URUT ` d Effect angll / b . 0 UPlles #oth f UTUTh =atnXkbIM_UseNone D 0 b / 1 D #UT UTUT` =M_KThe  groups = field and the current keyboard group state are ignored. ll$ 1 b 0 2 iell$g # ofhe UTUTh =fioXkbIM_UseBase D$ 2 b 1 3 D$$ - # UTUT  =NIf  groups = is nonzero, the indicator is lit whenever the base keyboard URUT = DTgroup is nonzero. If  groups = is zero, the indicator is lit whenever the base UPUT@ =keyboard group is zero. ll$ 3 b 2 4 ll$ #  UTUTh =h_pXkbIM_UseLatched D$  4 b 3 5 D$$UT # UTUT  =QIf  groups = is nonzero, the indicator is lit whenever the latched keyboard fURUT =atOgroup is nonzero. If  groups = is zero, the indicator is lit whenever the UPUT@ =UT latched keyboard group is zero. grll$  5 b 4 6 ustll$ #$ UTUTh =qXkbIM_UseLocked D$  6 b 5 7 iD$$ # UTUT  =QThe  groups = field is interpreted as a mask. The indicator is lit when the URUT =diFcurrent locked keyboard group matches one of the bits that are set in UPUT@ up groups =. tll$  7 b 6 8 PUTll$ g #ero UTUTh =rXkbIM_UseEffective D$  8 b 7 9 TUTD$$M_ #d  UTUT  = QThe  groups = field is interpreted as a mask. The indicator is lit when the URUT = Icurrent effective keyboard group matches one of the bits that are set in UPUT@ n groups =. gHh  9 b 8 < nerHh  'chekeh roJ(XkbIndicatorMapRec which_groups and groups, Indicator Drives Keyboard h  : b kM_h  '  bd 4 h  ; b Th ps 'd iind 4k. elxl  < b 9 = dilxlar 'atcs ` at which_groups x6  = b < > x6 'l ` # New State x  > b = ? ex  ' ` Effect on Keyboard Group State UTll  ? b > @ nrpll nd ' liwh UTUT` =XkbIM_UseNone ef6  @ b ? A i t6 UT ' ngr UTUT` = On or Off   A b @ B   'hro UTUT` =Ma No effect ll  B b A C ll  b 'k UTUT` =XkbIM_UseBase 6  C b B D 6  ' UTUT` =' On or Off   D b C E  di 'l UTUT` =tc No effect ll.  E b D F ll.  'x UTUT` =XkbIM_UseLatched 6. F b E G  b6.  ' UTUT` =On . ! G b F H eUT..  ' UTUT  =BThe  groups = field is treated as a group mask. The keyboard URUT =:group latch is changed to the lowest numbered group speciUPUT =Pfied in  groups =; if  groups = is empty, the keyboard group latch is *UNUT@ =changed to zero. ll9 " H b G I b Cll9  '  b UTUT` =UTXkbIM_UseLatched k69 # I b H J D69  '' UTUT` =UTOff 9 $ J b I K b E99 ' di UTUT  =UTIThe  groups = field is treated as a group mask. If the indicator is URUT =zero, the indicator is lit when none of the modifier keys are *UNUT@ 4 latched. Bl6l# 5 [ b Z \ l6l#  3 UTUTh =vXkbIM_UseLocked l6;# 6 \ b [ ] h 6;##UR 3 UTUT  =arSThe indicator is lit when any of the modifiers specified in the  mask = field 4URUT =dsZof  mods = are locked.  4If both  mods.real_mods 4 and  mods.vmods 4 are UPUT@ 4s.Jzero, the indicator  =is lit when none of the modifier keys are locked. lZl. 7 ] b \ ^ kM_lZl.  3 4 b UTUTh =wXkbIM_UseEffective 3Z;. 8 ^ b ] _ ar Z;.. m 3spefi UTUT  = SThe indicator is lit when any of the modifiers specified in the  mask = field ealURUT =moXof  mods = are in the effective keyboard state. 4If both  mods.real_mods 4 fiUPUT 4UTIand  mods.vmods 4 are zero, the indicator is lit when the effective *UNUT@ 4&keyboard state contains no modifiers. ll. 9 _ b ^ ` 6 bll.  3# UTUTh =xXkbIM_UseCompat Th;. : ` b _ spe;.. 34UR UTUT  =ofSThe indicator is lit when any of the modifiers specified in the  mask = field re URUT =s.Eof  mods = are in the keyboard compatibility state.  4If both kUPUT Imods.real_mods 4 and  mods.vmods 4 are zero, the indicator is lit T*UNUT@ 4Awhen = the keyboard compatibility state contains no modifiers. aH ; a b d iUTH in 7s l wh F sXkbIndicatorMapRec which_mods and mods, Indicator Drives Keyboard  < b b t al 7 fiUPd 4an  = c b t  UN 7@d 4on nll > d b a e b `ll 7  ` UT which_mods =6 ? e b d f :6pe 7; ` New State  @ f b e g t i 7ma ` UTEffect on Keyboard Modifiers rll A g b f h Iboll 7al_ds UTUT  =vmXkbIM_UseNone or hURUT@ = TXkbIM_UseBase 6 B h b g i te 6 a 7 UTUT` = On or Off  C i b h j  L 7Rechi UTUT` =In No Effect ll D j b i k ll 7al7 UTUT` =XkbIM_UseLatched 6 E k b j l 67 7 UTUT` = nOn  F l b k m  7  UTUT  =h_FAny modifiers specified in the  mask = field of  mods = are URUT@ = added to the latched modifiers. e ll G m b l n tll i 7ma UTUT` =UTXkbIM_UseLatched d6 H n b m o h6 77 UTUT` =UTOff  I o b n p TXk 7 B b UTUT  =e FAny modifiers specified in the  mask = field of  mods = are URUT@ =$removed from the latched modifiers. ll* J p b o q Inll** 7 D b UTUT  =XkbIM_UseLocked, URUT =7XkbIM_UseCompat, or Xk$UPUT@ =XkbIM_UseEffective k b6* K q b p r 776* 7On UTUT` =On l b* L r b q s 7* 7FAnmo UTUT  =inFAny modifiers specified in the  mask = field of  mods = are URUT@ =ifadded to the locked modifiers. m bl'l M s b r t i7l'l 7XkM_ UTUT` =XkbIM_UseLocked b'6 N t b s u 7'6 7Of UTUT` =Off b' O u b t v 7' 7FAnmo UTUT  =inFAny modifiers specified in the  mask = field of  mods = are URUT@ = m#removed from the locked modifiers. p blCl P v b u w 7lCl 7XkM_ UTUT  =UTXkbIM_UseCompat or seCURUT@ =UTXkbIM_UseEffective seEC6 Q w b v x rC6 77 UTUT` =UTOff C R x b w sC 77 UTUT  =UTFAny modifiers specified in the  mask = field of  mods = are URUT@ =UT4removed from both the locked and latched modifiers. d S y a  XkM_HH T z b y HH u6   4bfreeing it. These masks and their relationships to the fields in the  {XkbDescRec 4 are shown BL 4Anin Table 6.2.  l 3 =9 Obtaining a Keyboard Description from the Server r$ 4fiWTo retrieve one or more components of a keyboard device description, use  XkbGetKeyXkD 3board 4 (see also  XkbGetKeyboardbyName 4). IM_ UDUTl =KXkbDescPtr  tXkbGetKeyboard =( display, which, device_spec =) UBUTd =:Display *  display =;/* connection to X server */ $U@UTd =Hunsigned int which =;/* mask indicating components to return */ 1U>UTd = iunsigned int device_spec =;/* device for which to fetch description, or  wXkbUseCoreKbd = */ D$ ]XkbGetKeyboard  4allocates and returns a pointer to a keyboard description. It queries the Q 4 uhserver for those components specified in the  }which 4 parameter for device  device_spec 4 and th^ 4to`copies the results to the  {XkbDescRec 4 it allocated. The remaining fields in the keyboard kD 4infdescription are set to  {NULL 4. The valid masks for  which 4 are those listed in Table 6.2. d icBXkbGetKeyboard 4 can generate  {BadAlloc 4 protocol errors. d 4etZTo free the returned keyboard description, use  XkbFreeKeyboard 4 (see section 6.4). d 3_s;Tracking Changes to the Keyboard Description in the Server /$ 4seZThe server can generate events whenever its copy of the keyboard description for a device  4UTWchanges. Refer to section 14.4 for detailed information on tracking changes to the key, oD 4dboard description. $ l 3rd> Allocating  =K 3and Freeing a Keyboard Description  $ 4\Applications seldom need to directly allocate a keyboard description; calling  XkbGetKeyic 4Xboard 4 usually suffices. In the event you need to create a keyboard description from he#D 4inoscratch, however, use  XkbAllocKeyboard 4 rather than directly calling  malloc  4or  Xmalloc 4. tho8U<UTl = 60XkbDescRec *  tXkbAllocKeyboard =(void) enK$ 4 gIf  XkbAllocKeyboard 4 fails to allocate the keyboard description, it returns  {NULL 4. OtherardX 46.ewise, it returns a pointer to an empty keyboard description structure. The  device_spec 4 field e 4an_will have been initialized to  {XkbUseCoreKbd 4. You may then either fill in the structure Wchr 4ctUcomponents or use Xkb functions to obtain values for the structure components from a D 4n.keyboard device. d U { ag KHH V | b { t aHHcr  etKeyic $ 4ffbTo destroy either an entire an  qXkbDescRec 4 or just some of its members, use  XkbFreeKeyD bAboard. ard)UTUTl =ir;void  tXkbFreeKeyboard (xkb, which, free_all =) 6URUTd =ecNXkbDescPtr  xkb =;/* keyboard description with components to free */ CUPUTd = aFunsigned int which =;/* mask selecting components to free */ PUNUTd =wiTBool  free_all =;/*  wTrue = => free all components and  xkb = */ ecc$ fXkbFreeKeyboard 4 frees the components of  }xkb 4 specified by  }which 4 and sets the correp 4{sponding values to  {NULL 4. If  }free_all 4 is  {True 4,  XkbFreeKeyboard 4 frees every non- {NULL 4 d d}D 4Jcomponent of  }xkb 4 and then frees the  }xkb 4 structure itself. d W } aHH X ~ b } HHoy,,XkbDesct , UT UTl 2  kVirtual Modifiers@ $ 4UT\The core protocol specifies that certain keysyms, when bound to modifiers, affect the rules , 4 ]of keycode to keysym interpretation for all keys; for example, when the  Num_Lock 4 keyi9 4Ssym is bound to some modifier, that modifier is used to select between shifted and ;F 4 fXunshifted state for the numeric keypad keys. The core protocol does not provide a convee S 4xkinient way to determine the mapping of modifier bits (in particular  {Mod1 4 through  {Mod5 4) to I` 4 iakeysyms such as  Num_Lock 4 and  Mode_switch 4. Using the core protocol only, a client nm 4 aYapplication must retrieve and search the modifier map to determine the keycodes bound to z 4Veach modifier, and then retrieve and search the keyboard mapping to determine the key 4Wsyms bound to the keycodes. It must repeat this process for all modifiers whenever any D 4co)part of the modifier mapping is changed. $ 4fi[Xkb alleviates these problems by defining virtual modifiers. In addition to the eight core s;  4thjmodifiers, referred to as the A freal modifiers 4, Xkb provides a set of sixteen named  fvirtual  fndcmodifiers 4. Each virtual modifier can be bound to any set of the real modifiers ( {Shift 4, vidD { 4te]lection of modifiers that affect or are affected by some other entity. A modifier definition K 4pr_is relevant only in the context of some other entity such as an indicator map, a control, or a D XD 4nt0key type. (See sections 8.2.2, 10.8, and 15.2.) ctmURUT$  =oftypedef struct _XkbMods { zUPUT  =usHunsigned charmask;/* real_mods | vmods mapped to real modifiers */  UNUT  =e 5unsigned charreal_mods;/* real modifier bits */ d Y  a.he iChHH Z b  i DHHE'' modifie4'UTUT  =f 6unsigned short vmods;/* virtual modifier bits */ URUTD  =nd"}  XkbModsRec =,*XkbModsPtr; '$  4r.ZAn Xkb modifier definition consists of a set of bit masks corresponding to the eight real 4  4ti_modifiers ( real_mods 4); a similar set of bitmasks corresponding to the 16 named virtual soA  4 mnmodifiers ( vmods 4); and an Deffective mask ( mask 4). The effective mask represents the set of N  4, _all real modifiers that can logically be set either by setting any of the real modifiers or by =of[  4Xkfsetting any of the virtual modifiers in the definition.  -mask 4 is derived from the real and virh  4e [tual modifiers and should never be explicitly changed it contains all of the real modifiu  4jers specified in the definition ( real_mods 4)  plus 4 any real modifiers that are bound to the   4dvirtual modifiers specified in the definition ( vmods 4). The binding of the virtual modifiers UT  4o real modifiers is exterior to the modifier definition. Xkb automatically recomputes the t o  4poWmask field of modifier definitions as necessary. Whenever you access a modifier definit o  4on[tion that has been retrieved using an Xkb library function, the mask field will be correct ffeD  4&for the keyboard mapping of interest. dy 3,Binding Virtual Modifiers to Real Modifiers y $ 4etcThe binding of virtual modifiers to real modifiers is defined by the  server.vmods 4 array in th 4maban  {XkbDescRec 4 structure. Each entry contains the real modifier bits that are bound to the  4it]virtual modifier corresponding to the entry. The overall relationship of fields dealing with r D 4plOvirtual modifiers in the server keyboard description are shown in Figure 16.2. ifi#l 3he!EVirtual Modifier Key Mapping n7$w 4l _Xkb maintains a  virtual modifier mapping 4, which lists the virtual modifiers associated utoDw 4es[with, or bound to, each key. The real modifiers bound to a virtual modifier always include cceQw 4ni^all of the modifiers bound to any of the keys that specify that virtual modifier in their vir^w 4ct^tual modifier mapping. The  server.vmodmap 4 array indicates which virtual modifiers are kw 4 R^bound to each key; each entry is a bitmask for the virtual modifier bits. The  server.vmodxDw ve%map 4 array is indexed by keycode. , 4scnThe  vmodmap 4 and  vmods 4 members of the server map are the master virtual modifier 3G 4  4onZdefinitions. Xkb automatically propagates any changes to these fields to all other fields D 4 t7that use virtual modifier mappings (see section 16.4). ifi$ 4hedFor example, if  {Mod3 4 is bound to the  Num_Lock 4 key by the core protocol modifier map  4e dping, and the  {NumLock 4 virtual modifier is bound to they  Num_Lock 4 key by the virtual boD 4odamodifier mapping,  {Mod3 4 is added to the set of modifiers associated with  {NumLock 4. e$ 4moTThe virtual modifier mapping is normally updated whenever actions are automatically p 4s Wapplied to symbols (see section 16.4 for details), and few applications should need to askD 4od0change the virtual modifier mapping explicitly. ve$ 4 ieUse  XkbGetMap  4(see section 14.2) to get the virtual modifiers from the server or use  Xkba' v]GetVirtualMods 4 (see section 16.4.1) to update a local copy of the virtual modifiers bind 4 4ieWings from the server. To set the binding of a virtual modifier to a real modifier, use tioAD .XkbSetMap 4 (see   4section 14.3 ). d [ a otHH \ b tl HHhe**y the vi *$ 4pi[To determine the mapping of virtual modifiers to core X protocol modifiers, use  XkbVirD uatualModsToReal 4. no)UTUTl =LBool F tXkbVirtualModsToReal =( xkb, virtual_mask, mask_rtrn =) se6URUTd =aiGXkbDescPtr  xkb =;/* keyboard description for input device */ theCUPUTd =maNunsigned int virtual_mask =;/* virtual modifier mask to translate */ PUNUTd =uaJunsigned int *  mask_rtrn =;/* backfilled with real modifiers */ c$ 4iogIf the keyboard description defined by  xkb 4 includes bindings for virtual modifiers,  XkbVirr. p o^tualModsToReal 4 uses those bindings to determine the set of real modifiers that correspond } 4. kto the set of virtual modifiers specified in  virtual_mask 4. The  }virtual_mask 4 parameter is a  4^mask specifying the virtual modifiers to translate; the i-th bit (0 relative) of the mask rep 4 moresents the i-th virtual modifier. If  mask_rtrn 4 is non- {NULL 4,  XkbVirtualModsToReal 4 back 4 4 dfills it with the resulting real modifier mask. If the keyboard description in  }xkb 4 does not ai 4xeinclude virtual modifier bindings,  XkbVirtualModsToReal 4 returns  {False 4; otherwise, it _D 4uareturns  {True 4. ULUT$  =aIt is possible for a local (client-side) keyboard description (the  xkb = parameter) to not UJUT  =arVcontain any virtual modifier information (simply because the client has not requested UHUT  = Uit) while the servers corresponding definition may contain virtual modifier informatUFUTD  =tion. 4. l  3rtHInactive Modifier Sets v#$  4heJAn unbound virtual modifier is one that is not bound to any real modifier 0D  4fiA( server 4-> vmods 4irtual_modifier_index] is zero). E$ 4ntSSome Xkb operations ignore modifier definitions in which the virtual modifiers are ModRD 44 unbound. Consider this example: h gUDUT$ = m(if (state matches {Shift}) Do OneThing; insUBUTD =no/if (state matches {Shift+NumLock}) Do Another; r b$ 4rtdIf the  {NumLock 4 virtual modifier is not bound to any real modifiers, the effective masks for UL 4Itdthese two cases are identical (that is, contain only  {Shift 4). When it is essential to distinUT 4ai^guish between  OneThing 4 and Another, Xkb considers only those modifier definitions for D 4e 'which all virtual modifiers are bound. tailz 3 iIConventions ${ 4. WThe Xkb extension does not require any specific virtual modifier names. However, everyual{ 4haVone benefits if the same names are used for common modifiers. The following names are D{ 4in suggested: . $| {ntNumLock o| {od ScrollLock ion"| {tuAlt if/| {Meta <| { AltGr ID| {UT LevelThree (ifbl} 3hi JExample ngv$~ 4 ^If the second (0-relative) entry in  names.vmods 4 contains the Atom for NumLock, then ~ 4iel0x4 (1<<2) is the virtual modifier bit for the  {NumLock 4 virtual modifier. If  server.vmods 4[2] tid ] aWn ##UTHH ^ b g4HHiddefiniti#!~ 4rtlcontains  {Mod3Mask 4, then the  {NumLock 4 virtual modifier is bound to the  {Mod3 4 real modiesD~ 4pefier. *d 4es;A virtual modifier definition for this example would have: sa?$ 4foreal_mods = 0 L 4na-vmods = 0x4 (NumLock named virtual modifier) YD 4Numask = 0x20 (Mod3Mask) {odn$ 4\Continuing the example, if the keyboard has a  Num_Lock 4 keysym bound to the key with |{ 4iffkeycode 14, and the  {NumLock 4 virtual modifier is bound to this key,  server.vmodmap 4[14] D 4 tcontains 0x4. $ 4cFinally, if the keyboard also used the real  {Mod1 4 modifier for numeric lock operations, the se 4tiVmodifier definition below would represent the situation where either the key bound to D { bQMod1 4 or the  {NumLock 4 virtual modifier could be used for this purpose: $ 4real_mods = 0x8 (Mod1Mask) {M 4th-vmods = 0x4 (NumLock named virtual modifier) tD 4al"mask = 0x28 (Mod1Mask | Mod3Mask) d _ afit$$ he:HH ` b HH0x)) modifie$") UT UTlp 23MIndicatorsK $$q 4heVAlthough the core X implementation supports up to 32 LEDs on an input device, it does ,q 4odYnot provide any linkage between the state of the LEDs and the logical state of the input [9q 4Zdevice. For example, most keyboards have a  {CapsLock 4 LED, but X does not provide a FDq 4r ^mechanism to make the LED automatically follow the logical state of the  CapsLock 4 key. [$r 4e ZFurthermore, the core X implementation does not provide clients with the ability to deterhr 4orfmine what bits in the  led_mask 4 field of the  {XKeyboardState 4 map to the particular LEDs ur 4alYon the keyboard. For example, X does not provide a method for a client to determine what _r 4fhbit to set in the  led_mask 4 field to turn on the  Scroll Lock  4LED or whether the keyboard 0xDr 4$even has a  Scroll Lock 4 LED. UT$s 4WXkb provides indicator names and programmable indicators to help solve these problems. to s 4XUsing Xkb, clients can determine the names of the various indicators, determine and cons s 4at[trol the way that the individual indicators should be updated to reflect keyboard changes,  4s 4noXand determine which of the 32 keyboard indicators reported by the protocol are actually als 4Ca[present on the keyboard. Clients may also request immediate notification of changes to the cls 4liZstate of any subset of the keyboard indicators, which makes it straightforward to provide s 4apZan on-screen virtual LED panel. This chapter describes Xkb indicators and the functions Ds 4clused for manipulating them. lt 4toM 3Indicator Names 4,$u 4thVXkb provides the capability of symbolically naming indicators. Xkb itself doesnt use 9u 4EDYthese symbolic names for anything; they are there only to help make the keyboard descripsFu 4s.`tion comprehensible to humans. To set the names of specific indicators, use  XkbSetNames 4 teSu 4cas discussed in Chapter 18. Then set the map using  XkbSetMap 4 (see section 14.3) or  Xkbhan`Du bSetNamedIndicator 4 (below). To retrieve indicator names, use  XkbGetNames 4 (Chapter 18). ydv 3CaIndicator Data Structures $w 4quVUse the indicator description record,  {XkbIndicatorRec 4, and its indicator map, w {inSXkbIndicatorMapRec 4, to inquire about and control most indicator properties and n Dw 4. behaviors. deslx 3orLXkbIndicatorRec $y 4uscThe description for all the Xkb indicators is held in the  indicators 4 field of the complete prDy 4itCkeyboard description (see Chapter 6), which is defined as follows: URUTdz =mb#defineXkbNumIndicators32 ar UPUT${ =lptypedef struct { dUNUT{ =;unsigned long phys_indicators;/* LEDs existence */ spe$ULUT{ =usFXkbIndicatorMapRecmaps[XkbNumIndicators];/* indicator maps */ 1UJUTL{ = u0} N XkbIndicatorRec =,*XkbIndicatorPtr; kbD$| 4u`This structure contains the  phys_indicators 4 field, which relates some information about 1Q| 4vVthe correspondence between indicators and physical LEDs on the keyboard, and an array ^D| 4or2of indicator  maps 4, one map per indicator. s$} 4ec_The  phys_indicators 4 field indicates which indicators are bound to physical LEDs on the rs.} 4xckeyboard; if a bit is set in  phys_indicators 4, then the associated indicator has a physical in d a aepr%%oa dHH b b ds HHq""Indicato ! *%#UT"} 4ctYLED associated with it. This field is necessary because some indicators may not have corL} 4XRresponding physical LEDs on the keyboard. For example, most keyboards have an LED "} 4bI^for indicating the state of  {CapsLock 4, but most keyboards do not have an LED that indi/} 4d,dcates the current group. Because  phys_indicators 4 describes a physical characteristic of the d <} 4heXkeyboard, you cannot directly change it under program control. However, if a client proatI} 4}[gram loads a completely new keyboard description via  XkbGetKeyboardByName 4, or if a onV} 4^new keyboard is attached and the X implementation notices,  phys_indicators 4 changes if cD} 43the indicators for the new keyboard are different. %%|l~ 3 d XkbIndicatorMapRecO $ 4]Each indicator has its own set of attributes that specify whether clients can explicitly set t 4it^its state and whether it tracks the keyboard state. The attributes of each indicator are held D 4LETin the  maps 4 array, which is an array of  {XkbIndicatorRec 4 structures: inUTUT$ = otypedef struct { URUT = d@unsigned charflags;/* how the indicator can be changed */ t UPUT =p@unsigned charwhich_groups;/* match criteria for groups */ UNUT =keLunsigned chargroups;/* which keyboard groups the indicator watches */ enULUT =Aunsigned charwhich_mods;/* match criteria for modifiers */ XUJUT =eAXkbModsRecmods;/* which modifiers the indicator watches */ t UHUT =n Cunsigned intctrls;/* which controls the indicator watches */ inUFUTL =ew7} P XkbIndicatorMapRec =, *XkbIndicatorMapPtr; Ind,d 41This indicator map specifies for each indicator: tAUDUTd =t UThe conditions under which the keyboard modifier state affects the indicato 1r = MUBUTd =oaJThe conditions under which the keyboard group state affects the indicator YU@UTd =arSThe conditions under which the state of the boolean controls affects the indicator tyeU>UT$ =URZThe effect (if any) of attempts to explicitly change the state of the indicator using the qU<UTD =igCfunctions  XkbSetControls = or  XChangeKeyboardControl = $ 4d [For more information on the effects of explicit changes to indicators and the relationship sigD 4ds)to the indicator map, see section 8.4.1. JU:UTd XXkbIndicatorMapRec flags field ier$ 4tcbThe  flags 4 field specifies the conditions under which the indicator can be changed and the  4eweeffects of changing the indicator. The valid values for  flags 4 and their effects are shown in eBL 4diQTable 8.1. d`$ 4ns\Note that if  {XkbIM_NoAutomatic 4 is not set, by default the indicator follows the keyThmD 4 wboard state. d c aT&&nd wHH d b c tHH UT&& (if any&$to&$ 4tedIf  {XkbIM_LEDDrivesKB 4 is set and  {XkbIM_NoExplicit 4 is not, and if you call a function ar 4]which updates the servers image of the indicator map (such as  XkbSetIndicatorMap 4 or " \XkbSetNamedIndicator 4), Xkb changes the keyboard state and controls to reflect the other Ma/ 4er^fields of the indicator map, as described in the remainder of this section. If you attempt to < 4d ]explicitly change the value of an indicator for which  {XkbIM_LEDDrivesKB 4 is absent or ID 4arZfor which  {XkbIM_NoExplicit 4 is present, keyboard state or controls are unaffected. ^$ 4icXFor example, a keyboard designer may want to make the  {CapsLock 4 LED controllable atk 4conly by the server, but allow the  Scroll Lock 4 LED to be controlled by client applications. x 4TTo do so, the keyboard designer could set the  {XkbIM_NoExplicit 4 flag for the te {DrcCapsLock   4LED, but not set it for the  Scroll Lock 4 LED. Or the keyboard designer may 4 4e ^wish to allow the  {CapsLock 4 LED to be controlled by both the server and client applica 4atdtions and also have the server to automatically change the  {CapsLock   4modifier state whends 4ma\ever a client application changes the  {CapsLock 4 LED. To do so, the keyboard designer ic 4luKwould not set the  {XkbIM_NoExplicit 4 flag, but would instead set the D {h XkbIM_LEDDrivesKB 4 flag. es$ 4e VThe remaining fields in the indicator map specify the conditions under which Xkb auto 4{`matically turns an indicator on or off (only if  {XkbIM_NoAutomatic 4 is not set). If these L 4coZconditions match the keyboard state, Xkb turns the indicator on. If the conditions do not D 4bI$match, Xkb turns the indicator off. UTUTl Lo6RXkbIndicatorMapRec which_groups and groups fields *$ 4bofThe  which_groups 4 and the  groups 4 fields of an indicator map determine how the keyboard 7 4licgroup state affects the corresponding indicator. The  which_groups 4 field controls the interLocDD 4 sNpretation of  groups 4 and may contain any one of the following values: YURUTd =o #define XkbIM_UseNone 0 fUPUTd =lu"#define XkbIM_UseBase (1L << 0) sUNUTd = w$#define XkbIM_UseLatched(1L << 1) ULUTd =ve##define XkbIM_UseLocked(1L << 2) VThUJUTd = i&#define XkbIM_UseEffective(1L << 3) UHUTd =A#define XkbIM_UseAnyGroupXkbIM_UseLatched | XkbIM_UseLocked | nUFUTd =AuXkbIM_UseEffective .$ 4`The  groups  4field specifies what keyboard groups an indicator watches and is the bitwise o D 4,inclusive OR of the following valid values: UTUDUTd =#define XkbGroup1Mask(1<<0) UBUTd =s #define XkbGroup2Mask(1<<1) U@UTd = t#define XkbGroup3Mask(1<<2) U>UTd =mi#define XkbGroup4Mask(1<<3) U<UTd =at #define XkbAnyGroupMask(1<<7) toU:UTd =ro #define XkbAllGroupsMask(0xf) ocd e ap 4''ofheHH f b dinHHUP  e XkbIM_ + P'%<< $ 4#d[If  {XkbIM_NoAutomatic 4 is not set (the keyboard drives the indicator), the effect of VThBL iCwhich_groups 4 and  groups 4 is shown in Table 8.2."# Xk$ 4kb]The effect of  which_groups 4 and  groups 4 when you change an indicator for which  {psXXkbIM_LEDDrivesKB 4 is set (the indicator drives the keyboard) is shown in Table 8.3. BL 4usSThe New State column refers to the new state to which you set the indicator.' (1<#UUTl 2SXkbIndicatorMapRec which_mods and mods fields 5$ 4rogThe  mods  4field specifies what modifiers an indicator watches. The  mods 4 field is an Xkb rouB 4U:bmodifier definition,  {XkbModsRec 4, as described in section 7.2, which can specify both real O 4eand virtual modifiers. The  mods 4 field takes effect even if some or all of the virtual indica\ 4 Pbtors specified in  mods 4 are unbound. To specify the mods field, in general, assign the modi 4 ejifiers of interest to  mods.real_mods 4 and the virtual modifiers of interest to  mods.vmods 4. v 4ThbYou can disregard the  mods.mask 4 field unless your application needs to interpret the indi 4M_^cator map directly (that is, to simulate automatic indicator behavior on its own). Relatively d g at nNNthinHH h b kndHHps $ Q `N&mo 4t ]few applications need to do so, but if you find it necessary, you can either read the indicai 4XWtor map back from the server after you update it (the server automatically updates the 4" 4fiZmask field whenever any of the real or virtual modifiers are changed in the modifier defi/ 4 s]nition) or you can use  XkbVirtualModsToReal 4 to determine the proper contents for the <D 4if\mask field, assuming that the  {XkbDescRec 4 contains the virtual modifier definitions. moQ$ \which_mods 4 specifies what criteria Xkb uses to determine a match with the corresponding pr^ Rmods 4 field by specifying one or more components of the Xkb keyboard state. If k {iv[XkbIM_NoAutomatic 4 is not set (the keyboard drives the indicator), the indicator is lit x 4jwhenever any of the modifiers specified in the  mask 4 field of the  mods 4 modifier definition  4ic^are also set in any of the current keyboard state components specified by  which_mods 4.  4badRemember that the  mask 4 field is comprised of all of the real modifiers specified in the defma 4an^inition plus any real modifiers that are bound to the virtual modifiers specified in the defi 4 Ynition. (See Chapter 5 for more information on the keyboard state and Chapter 7 for more a 4 tYinformation on virtual modifiers.) Use a bitwise inclusive OR of the following values to D 4pe(compose a value for  which_mods 4: aUTUTd =rr#define XkbIM_UseNone 0 URUTd =ld"#define XkbIM_UseBase (1L << 0) UPUTd =ar$#define XkbIM_UseLatched(1L << 1) M_UNUTd = n##define XkbIM_UseLocked(1L << 2) atoULUTd =is&#define XkbIM_UseEffective(1L << 3) UJUTd =s ##define XkbIM_UseCompat(1L << 4) f t(UHUT$ =diN#define XkbIM_UseAnyModsXkbIM_UseBase | XkbIM_UseLatched | XkbIM_UseLocked 5UFUTD = s'| XkbIM_UseEffective | XkbIM_UseCompat H$ 4 t[If  {XkbIM_NoAutomatic 4 is not set (the keyboard drives the indicator), the effect of UBL in:which_mods 4 and  mods 4 is shown in Table 8.43 d i aOO 5orHH j b apHHn on vir a xO'.)$ 4dThe effect on the keyboard modifiers of  which_mods 4 and  mods 4 when you change an indi 4Xk^cator for which  {XkbIM_LEDDrivesKB 4 is set (the indicator drives the keyboard) is shown " 4chYin Table 8.5. The New State column refers to the new state to which you set the indica/BL 4M_ tor.7 e.U:UTl UT#TXkbIndicatorMapRec ctrls field (@$ 4UTbThe  ctrls 4 field specifies what controls (see Chapter 10) the indicator watches and is comMD 4bI>posed using the bitwise inclusive OR of the following values: bU8UTd = '#define XkbRepeatKeysMask (1L << 0) dicoU6UTd =of$#define XkbSlowKeysMask (1L << 1) 4|U4UTd =is%#define XkbBounceKeysMask(1L << 2) U2UTd =%#define XkbStickyKeysMask(1L << 3) 5U0UTd =%#define XkbMouseKeysMask (1L << 4) U.UTd =)#define XkbMouseKeysAccelMask(1L << 5) )U,UTd =&#define XkbAccessXKeysMask(1L << 6) U*UTd =h_)#define XkbAccessXTimeoutMask(1L << 7) nU(UTd =*#define XkbAccessXFeedbackMask(1L << 8) U&UTd =e &#define XkbAudibleBellMask(1L << 9) U$UTd =ch$#define XkbOverlay1Mask(1L << 10) rU"UTd =ta$#define XkbOverlay2Mask(1L << 11) U UTd =.#define XkbAllBooleanCtrlsMask (0x00001FFF) d 4eXkb lights the indicator whenever any of the boolean controls specified in  ctrls 4 is enabled. s*l 3)UGetting Information About Indicators s>$ 4owXXkb allows applications to obtain information about indicators using two different methK 4loZods. The first method, which is similar to the core X implementation, uses a mask to specX 4inYify the indicators. The second method, which is more suitable for applications concerned e 4Vwith interoperability, uses indicator names. The correspondence between the indicator r 4U*^name and the bit position in masks is as follows: one of the parameters returned from  Xkb (1]GetNamedIndicators 4 is an index that is the bit position to use in any function call that nd k aPP Xas(HH l b kllHHy00-- 4eXkPnd-C 4 bYsize and shape of the various keys on the keyboard. As an example to distinguish between nC 4diVthese two names, consider function keys on PC-compatible keyboards. Function keys are "C 4feVsometimes above the main keyboard and sometimes to the left of the main keyboard, but /C 4es[the same keycode is used for the key that is logically F1 regardless of physical position. ita<C 4nsWThus, all PC-compatible keyboards share a similar keycodes name but may have different ponIDC 4sgeometry names. ]UTUT$D = tOThe keycodes name is intended to be a very general description of the keycodes kbiURUTD =(1\returned by a keyboard;  1a  =single keycodes name might cover keyboards with differing nuUPUTD =Qnumbers of keys provided all keys have the same semantics when present. For examlUNUTD = kSple, 101 and 102 key PC keyboards might use the same name. In these cases, applicaULUTD =siXtions can use the keyboard  geometry = name to determine which subset of the named UJUTDD =thkeycodes is in use. r $ 4C-^The  symbols 4 name identifies the symbols logically bound to the keys. The symbols name  4heZis a human or application-readable description of the intended locale or usage of the key 41 _board with these symbols. The  phys_symbols 4 name, on the other hand, identifies the sym a  4amfbols actually engraved on the keyboard. Given this, the  symbols 4 name and  phys_symbols 4  4 bZnames might be different. For example, the description for a keyboard that has English US  4 k]engravings, but that is using Swiss German symbols might have a  phys_symbols 4 name of dD 4he/en_US and a  symbols 4 name of de_CH. $E 4 a_The  types 4 name provides some information about the set of key types (see section 15.2) XtiE 4ybZthat can be associated with the keyboard. In addition, each key type can have a name, and *E 4r Weach shift level of a type can have a name. Although these names are stored in the map the7E 4 nZdescription with each of the types, they are accessed using the same methods as the other DDE 4e symbolic names.  Y$G 4he_The  compat 4 name provides some information about the rules used to bind actions to keys  fDG 4y /that are changed using core protocol requests. bol{$H 4pXXkb provides symbolic names for each of the 4 keyboard groups, 16 virtual modifiers, 32 onH 4atbkeyboard indicators, and 4 keyboard groups. These names are held in the  vmods 4,  indicaDH  2tors 4, and  groups 4 fixed-length arrays. , 4f ZEach key has a four-byte symbolic name. All of the symbolic key names are held in the  (shkeys 4 array, and  num_keys 4 reports the number of entries that are in the keys array. For each ty 4, Ykey, the key name links keys with similar functions or in similar positions on keyboards a 4ap_that report different keycodes. For example, the  F1 4 key may emit keycode 23 on one keytho 4Rboard and keycode 86 on another. By naming this key FK01 on both keyboards, the D 4at[keyboard layout designer can reuse parts of keyboard descriptions for different keyboards. ing, 4ue\Key aliases allow the keyboard layout designer to assign multiple key names to a single 6   4 3^key. This allows the keyboard layout designer to refer to keys using either their position or  4 Xtheir function. For example, a keyboard layout designer may wish to refer to the left ' 4 kXarrow key on a PC keyboard using the ISO9995-5 positional specification of A31 or using 4 4 abthe functional specification of LEFT. The  key_aliases 4 field holds a variable-length array A 4kefof real and alias key name pairs, and the total number of entries in the  key_aliases 4 array is N 4dimheld in  num_key_aliases 4. For each real and alias key name pair, the  real 4 field refers to the [ 4anfa name in the keys array, and the  alias 4 field refers to the alias for that key. Using the preh 4keVvious example, the keyboard designer may use the name A31 in the keys array, but also uD 4ayKdefine the name LEFT as an alias for A31 in the  key_aliases 4 array. ^keQ\ m b  rQ\ heosionh Predefined BellsF V\ n bho V\  kd 4C  bll o b cioll a ` peAction n oql p b  vaqlke ` s Named Bell s, l} q b k_al} di UTUT` =keIndicator turned on h q} r b  fq} an UTUTh =ysyAX_IndicatorOn lial s b yUsl Vvis UTUT` =arIndicator turned off nq t b q am anli UTUTh! = zAX_IndicatorOff y.l u b  l si UTUT`" =&More than one indicator changed state q v b q  UTUTh# ={AX_IndicatorChange l w b l ion o UTUT`$ =Control turned on q x b keq Nas,  UTUTh% = q|AX_FeatureOn kl y b iUTl cad oh UTUT`& =Control turned off q z b nUTq AXrOnia UTUTh' =}AX_FeatureOff l { b is l In o UTUT`( =$More than one control changed state q | b !q Of UTUTh) = ~AX_FeatureChange l } b "l dingest UTUT`* =5SlowKeys and BounceKeys about to be turned on or off q ~ b Xndq  w UTUTh+ =AX_SlowKeysWarning l  b otul  b UTUT`, =SlowKeys key pressed q b areq   UTUTh- =AX_SlowKeyPress l b dffl   UTUT`. =SlowKeys key accepted q b ef q  { UTUTh/ =AX_SlowKeyAccept l b tl l  | UTUT`0 =SlowKeys key rejected q b AXq  } UTUTh1 =AX_SlowKeyReject l b lKel t nedn UTUT`2 =Accepted SlowKeys key released ndq b TUTq loing UTUTh3 =AX_SlowKeyRelease l b UTl Keess  UTUT`4 =BounceKeys key rejected req b TUTq lo  UTUTh5 = AX_BounceKeyReject ll$ b Tl$  aq UTUT`6 = bStickyKeys key latched q$ b /q$ ce UTUTh7 = AX_StickyLatch l2 b 0l2 ec UTUT`8 = StickyKeys key locked q2 b 1q2 je UTUTh9 = AX_StickyLock l@ b Tl@ wKeleed UTUT`: =StickyKeys key unlocked Tq@ b UTq@ AXelee UTUTh; =AX_StickyUnlock MyZ" b  UTMyZ""ceWrejte `T 7Server sounds `U 7a bell yc" b yc""W `V 7Server sends an `W 7XkbBellNotifyEvent l b l W/UTUT`X 1ceXkbDeviceBell Q b Q  bWUTUT`Y 1On ecMZ b yysMZ W  bUTUT`Z 11Yes c b 9c k WUTUT`[ 1Yes TZ@0N$ l  dUTZ@0N$StkyZ@0NZ@0r93@? r  ' 93@? 93@93@Pl b cl  WUTUT`\ 1XkbDeviceBell Q b us Q a WUTUT`] 1 bOff MZ b MZ Wsen aUTUT`^ 1WNo Xkc b  bc W UTUT`_ 1Yes UTl b 0l WUTUT`` 1XkbBell UTQ b  Q ysWZUTUT`a 1 On UTMZ b  MZ 9WcUTUT`b 1Yes UTc b  c UTWUTUT`c 1@0Yes 3l b 3l 3W@PUTUT`d 1 XkbBell Q b Q WceBl UTUT`e 1Off bMZ b  WMZ WOfUTUT`f 1No bc b Wc WNoXkUTUT`g 1Yes bl b Wl WYeUTUTUT`h 1XkbDeviceBellEvent 0Q b UTQ elWUTUT`i 1 On or Off MZ b UTMZ UTWZUTUT`j 1No c b UTc UTWcUTUT`k 1Yes l b UTl 3WUTUT`l 1 XkbBellEvent Q b TQ W UTUT`m 1 On or Off MZ b TMZ W UTUT`n 1 No Mc b Tc W UTUT`o 1Yes l b Tl W UTUT` 1XkbDeviceForceBell Q b evQ W UTUT` 1 On or Off MZ b iMZ W UTUT` 1Yes c b Tc W UTUT` 1No l b Tl W UTUT` 1 XkbForceBell Q b lQ W UTUT` 1T On or Off MZ b mMZ W UTUT` 1TYes c b Tc W UTUT` 1TNo i0D b Ti0D  h TNAction Types D bXkD  d 4 D bUTD r d 4  PD bPD d 4 b i0T b Wi0T` Type T b WTForBe` Structure for Data TJ@ b  TJ@OnM   b XkbAction @ 7U nion  7M ember PT1 b PT1T` Section UTi0s. b  i0s.  UTUTh pfXkbSA_NoAction Ts. b  bs..  UTUT  {(Xkb pSA_NoAction = means the server URUT =(does not perform an action for the key; UPUT =(this action does not have an associated *UNUT@ =data structure. sJ@. b sJ@. 0 UTUT` =any Ps1. b Ps1.  UTUT` = i0# b  r i0## b UTUT( pgXkbSA_SetMods URUT phXkbSA_LatchMods ctUPUTH piXkbSA_LockMods  # b #   UTUT` p XkbModAction oJ@# b 0J@#   UTUT` =mods  ] r   b ]!ĢĢ T to Xlib d%'m ] r  _Ac d%'m ]! d T Additions U( ] r  UP U( ]! T functions) (9d a  cre (9d  J-ɳ4x ] r  ) J-ɳ4x ]diiҚJ-Қ T to Core Xlibd aQQHH b HHQ&&#Q( & 4Xk[requires a mask of indicator bits, as well as the indicators index into the  {XkbIndicaodsD {$torRec 4 array of indicator maps. .l 3VGetting Indicator State B$ 4^Because the state of the indicators is relatively volatile, the keyboard description does not O 4]hold the current state of the indicators. To obtain the current state of the keyboard indica\D 4 (tors, use  XkbGetIndicatorState 4. pUTUTl =AddStatus W tXkbGetIndicatorState =( display =,  device_spec =,  state_return =) s)}URUTd ==Display * display =;/* connection to the X server */ ]UPUTd = )Uunsigned int device_spec =;/* device  1ID =, or  {XkbUseCoreKbd = */ UNUTd =Zunsigned int * state_return =;/* backfilled with a mask of the indicator state */ $ &hXkbGetIndicatorState 4 queries the  display 4 for the state of the indicators on the device specs, 4dicified by the  device_spec 4. For each indicator that is turned on on the device, the associ. 4gated bit is set in  state_return 4. If a compatible version of the Xkb extension is not available ile 4crfin the server,  XkbGetIndicatorState 4 returns a  {BadMatch 4 error. Otherwise, it sends the  4d crequest to the X server, places the state of the indicators into  }state_return, 4 and returns W {or_Success 4. Thus the value reported by  XkbGetIndicatorState 4 is identical to the value plaD 4;reported by the core protocol. / ]l 3 )+XGetting Indicator Information by Index e %$ 4Xk_To get the map for one or more indicators, using a mask to specify the indicators, use  Xkbh a2D atGetIndicatorMap 4. GULUTl =diPStatus Y tXkbGetIndicatorMap =( dpy =,  which =,  desc =) deTUJUTd! =8Display * dpy =;/* connection to the X server */ ndaUHUTd" =rnWunsigned int which =;/* mask of indicators for which maps should be returned */ turnUFUTd# =ibBXkbDescPtr desc =;/* keyboard description to be updated */ $$ r,\XkbGetIndicatorMap 4 obtains the maps from the server for only those indicators specified $ 4eslby the  }which 4 mask and copies the values into the keyboard description specified by  desc 4. If $ 4 Tythe  indicators 4 field of the  desc 4 parameter is  {NULL 4,  XkbGetIndicatorMap 4 allocates and inioD$ 4 tializes it. )$% calXkbGetIndicatorMap 4 can generate  {BadAlloc 4,  {BadLength 4,  {BadMatch 4, and  {BadImplepeD% {s,mentation 4 errors. d& 4ndPTo free the indicator maps, use  XkbFreeIndicatorMaps 4 (see section 8.6). yl' 3,*ZGetting Indicator Information by Name  $( 4* `Xkb also allows applications to refer to indicators by name. Use  XkbGetNames 4 to get the at( 4 sVindicator names (see Chapter 18). Using names eliminates the need for hard-coding bit&( 4edXmask values for particular keyboards. For example, instead of using vendor-specific con t3( 4ecJstants such as  {WSKBLed_ScrollLock 4 mask on Digital workstations or @( {d [XLED_SCROLL_LOCK 4 on Sun workstations, you can instead use  XkbGetNamedIndicator 4 d oMD( 4 p>to look up information on the indicator named Scroll Lock. d a)RRditoHH b dLHHuh))R)me)$) 4[Use  XkbGetNamedIndicator 4 to look up the indicator map and other information for an yD) 4,indicator by name. or )UTUTl* =e Bool [ tXkbGetNamedIndicator =( dpy =,  dev_spec =,  name =,  ndx_rtrn =,  state_rtrn =,  map_rtrn =,  real_rtrn =) 6URUTd+ =in:Display * dpy =;/* connection to the X server */ CUPUTd, =ue_unsigned int device_spec =;/* keyboard device  1ID =, or  pXkbUseCoreKbd = */ 4ecPUNUTd- = {AAtom name =;/* name of the indicator to be retrieved */ ]ULUTd. =OLUint * ndx_rtrn =;/* backfilled with the index of the retrieved indicator */ jUJUTd/ =to`Bool * state_rtrn =;/* backfilled with the current state of the retrieved indicator */ wUHUTd0 =ReXkbIndicatorMapPtr map_rtrn =;/* backfilled with the mapping for the retrieved indicator */ UFUTd1 =iBool * real_rtrn =;/* backfilled with  {True = if the named indicator is real (physical) */ $2 4iohIf the device specified by  device_spec 4 has an indicator named  name 4,  XkbGetNamedIndica2 ,ccator 4 returns  {True 4 and populates the rest of the parameters with information about the n D2 4+Jindicator. Otherwise,  XkbGetNamedIndicator 4 returns  {False 4. $3 4 ibThe  ndx_rtrn 4 field returns the zero-based index of the named indicator. This index is the 3 4`bit position to use in any function call that requires a mask of indicator bits, as well as the =3 4wigindicators index into the  {XkbIndicatorRec 4 array of indicator maps.  state_rtrn 4 returns led3 4stpthe current state of the named indicator ( {True 4 = on,  {False 4 = off).  map_rtrn 4 returns the h 3 4e ]indicator map for the named indicator. In addition, if the indicator is mapped to a physical {D3 4am=LED, the  real_rtrn 4 parameter is set to  {True 4. e$4 4bynEach of the  _rtrn 4 arguments is optional; you can pass  {NULL 4 for any unneeded  _rtrn 4 )D4 44 arguments. s t>d5 am\XkbGetNamedIndicator 4 can generate  {BadAtom 4 and  {BadImplementation 4 errors. dIWl6 3ns&\Changing Indicator Maps and State k$7 4 fZJust as you can get the indicator map using a mask or using an indicator name, so you can xD7 4 t"change it using a mask or a name. UDUT$  =icZYou cannot change the  phys_indicators = field of the indicators structure. The only UBUTD  =inOway to change the  phys_indicators = field is to change the keyboard map. te $ 4atVThere are two ways to make changes to indicator maps and state: either change a local  4r fcopy of the indicator maps and use  XkbSetIndicatorMap 4 or  XkbSetNamedIndicator 4, or, to  4l_Treduce network traffic, use an   {XkbIndicatorChangesRec 4 structure and use rnD oXkbChangeIndicators 4. Ul8 3ee2?Effects of Explicit Changes on Indicators] $9 45[This section discusses the effects of explicitly changing indicators depending upon differors9 46Went settings in the indicator map. See Tables 8.3 and Table 8.5 for information on the inD9 4a Deffects of the indicator map fields when explicit changes are made. ge0,: 4lIf 3 {XkbIM_LEDDrivesKB 4 is set and 6 {XkbIM_NoExplicit 4 is not, and if you call a function T=: 4dthat updates the servers image of the indicator map (such as  XkbSetIndicatorMap 4 or  XkbJ: e YSetNamedIndicator 4), Xkb changes the keyboard state and controls to reflect the other W: 4in_fields of the indicator map. If you attempt to explicitly change the value of an indicator for d: 4et\which  {XkbIM_LEDDrivesKB 4 is absent or for which  {XkbIM_NoExplicit 4 is present, oqD: 4or+keyboard state or controls are unaffected. Expd a9SSesheHH b denHHttings iS*r ,; 4blbIf neither 7 {XkbIM_NoAutomatic 4 nor  {XkbIM_NoExplicit 4 is set in an indicator map, ; 4deXXkb honors any request to change the state of the indicator, but the new state might be ic"; 4 iYimmediately superseded by automatic changes to the indicator state if the keyboard state t/D; 4or controls change. oD$< 4]The effects of changing an indicator that drives the keyboard are cumulative; it is possible eQD< 4Vfor a single change to affect keyboard group, modifiers, and controls simultaneously. f$= 4LIf you change an indicator for which both the  {XkbIM_LEDDrivesKB 4 and {s= { 4YXkbIM_NoAutomatic 4 flags are specified, Xkb applies the keyboard changes specified in = 4 a^the other indicator map fields and changes the indicator to reflect the state that was explicD= 4]itly requested. The indicator remains in the new state until it is explicitly changed again. r$> 4utcIf the  {XkbIM_NoAutomatic 4 flag is not set and  {XkbIM_LEDDrivesKB 4 is set, Xkb applies any> 4 _the changes specified in the other indicator map fields and sets the state of the indicator to ded> 4ge^the values specified by the indicator map. Note that it is possible in this case for the indi> 4Th^cator to end up in a different state than the one that was explicitly requested. For example, > 4fojXkb does not extinguish an indicator with  which_mods 4 of  {XkbIM_UseBase 4 and  mods 4 of > {icjShift 4 if, at the time Xkb processes the request to extinguish the indicator, one of the  Shift 4 D> 4ppkeys is physically depressed. $? 4aIf you explicitly light an indicator for which  {XkbIM_LEDDrivesKB 4 is set, Xkb enables all p? 4=dof the boolean controls specified in the  ctrls 4 field of its indicator map. Explicitly extin? 4IfZguishing such an indicator causes Xkb to disable all of the boolean controls specified in ,D? ctrls 4. chEl@ 3 t%8Changing Indicator Maps by Index tY$A 4diYTo update the maps for one or more indicators, first modify a local copy of the keyboard sfDA 4caXdescription, then use  XkbSetIndicatorMap 4 to download the changes to the server: atzUTUTlB =quNBool t 9XkbSetIndicatorMap =( dpy =,  which =,  desc =) URUTdC = 8Display * dpy =;/* connection to the X server */ UPUTdD = ?unsigned int which =;/* mask of indicators to change */ atoUNUTdE =ShRXkbDescPtr desc =;/* keyboard description from which the maps are taken */ $F 4ghlFor each   4bit set in the  which  4parameter,  XkbSetIndicatorMap 4 sends the corresponding anDF 4d =indicator map from the  }desc 4 parameter to the server. id aiicTT a oHH b HH^ch((8ChangiT+ap(dH 3A Changing Indicator Maps by Name r dI ir8XkbSetNamedIndicator 4 can do several related things: ca0UTUTdJ =n -Name an indicator if it is not already named c@Bool state =;/* desired new state for the indicator */ (U@UT$T =ANBool create_new =;/* whether a new indicator with the specified name U>UTDT =re$should be created when necessary */ NaU<UTdU = iBXkbIndicatorMapPtr map =;/* new map for the indicator */ $V 4UT]If a compatible version of the Xkb extension is not available in the server,  XkbSetNamed V tofIndicator 4 returns  {False 4. Otherwise, it sends a request to the X server to change the indiDV 4_s;cator specified by  name 4 and returns  {True 4. $W 4*yIf  change_state 4 is  {True 4, and the optional parameter,  state 4, is not  {NULL 4,  XkbSetNamed W oraIndicator 4 tells the server to change the state of the named indicator to the value specified D*DW 4Boby  state 4. =?$X 4hagIf an indicator with the name specified by  name 4 does not already exist, the  create_new 4 theLX 4U@dparameter tells the server whether it should create a new named indicator. If  create_new 4 is UTYX {ld^True 4, the server finds the first indicator that doesnt have a name and gives it the name fDX 4orspecified by  name 4. c{$Y 4ofnIf the optional parameter,  map 4, is not  {NULL 4,  XkbSetNamedIndicator 4 tells the server to DY 4erGchange the indicators map to the values specified in   map 4. DV$ ie_XkbSetNamedIndicator 4 can generate  {BadAtom 4 and  {BadImplementation 4 errors. In  { 4 o^addition, it can also generate  {XkbIndicatorStateNotify 4 (see section 8.5),  {XkbIndiD {thJcatorMapNotify 4, and  {XkbNamesNotify 4 events (see section 18.5). l[ 3Bo)The ;XkbIndicatorChangesRec Structure a$\ 4wiXThe  {XkbIndicatorChangesRec 4 identifies small modifications to the indicator map. \ 4paaUse it with the function  XkbChangeIndicators 4 to reduce the amount of traffic sent to the TD\ 4ldserver. , U:UT$] =he&typedef struct _XkbIndicatorChanges {  U8UT] = nunsigned int state_changes; ed -U6UT] = cunsigned int map_changes; t:U4UTD] = 9} XkbIndicatorChangesRec =,*XkbIndicatorChangesPtr; M$^ 4o eThe  state_changes 4 field is a mask that specifies the indicators that have changed state, and ZD^ etQmap_changes 4 is a mask that specifies the indicators whose maps have changed. sd ac aUUtotaHH b HHhrM**bNamesNoU,s *$_ 4WTo change indicator maps or state without passing the entire keyboard description, use IndD_ >XkbChangeIndicators 4. )UTUTl` =orGBool < tXkbChangeIndicators =( dpy, xkb, changes, state =) ato6URUTda =he:Display * dpy =;/* connection to the X server */ CUPUTdb =]MXkbDescPtr xkb =;/* keyboard description from which names are to be PUNUTdc =d taken. */ ]ULUTdd =tWXkbIndicatorChangesPtr changes =;/* indicators to be updated on the server */ sPtjUJUTde =^Dunsigned int state =;/* new state of indicators listed in icwUHUTdf an*changes =-> state_changes = */ $g k _XkbChangeIndicators 4 copies any maps specified by  }changes 4 from the keyboard descripcg 4ution,  }xkb 4, to the server specified by  }dpy 4. If any bits are set in the  }state_changes 4 field of og }echanges 4,  XkbChangeIndicators 4 also sets the state of those indicators to the values specitg 4pfied in the  }state 4 mask. A 1 bit in  }state 4 turns the corresponding indicator on, a 0 bit turns it haDg 4tooff. T$h lacXkbChangeIndicator 4s can generate  {BadAtom 4 and  {BadImplementation 4 errors. In addi* kh 4n ]tion, it can also generate  {XkbIndicatorStateNotify 4 and  {XkbIndicatorMapNotify 4 tDh 4cevents (see section 8.5). li 3 s3FTracking Changes to Indicator State or Map= sta,j 4teZWhenever an indicator changes state, the server sends   {XkbIndicatorStateNotify 4 'j 4k ]events to all interested clients. Similarly, whenever an indicators map changes, the server p4Lj 4gJsends  {XkbIndicatorMapNotify 4 events to all interested clients. I$k 4}aTo receive  {XkbIndicatorStateNotify 4 events, use  XkbSelectEvents 4 (see section 4.3) sVk 4e ewith both the  bits_to_change  4and  values_for_bits 4 parameters containing  {XkbIndicaack {or[torStateNotifyMask 4. To receive  {XkbIndicatorMapNotify 4 events, use  XkbSelectcXkpDk 43Events 4 with  {XkbIndicatorMapNotifyMask 4. ion$l 4di[To receive events for only specific indicators, use  XkbSelectEventDetails 4. Set the Xkbl  Uevent_type 4 parameter { to XkbIndicatorStateNotify 4 or  {XkbIndicatorMapNoCl {r jtify 4, and set both the  bits_to_change  4and  values_for_bits 4 detail parameters to a mask l 4y^where each bit specifies one indicator, turning on those bits that specify the indicators for Dl 4rv"which you want to receive events. dm 4pN7Both types of indicator events use the same structure: $kUFUT$n = {%typedef struct _XkbIndicatorNotify { eUDUTn =ts0inttype;/* Xkb extension base event code */ bUBUTn =o_?unsigned longserial;/* X server serial number for event */ Xkb U@UTn =ABoolsend_event;/*  {True = => synthetically generated */ iU>UTn = KDisplay *display;/*  1server connection where event generated = */ fyM$U<UTn =<Timetime;/*  1server time when event generated = */ us1U:UTn =nt4intxkb_type;/* specifies state or map notify */ pe>U8UTn = tLintdevice;/* Xkb device  1ID =, will not be  pXkbUseCoreKbd =*/ tiKU6UTn =thGunsigned intchanged;/* mask of indicators with new state or map */ toXU4UTn =<unsigned intstate;/* current state of all indicators */ hoeU2UTLn =fy'} > XkbIndicatorNotifyEvent =; "whd amVVtoevHH b nHHXk++UTV-+$o e Yxkb_type 4 is either  {XkbIndicatorStateNotify 4 or  {XkbIndicatorMapNotify 4, o 4UTYdepending on whether the event is a  {kbIndicatorStateNotify 4 event or  {kbIndica"Do { *torMapNotify 4 event. on7$p 4t `The  changed 4 parameter is a mask that is the bitwise inclusive OR of the indicators that *Dp 4nahave changed. If the event is of type  {XkbIndicatorMapNotify 4,  changed 4 reports the XQp 4=dmaps that changed. If the event is of type  {XkbIndicatorStateNotify 4,  changed 4 reports at^p 4 ohthe indicators that have changed state.  state 4 is a mask that specifies the current state of all kp 4Windicators, whether they have changed or not, for both  {XkbIndicatorStateNotify 4 VVxDp 4ev'and  {IndicatorMapNotify 4 events. $q 4XWhen your client application receives either a  {XkbIndicatorStateNotify 4 event or tyq { {TXkbIndicatorMapNotify 4 event, you can note the changes in a changes structure by deDq 4 t)calling  XkbNoteIndicatorChanges 4. UTUTlr =diSvoid ? tXkbNoteIndicatorChanges =( old =,  new =,  wanted =) ngeURUTds = aXXkbIndicatorChangesPtr old =;/* XkbIndicatorChanges structure to be updated */ cUPUTdt =ntYXkbIndicatorNotifyEvent * new =;/* event from which changes are to be copied */ UNUTdu =d.Cunsigned int wanted =;/* which changes are to be noted */  4$v 4\The  }wanted 4 parameter is the bitwise inclusive OR of  {XkbIndicatorMapMask 4 and hev {alZXkbIndicatorStateMask 4.  XkbNoteIndicatorChanges 4 copies any changes reported in Dv }4Znew 4 and specified in  }wanted 4 into the changes record specified by  }old 4. $$w 4li\To update a local copy of the keyboard description with the actual values, pass the results nd1Dw 4 [of one or more calls to  XkbNoteIndicatorChanges 4 to  XkbGetIndicatorChanges 4: XkFULUTlx =gedStatus @ tXkbGetIndicatorChanges =( dpy =,  xkb =,  changes =,  state =) anSUJUTdy =UT:Display * dpy =;/* connection to the X server */ `UHUTdz =ucLXkbDescPtr xkb =;/* keyboard description to hold the new values */ nemUFUTd{ =omdXkbIndicatorChangesPtr changes =;/* indicator maps/state to be obtained from the server */ gezUDUTd| =*/Runsigned int * state =;/* backfilled with the state of the indicators */ $} MabXkbGetIndicatorChanges 4 examines the  }changes 4 parameter, pulls over the necessary infor} 4pofmation from the server, and copies the results into the  }xkb 4 keyboard description. If any bits } 4nare set in the  }state_changes 4 field of  }changes 4,  XkbGetIndicatorChanges 4 also places the } 4 state of those indicators in  }state 4. If the  indicators 4 field of  }xkb 4 is  {NULL 4,  XkbGetIndicator t} annChanges 4 allocates and initializes it. To free the  indicators 4 field, use  XkbFreeIndicators 4 D} 4o (see section 8.6). UT$~ esaXkbGetIndicatorChanges 4 can generate  {BadAlloc 4,  {BadImplementation, 4 and  {BaddD~ { Match 4 errors.  l 3e .KAllocating and Freeing Indicator MapsA $ 4 iaMost applications do not need to directly allocate the  indicators 4 member of the keyboard t* 44\description record (the keyboard description record is described in Chapter 6). If the need ma7D 4er0arises, however, use  XkbAllocIndicatorMaps. oaLUBUTl = a6Status B tXkbAllocIndicatorMaps =( xkb =) YU@UTd =f =XkbDescPtr xkb =;/* keyboard description structure */ l$ 4 fThe  xkb 4 parameter must point to a valid keyboard description. If it doesnt,  XkbAllocIndiy digcatorMaps 4 returns a  {BadMatch 4 error. Otherwise,  XkbAllocIndicatorMaps 4 allocates and eld 4ndainitializes the  indicators 4 member of the keyboard description record and returns  {Sucsd aIleWW YdHH b HHAngapsA -rWUTUT$ = nQKey aliases defined in the geometry component of a keyboard mapping (see Chapter URUT =riS13) override those defined in the keycodes component of the server database, which maUPUT =er`are stored in the  {XkbNamesRec = ( }xkb->names =). Therefore, consider the key aliases nd+UNUT =xTdefined by the geometry before considering key aliases supplied by the  {XkbNamese 7ULUTD { Rec =. K,K 4r _oA radio group is a set of keys whose behavior simulates a set of radio buttons. Once a key gcaXK 4s \in a radio group is pressed, it stays logically depressed until another key in the group is eK 4zeZpressed, at which point the previously depressed key is logically released. Consequently, rDK 4 Jat most one key in a radio group can be logically depressed at one time. $L 4VEach radio group in the keyboard description can have a name. These names are held in L 4 nfthe variable-length array  radio_groups 4, and  num_rg 4 tells how many elements are in the DL seradio_groups 4 array. omdM 3erSymbolic Names Masks P$N 4arVXkb provides several functions that work with symbolic names. Each of these functions N 4Xuses a mask to specify individual fields of the structures described above. These masks meBLN 4]and their relationships to the fields in a keyboard description are shown in Table 18.1. ed aXX Zro iHH b ianHH~ i**ZpresseXin*l 3 k+Getting Symbolic Names From the Server d 4osCTo obtain symbolic names from the server, use  XkbGetNames 4. 0UTUTl =Ea8Status ; tXkbGetNames =( dpy, which, Xkb =) . =URUTd =ld8Display * dpy =;/* connection to the X server */ diJUPUTd = Punsigned int which =;/* mask of names or map components to be updated */  WUNUTd =@XkbDescPtr xkb =/* keyboard description to be updated */ idj$$ nsVXkbGetNames 4 retrieves symbolic names for the components of the keyboard extension w$ 4id^from the X server. The  }which 4 parameter specifies the name components to be updated in $ 4iecthe  }xkb 4 parameter, and is the bitwise inclusive OR of the valid names mask bits defined in D$ 4 Table 18.1. i$' 4vIf the  names 4 field of the keyboard description  }xkb 4 is  {NULL 4,  XkbGetNames 4 allocates and ' 4Sy`initializes the  names 4 component of the keyboard description before obtaining the values , ' 4sspecified by  }which 4. If the  names 4 field of  }xkb 4 is not  {NULL 4,  XkbGetNames 4 obtains the values D' 4thVspecified by  which 4 and copies them into the keyboard description  }Xkb 4. $ 4 uvIf the  map 4 component of the  }xkb 4 parameter is  {NULL 4,  XkbGetNames 4 does not retrieve type  4re]or shift level names, even if  {XkbKeyTypeNamesMask 4 or  {XkbKTLevelNamesMask 4 are tD 4 }set in  }which 4. $ mptXkbGetNames 4 can return  {Success 4, or  {BadAlloc 4,  {BadLength 4,  {BadMatch 4, and  {BadImnaD {neplementation 4 errors. 3d 4DTo free symbolic names, use  XkbFreeNames 4 (see section 18.6) onLl 3{.Changing Symbolic Names on the Server `$ 4inVTo change the symbolic names in the server, first modify a local copy of the keyboard m 4fdescription and then use either  XkbSetNames ,, 4 or, to save network traffic, use a  {XkbNaz {btYmeChangesRec 4structure and call  XkbChangeNames 4 to download the changes to the e 4 gserver.  XkbSetNames 4 and  XkbChangeNames 4 can generate  {BadAlloc 4,  {BadAtom 4, 4,D {4GBadLength 4,  {BadMatch, 4 and  {BadImplementation 4 errors. if ULUTl =sMMBool < tXkbSetNames =( dpy, which, first_type, num_types, xkb =) iUJUTd =9Display * dpy =;/* connection to the X server */ {UHUTd =BQunsigned int which =;/* mask of names or map components to be changed */ UFUTd =Ounsigned int first_type =;/* first type whose name is to be changed */ onUDUTd ={Yunsigned int num_types =;/* number of types for which names are to be changed */ cUBUTd =erUXkbDescPtr xkb =;/* keyboard description from which names are to be taken */ u$ 4etjUse  XkbSetNames 4 to change many names at the same time. For each bit set in  }which 4,  Xkb  anZSetNames 4 takes the corresponding value (or values in the case of arrays) from the keyD 4eN:board description  }xkb 4 and sends it to the server. ,$ 44gThe  }first_type 4 and  }num_types 4 arguments are used only if  {XkbKeyTypeNamesMask 4 or <9 {(`XkbKTLevelNamesMask 4 is set in  }which 4 and specify a subset of the types for which the onF 4er\corresponding names are to be changed. If either or both of these mask bits are set but the toS 4UFfspecified types are illegal,  XkbSetNames 4 returns  {False 4 and does not update any of the ` 4unhnames specified in  }which 4. The specified types are illegal if  }xkb 4 does not include a map erm 4kbgcomponent or if  }first_type 4 and  }num_types 4 specify types that are not defined in the keyamezD 4nyboard description. me.d aYY [ tHH b t cHHe :board sY}UTUTl e $-The XkbNameChangesRec Structure fi$ 4 }YThe  {XkbNameChangesRec 4 allows applications to identify small modifications to the &D 4meQsymbolic names and effectively reduces the amount of traffic sent to the server: n;URUT$ =er!typedef struct _XkbNameChanges { nHUPUT =boHunsigned intchanged;/*  4name components that have changed = */ peUUNUT =XAunsigned charfirst_type;/* first key type with a new name */ bULUT =un@unsigned charnum_types;/* number of types with new names */ l oUJUT =s Eunsigned charfirst_lvl;/* first key type with new level names */ e|UHUT =ypIunsigned charnum_lvls;/* number of key types with new level names */ yUFUT =n.Wunsigned charnum_aliases;/* if key aliases changed, total number of key aliases */ HUDUT = bTunsigned charnum_rg;/* if radio groups changed, total number of radio groups */ UBUT =UTCunsigned charfirst_key;/* first key with a new name 1 */ = 4 }U@UT =haFunsigned charnum_keys;/* number of keys with new names 1 */ = U>UT =me]unsigned shortchanged_vmods;/* mask of virtual modifiers for which names have changed */ U<UT =stZunsigned longchanged_indicators;/* mask of indicators for which names were changed */ U:UT = Sunsigned char changed_groups;/* mask of groups for which names were changed */ w nU8UTL =4}  XkbNameChangesRec =, *XkbNameChangesPtr s $ 4l ]The  changed 4 field specifies the name components that have changed and is the bitwise H 4u[inclusive OR of the valid names mask bits defined in Table 18.1. The rest of the fields in Wu 4liUthe structure specify the ranges that have changed for the various kinds of symbolic bBL 4um#names, as shown in Table 18.2.2 al $ ouTXkbChangeNames 4 provides a more flexible method for changing symbolic names than 1"D UTQXkbSetNames 4 and requires the use of an  qXkbNameChangesRec 4 structure. 7U UTl =me;Bool = tXkbChangeNames =( dpy, xkb, changes =) s fDUUTd =:Display * dpy =;/* connection to the X server */ QUUTd =ofVXkbDescPtr xkb =;/* keyboard description from which names are to be taken */ ^UUTd = o\XkbNameChangesPtr changes =;/* names map components to be updated on the server */ =q$ Pt`XkbChangeNames 4 copies any names specified by  }changes 4 from the keyboard description, d ~ } Hrxkb 4, to the X server specified by  }dpy 4.  XkbChangeNames 4 aborts and returns  {False 4 if any D 4liOillegal type names or type shift level names are specified by  }changes 4. bold anabZZ \HH b eblHHhsy++Zet+l 3 u4Tracking Name Changes $ 4U XWhenever a symbolic name changes in the servers keyboard description, the server sends )  4 aa  {XkbNamesNotify 4 event to all interested clients. To receive name notify events, use k6 n RXkbSelectEvents 4 (see section 4.3) with  {XkbNamesNotifyMask 4 in both the CD }s ;bits_to_change 4 and  }values_for_bits 4 parameters. $X$ 4esiTo receive events for only specific names, use  XkbSelectEventDetails 4. Set the  event_type 4 ke 4rviparameter to  {XkbNamesNotify 4, and set both the  bits_to_change  4and  values_for_bits 4 rD 4 nLdetail parameter to a mask composed of a bitwise OR of masks in Table 18.1. d 4JThe structure for the  {XkbNamesNotify 4 event is defined as follows: UTUT$ =bltypedef struct { URUT =1inttype;/* Xkb extension base event code */ UPUT =ki@unsigned longserial;/* X server serial number for event */ cUNUT =erBBoolsend_event;/*  {True = => synthetically generated */ ULUT =tiLDisplay *display;/*  1server connection where event generated = */ UJUT =Xk5Timetime;/* server time when event generated */ tUHUT =h .intxkb_type;/*  pXkbNamesNotify = */ UFUT =tsNintdevice;/* Xkb device  1ID =, will not be  pXkbUseCoreKbd = */ UDUT =leQunsigned intchanged;/* mask of  4name components that have changed = */ UBUT = 48intfirst_type;/* first key type with a new name */ foU@UT =7intnum_types;/* number of types with new names */ twi*U>UT =Ta<intfirst_lvl;/* first key type with new level names */ bN7U<UT =nt@intnum_lvls;/* number of key types with new level names */ URDU:UT =iNintnum_aliases;/* if key aliases changed, total number of key aliases */ QU8UT =X Uintnum_radio_groups;/* if radio groups changed, total number of radio groups */ u^U6UT =\unsigned intchanged_vmods;/* mask of virtual modifiers for which names have changed */ ntkU4UT =Runsigned intchanged_groups;/* mask of groups for which names were changed */ xU2UT =xZunsigned intchanged_indicators;/* mask of indicators for which names were changed */ U0UT =t 2intfirst_key;/* first key with a new name */ U.UT =d;5intnum_keys;/* number of keys with new names */ U,UTL =#}  XkbNamesNotifyEvent =; ty$ 4 *]The  changed 4 field specifies the name components that have changed and is the bitwise  4stZinclusive OR of the valid names mask bits defined in Table 18.1. The other fields in this  4pe^event are interpreted as the like-named fields in an  {XkbNameChangesRec 4, as previously D 4ey defined. $ 4X XWhen your application receives a X {kbNamesNotify 4 event, you can note the changed U6D 4?names in a changes structure using  XkbNoteNameChanges 4. ch U*UTl = *Nvoid > tXkbNoteNameChanges =( old =,  new =,  wanted =) U(UTd =haVXkbNameChangesPtr old =;/*  pXkbNameChanges = structure to be updated */ *U&UTd =reUXkbNamesNotifyEvent * new =;/* event from which changes are to be copied */ .7U$UTd =iVunsigned int wanted =;/* types of names for which changes are to be noted */ J$ 4;_The  }wanted 4 parameter is the bitwise inclusive OR of the valid names mask bits shown in ed W 4 eTable 18.1.  XkbNoteNameChanges 4 copies any changes that are reported in  }new 4 and speci dD 4Ified in  }wanted 4 into the changes record specified by  }old 4. hHH  b  eyHH,,ication [{,= 4oubcomponent categories). Upon return from  XkbListComponents 4,  }max_inout 4 contains the D= 4UTUnumber of names that matched the request but were not returned because of the limit. *$> 4XThe component name patterns used to describe the request are passed to  XkbListCompo/ 7> re`nents 4 using an  {XkbComponentNamesRec 4 structure. This structure has no special allocaD> 4 i_tion constraints or interrelationships with other structures; allocate and free this structure _ThQD> 4arJusing standard  malloc 4 and  free 4 calls or their equivalent: eUTUT$@ = $typedef struct _XkbComponentNames { 4rURUT@ =s &char *keymap;/* keymap names */ UPUT@ =)char *keycodes;/* keycode names */ eUNUT@ = b#char *types;/* type names */ ULUT@ = 1char *compat;/* compatibility map names */ ,UJUT@ ='char *symbols;/* symbol names */ nt UHUT@ =re*char *geometry;/* geometry names */ UFUTL@ =s ;}  XkbComponentNamesRec =, *XkbComponentNamesPtr; quedF tuKXkbListComponents 4 returns a pointer to an  {XkbComponentListRec 4: usUDUT$L = r#typedef struct _XkbComponentList { / UBUTL =re7intnum_keymaps;/* number of entries in keymap */ re.U@UTL =s :intnum_keycodes;/* number of entries in keycodes */ U>UTL =ps4intnum_types;/* number of entries in types */ reU<UTL =>6intnum_compat;/* number of entries in compat */ )U:UTL =le8intnum_symbols;/* number of entries in symbols */ s 6U8UTL =@8intnum_geometry;/* number of entries in geometry; @CU6UTL =yc3XkbComponentNamePtrkeymap;/* keymap names */ ar PU4UTL =e 6XkbComponentNamePtrkeycodes;/* keycode names */ ]U2UTL =na0XkbComponentNamePtrtypes;/* type names */ /*jU0UTL =t >XkbComponentNamePtrcompat;/* compatibility map names */ wU.UTL =s 4XkbComponentNamePtrsymbols;/* symbol names */ esU,UTL =7XkbComponentNamePtrgeometry;/* geometry names */ {U*UTLL =c9}  XkbComponentListRec =, *XkbComponentListPtr; iU(UT$O =#typedef struct _XkbComponentName { berU&UTO =ma?unsigned shortflags;/* hints regarding component name */ entU$UTO =/ )char *name;/* name of component */ U"UTLO =in9}  XkbComponentNameRec =, *XkbComponentNamePtr; m$P 4co^Note that the structure used to specify patterns on input is an  {XkbComponentNamesRec 4, P 4Xand that used to hold the individual component names upon return is an  {XkbComponentePDP {ey'NameRec 4 (no trailing s in Name). bCo$Q 4ey[When you are done using the structure returned by  XkbListComponents 4, free it using s *DQ LXkbFreeComponentList 4. 0U UTlR =ti,void C tXkbFreeComponentList =(list) Co=UUTdS =ymRXkbComponentListPtr list;/* pointer to  pXkbComponentListRec = to free */ VlT 3*/!Component Hints } j$ 4ntWA set of flags is associated with each component; these flags provide additional hints e {w 4OYabout the components use. These hints are designated by bit masks in the flags field of  4/Xthe  {XkbComponentNameRec 4 structures contained in the  {XkbComponentListRec 4 ned  a e \\ cpaerHH  b  , HHGanindividu2m\am 4kb_returned from  {XkbListComponents 4. The least significant byte of the flags field has the [Wh 4inYsame meaning for all types of keyboard components; the interpretation of the most signifL" 4Li\icant byte is dependent on the type of component. The flags bits are defined in Table 20.2. ym/ 4PtUThe symbols hints in Table 20.2 apply only to partial symbols components (those with < {WXkbLC_Partial 4 also set); full symbols components are assumed to specify all of the rovID 4tspieces. ^$ 4t VThe alphanumeric, modifier, keypad or function keys symbols hints should describe the k 4thXprimary intent of the component designer and should not be simply an exhaustive list of x 4 Ythe kinds of keys that are affected. For example, national keyboard layouts affect prima 4Srily alphanumeric keys, but many affect a few modifier keys as well; such mappings  4m Xshould set only the  {XkbLC_AlphanumericKeys 4 hint. In general, symbols components  4 mYshould set only one of the four flags ( {XkbLC_AlternateGroup 4 may be combined with BL 4any of the other flags).b fl 3ag>Building a Keyboard Description Using the Server Database $ 4leXA client may request that the server fetch one or more components from its database and rt 4 fRuse those components to build a new server keyboard description. The new keyboard  4]description may be built from scratch, or it may be built starting with the current keyboard  4th_description for a particular device. Once the keyboard description is built, all or part of it  4ki\may be returned to the client. The parts returned to the client need not include all of the  4ha[parts used to build the description. At the time it requests the server to build a new key4m ) 4th[board description, a client may also request that the server use the new description interYsh6 4of[nally to replace the current keyboard description for a specific device, in which case the ofCD 4,behavior of the device changes accordingly. Ded  a d rueHH  b  es HHrt00e those bu0$ 4deVTo build a new keyboard description from a set of named components, and to optionally  4t Zhave the server use the resulting description to replace an active one, use  XkbGetKey"D rdboardByName 4. l6UTUTl =itEXkbDescPtr D tXkbGetKeyboardByName =( dpy =,  device_spec =,  names =,  want =,  need =,  load =) [paCURUTd =th7Display * dpy =;/* connection to X server */ d aPUPUTd =Wunsigned int device_spec =;/* device  1ID =, or  wXkbUseCoreKbd = */ scr]UNUTd =JXkbComponentNamesPtr names =;/* names of components to fetch */ jULUTd =whJunsigned int want =;/* desired structures in returned record */ wUJUTd =Lunsigned int need =;/* mandatory structures in returned record */ UHUTd =JBool load =;/*  {True = => load into  device_spec = */ $ }0]names 4 contains a set of expressions describing the keyboard components the server should o 4muse to build the new keyboard description.  }want 4 and  }need 4 are bit fields describing the parts D 4dBbof the resulting keyboard description that should be present in the returned  {XkbDescRec 4. , 4hThe individual fields in  }names 4 are  fcomponent expressions 4 composed of keyboard compo c 4ve[nent names (no wildcarding as may be used in  XkbListComponents 4), the special compo w 4*/cnent name symbol %, and the special operator characters  {+ 4 and  {| 4. A component jULD 4un0expression is parsed left to right, as follows: inUFUT$F =/ XThe special component name  {computed = may be used in  {keycodes = component coUDUTF =Texpressions and refers to a component consisting of a set of keycodes computed autoUBUTDF =na#matically by the server as needed. de&U@UT$ =arVThe special component name  {canonical = may be used in  {types = component 2U>UT = 4Texpressions and refers to a partial component defining the four standard key types: es>U<UTD {scJALPHABETIC =,  {ONE_LEVEL =,  {TWO_LEVEL =, and  {KEYPAD =. JU:UT$~ =in^The special component name  {% = refers to the keyboard description for the device specVU8UT~ =Xified in  }device_spec = or the keymap names component. If a keymap names component cbU6UT~ =sis specified  1that  =does not begin with + or | and does not contain  {% =, then  {% = refers nU4UT~ =Tto the description generated by the keymap names component. Otherwise, it refers to t zU2UTD~ = 2the keyboard description for  }device_spec =. U0UT$ =exfThe  {+ = operator specifies that the following component should  foverride = the currently U.UT = sYassembled description;  1any definitions that are present in both components are taken yU,UTD 1pefrom the second =. TU*UT$ =esdThe  {| = operator specifies that the next specified component should  faugment = the curALU(UT =ONZrently assembled description;  1any definitions that are present in both components are U&UTD 1taken from the first =. U$UTd =viWIf the component expression begins with an operator, a leading  {% = is implied. IfU"UT$ =mpSIf any unknown or illegal characters appear anywhere in the expression, the entire aU UTD =n &expression is invalid and is ignored. $ 4]For example, if  }names->symbols 4 contained the expression +de, it specifies that the T 4keVdefault member of the de class of symbols should be applied to the current keyboard D 4thXmapping, overriding any existing definitions (it could also be written +de(default)). d '$ 4ny9Here is a slightly more involved example: the expression y4 4peUacme(ascii)+de(basic)|iso9995-3 constructs a German (de) mapping for the ASCII keyhA 4omXboard supplied by the acme vendor. The new definition begins with the symbols for the ; N 4s ]ASCII keyboard for Acme ( acme(ascii) 4), overrides them with definitions for the basic T[ 4heaGerman keyboard ( de(basic) 4), and then applies the definitions from the default iso9995-3 h 4wn`keyboard ( iso9995-3 4) to any undefined keys or groups of keys (part three of the iso9995 esu 4d Wstandard defines a common set of bindings for the secondary group, but allows national preD 4ec9layouts to override those definitions where necessary). i0  bWt ci0 f.4thmah x anAccessXFeedback Masks D  bD a f.morind 4e  rd  adba f aerHH b  HHedhe new dnsUTUT$" =; OThe interpretation of the above expression components (acme, ascii, de, basic, em URUTD" =orNiso9995-3) is not defined by Xkb; only the operations and their ordering are. '$ 4tieNote that the presence of a keymap  }names 4 component that does not contain  {% 4 (either s4 4 (Vexplicit or implied by virtue of an expression starting with an operator) indicates a A 4arXdescription that is independent of the keyboard description for the device specified in s N } [device_spec 4. The same is true of requests in which the keymap names component is empty [ 4Ac[and all five other names components contain expressions void of references to  {% 4. fh 4URequests of this form allow you to deal with keyboard definitions independent of any uD 4actual device. $ 4iThe server parses all non- {NULL 4 fields in  }names 4 and uses them to build a keyboard descripp 4ovhtion. However, before parsing the expressions in  }names 4, the server ORs the bits in  }want 4 ;  4s gand  }need 4 together and examines the result in relationship to the expressions in  }names 4. tha 4 eTable 20.3 identifies the components that are required for each of the possible bits in  }want 4 a 4jor  }need 4. If a required component has not been specified in the  }names 4 structure (the corre 4ksponding field is  {NULL 4), the server substitutes the expression  {% 4, resulting in the compo 4altnent values being taken from  }device_spec 4. In addition, if  }load 4 is  {True 4, the server modifies o }yocnames 4 if necessary (again using a  {% 4 entry) to ensure all of the following fields are BL 4se`non- {NULL 4:  types 4,  keycodes 4,  symbols 4, and  compat 4. ( p$ }ov[need 4 specifies a set of keyboard components that the server must be able to resolve in  } 4forder for  XkbGetKeyboardByName 4 to succeed; if any of the components specified in  }need 4 D 4Ecannot be successfully resolved,  XkbGetKeyboardByName 4 fails. d$ }os_want 4 specifies a set of keyboard components that the server should attempt to resolve, but t b  4he_that are not mandatory. If the server is unable to resolve any of these components,  XkbGetrve exoKeyboardByName 4 still succeeds. Bits specified in  }want 4 that are also specified in  }need 4 have c #D 4f *no effect in the context of  }want 4. 8$ 4rIf  }load 4 is  {True 4, the server updates its keyboard description for  }device_spec 4 to match the E 4nofresult of the keyboard description just built. If load is  {False 4, the servers description for R 4 sdevice  }device_spec 4 is not updated. In all cases, the parts specified by  }want 4 and  }need 4 from or _D 4By2the just-built keyboard description are returned. t$ 4 bThe  names 4 structure in an  {XkbDescRec 4 keyboard description record (see Chapter 18)  4 Ycontains one field for each of the five component types used to build a keyboard descripbS byIfS tof.anyf d 4  k~A be4~A spj/n wh ls8AccessXNotify Events A bt cA . j/d 4 4 sZ b &a dZ icb tmah cAccessXNotify Event Details es  b4 t n bd 4 } vd  at p aHH  b  ythHHhdet--Th 4inXtion. When a keyboard description is built from a set of database components, the correco 4orcsponding fields in this  names 4 structure are set to match the expressions used to build the "D 4 component. to7$ 4VThe entire process of building a new keyboard description from the server database of D"L 4wMcomponents and returning all or part of it is diagrammed in Figure 20.1:A ;lG mBuilding a  mN ew  mK eyboard  mD escription from the  mS erver  mD atabase W$ 4icd 4The information returned to the client in the  {XkbDescRec 4 is essentially the result of a d 4Zseries of calls to extract information from a fictitious device whose description matches -B  b a-B  Xd 4 /6Fe  b -/6Fe Y4inti ` 7d Value /6)Fe  b n, /6)Fe  Zcspdi UTUT` = (1L<<0)  /67Fe  b ud /67Fe  [4co UTUT` =(1L<<1) /6EFe  b od /6EFe er \asef UTUT` =w(1L<<2) ts/6SFe  b m i/6SFe  ]lG UTUT` = m(1L<<3) m/6aFe  b S/6aFe ba ^W UTUT` =Th(1L<<4) io/6oFe  b R /6oFe re _  UTUT` =se(1L<<5) ll/6}Fe  b dic/6}Fe tc ` UTUT` =(1L<<6) /6Fe  b /6Fe 6 a UTUT` =(1L<<7) 6/6Fe  b /6Fe  b UTUT` =n(1L<<8) /6Fe  b /6Fe  c UTUT` =u(1L<<9) /6Fe  b /6Fe  d UTUT` =o (1L<<10) /6Fe  b /6Fe  e UTUT` =m (1L<<11) /6iFe  b /6iFe  f UTUT` =(0xFFF) ' b '   d R 76 ! b # $ TUT76ll Fe `  H6 " b % & H6 (1 /6 UTUT` = b(1L<<7) V6# # b ' ( V6# (1 /6 UTUT` = b(1L<<6) z6 $ b ) * z6 (1 /6 UTUT` = b(1L<<5) .e % b .e (1b/6d 4 b l! & b 'dl bG<<1 ` 7XkbAccessXNotify Event Details 2e! ' b & ( 2ebG ` 7Value @eɚV! ( b ' )T@eɚVbG  ` 7Circumstances l ! ) b ( * l bH! b $UTUT` 1XkbAXN_SKPressMask 2e ! * b ) +2e bHUTUT` 1(1(1<<0) /6@eɚV ! + b * ,@eɚV bHUTUT` 1(1#Slow key press notification wanted (1l! ! , b +l! bIUTUT` 1XkbAXN_SKAcceptMask el<! ! - b 1 el<! b +hO Symbolic Names Masks ' <! ! . b bG <!  +AccsXdP 4ls @@<! ! / b @@<!  + dQ 4 a<! ! 0 b T<!  +GdR 4  lL! 1 b - 2 b *lL , `S UT Mask Bit  L4! 2 b 1 3  L4 ,e`T HValue @@LG?! 3 b 2 4 V@@LG? ,@e  U b Keyboard @U (1 Component L@! 4 b 3 5 L@ ,!`V IField lk ! 5 b 4 6 lk  b - UTUT`W =XkbKeycodesNameMask  k4 ! 6 b 5 7 s k4  - UTUT`X =(1<<0) @@kG? ! 7 b 6 8 @@@kG?  b - UTUT`Y = Xkb->names +k@ ! 8 b 7 9 !k@  - UTUT`Z = keycodes ly ! 9 b 8 : ! ly  * . UTUT`[ =XkbGeometryNameMask UT y4 ! : b 9 ; 3 y4  . UTUT`\ =(1<<1) H@@yG? ! ; b : < @@yG?  ., UTUT`] = Xkb->names boay@ ! < b ; = @y@  . UTUT`^ = geometry l ! = b < > l  /l UTUT`_ =XkbSymbolsNameMask  4 ! > b = ?  4  /  UTUT`` =(1<<2) @@G? ! ? b > @ @@G?  /@@ UTUT`a = Xkb->names UT@ ! @ b ? A @  / UTUT`b =symbols l ! A b @ B l  0l UTUT`c =XkbPhysSymbolsNameMask `[ 4 ! B b A C  4 3 0y UTUT`d =.(1<<3) UT@@G? ! C b B D @@G?  0y? UTUT`e =. Xkb->names UT@ ! D b C E @  0y@ UTUT`f =. phys_symbols Tl ! E b D F !l  1 UTUT`g =XkbTypesNameMask _ 4 ! F b E G  4  1 UTUT`h =/(1<<4) UT@@G? !! G b F H @@G?  1? UTUT`i =/ Xkb->names UT@ !" H b G I @  1@ UTUT`j =/type l !# I b H J l  2l UTUT`k =XkbCompatNameMask  4 !$ J b I K  4  C 2 UTUT`l =(1<<5) 0@@G? !% K b J L @@G?  D 2 UTUT`m = Xkb->names y@ !& L b K M @  E 2 UTUT`n =compat 0l !' M b L N Tl  b 3 UTUT`o =XkbKeyTypeNamesMask  4 !( N b M O  4  G 3 UTUT`p =(1<<6) 1@@G? !) O b N P @@G?  H 3 UTUT`q = Xkb->map 1@ !* P b O Q T@  b 3 UTUT`r = type[*].name 1l !+ Q b P R l  4 UTUT`s =XkbKTLevelNamesMask UT 4 !, R b Q S  4  4  UTUT`t =(1<<7) @@G? !- S b R T @@G?  4@@ UTUT`u = Xkb->map @ !. T b S U @@  4 UTUT`v = Etype[*].lvl_names[*] Tl !/ U b T V !'l  5 UTUT`w =XkbIndicatorNamesMask  4 !0 V b U W !( 4  54 UTUT`x =(1<<8) UT@@G? !1 W b V X !)@@G?  5G? UTUT`y = Xkb->names @ !2 X b WW * b@  5  UTUT`z =indicators[*] ?_@e!3 Y b+ b Z %`N kQ!4 Z i Y \ s`N kQMas`NQ!5 [ j Y `NQ UT7)UUd T!-XkbClientMapRec `NUQ!6 \ k ] Y Z ] UT`NUQ Xk>m`NUh`NU`NgQ!7 ] k \ ^ Y \ ^ @`NgQ4`Ngh`Ng`NyQ!8 ^ k ] _ Y ] _ `NyQ`Nyh`Ny`NQ!9 _ k ^ ` Y ^ ` w`NQrNasM`Nh`N(X+P ]!: ` m _ a Y _ a (X+P ](`(` Tnum_syms(jx ]!; a m ` b Y ` b X(jx ](r(r Tsyms5(|:LG ]!< b m a c Y a c (|:LG ](( T key_sym_map(" ]!= c m b d Y b d z(" ](( Tmodmap *.+Q!> d k c e Y c e  *.+QQ *.+h *.+`@+Q!? e k d f Y d f `@+Q`@+h`@+`+Q!@ f k e g Y e g UT`+Q7)`+h`+(D.+ݫ ]!A g m f h Y f h (D.+ݫ ]((+((+  num_typesk(1D.1 ]!B h m g i Y g w 7 k(1D.1 ](:+(:+ typesŠS"Q~!C i m h j Y j k _ŠS"Q~`Nh'Q~!D j m i k Y i k h'Q~^ `N+kQ !E k m j Y j m NN+kQ +PNkQ!F l j Y PNkQ ] `UUd T]XkbKeyTypeRec(s) UUd TLG(array) !<NdkQ!G m k n Y k n NdkQ_symaNdk NdkNvkQ!H n k m o Y m o NvkQNvk NvkNkQ!I o k n p Y n p *+NkQ *+Nk NkNkQ!J p k o q Y o q +NkQ`+Nk Nk͠Nd5 ]!K q m p r Y p r +͠Nd5 ]͠Nmk͠Nmk Tmap+ݫ͠Nv! ]!L r m q s Y q s .ݫ͠Nv! ]͠Nk͠Nk Tpreserve1͠N ]!M s m r t Y r t .1͠N ]͠Nk͠Nk Tname͠N1i ]!N t m s u Y s y ͠N1i ]͠Nk͠Nk T level_namesi6kJ!O u p t v Y!Ei6kJNi6k`o6k%5el F!P v i u w Y %5el F%5e%5e 4...(TCӕ)a ]!Q w i v x Y h x (TCӕ)a ](TLJ(TLJ  size_syms(q x) ]!R x i w y Y w k n(q x) ](q-(q-  size_typesεT~,jd ]!S y i x z Y t m εT~,jd ]ε\3ε\3 T map_countM lkQ!T z m y { Y { *+M lkQ *I W,Q!U { m z | Y z | J kI W,Q+DMQ!V | m { Y { ~ NDMQq m?b+V@!W } j Y N?b+V@ Y q s UUd T KeySym(s) UUd T(array) t@gkQ!X ~ m  Y | Nk@gkQ@gk]@ !Y  m ~ Y N@gk]@ z ~?bk^@ =!Z m  Y!O?bk^@ = h\p<5@ ![ n Y5eh\p<5@ !P ih\p< fp< f\=\h\@A)@ #!\ n Ya]h\@A)@ #Y h h\@A| a@A| a 4fd%2% ]!] o Y !R%2% ]%% TKeyCode-X X`?!^ q Y!SX X`? m X X` g` B,Q!_ m Y  B,QY -=Q!` m Y  -=QY z#l7Q!a m  Y #l7QY {82V@!b j Y 82V@UUd Tunsigned char UUd TKe(array) =,(Q!c m Y =,(Q =,]@ !d m Y  =,]@ 8,^@ =!e m Y8,^@ = f`[`/@ 2!f q Y #  f`[`/@ 2f`[`f`[ƀgƀh\F&@ =@O!g n YA@ h\F&@ =@O h\Ft_Ft_@e@`GQ!h m Y 2`GQ `\lQ!i m Y `\lQX X`B+Q@ !j m  Y S X`B+Q@  `BQ!k j Y m `BQ, UUd TXkbSymMapRec(s) UUd T (array) `BQQ!l k Y b j`BQQ8`BQ`BQ`BcQ!m k Y `BcQUU`Bc`Bc`BuQ!n k Y =,(`BuQ m `Bu`Bu`BQG,jd ]!o m Y d m`BQG,jd ]`BZ`BZ T group_info`BcG ]!p m Y 8,`BcG ]`Bl`Bl T q`BuG ]!q m Y `[`BuG ]`B~`B~ Toffset@CDA.f ]!r m Y @CDA.f ]@L+@L+ T kt_index[3]>eHz ]!s m Y  >eHz ]>nk>nk Twidth`BCDAQ2g!t a Y !j`BCDAQ2g `BQ!u k Y !k`BQ m `B`B`B-Q!v k Y `B-Q`B-`B-`B?Q!w k Y y`B?Q!l`B?`B?`BG.f ]!x m Y B`BG.f ]`B'`B' T kt_index[1]`B`B-G ]!y m Y `B-G ]`B6`B6 T`B@ DA.f ]!z m Y Gjd@ DA.f ]@+@+ T kt_index[0] ]>/H.f ]!{ m Y ]>/H.f ]>8k>8k T kt_index[2]`Bua`!| bGq m H#BE!} b f]#BE'Zc#c cAA04\^ E!~ >04\^ E5*w04\*w $v^E! ih$v^E'Z*w$v*w a/B PE! b /B PE5c/c c n$$! i  n$$ w-6! i B w-6/V/M E! /V/M E5;/V; @#/MSE! ]`B#/MSE'Z;#; qG#B.:! BG#B.:  w-6!   w-6 i>k(j K! i ]>i>k(j K/HwiHw  Group  /H 0|c K7! i B<+5k7 K<+?w<+?w Shift Level  H 0|c9XC:^! i  0|c9XC:^ ktڶ*9t ! i ^ktڶ*9t ktlVktlV  G1L1 =  aEktq.+ž ! i !ktq.+ž kt&kt&  G1L2 =  Avkt(- ! i kt(- kt2Ekt2E  G2L1 =  kt4L/4 ! i kt4L/4 kt?/kt?/  G2L2 =  ktڶ/42v! i Mktڶ/42v ;:! m V;:SA-p ! m MSA-p D:)A-) a;:! m ;: ;:.! m ;:.(j?X0p P ! m j?X0p P D:;?X; H;:.! m B;:. M:! m |cM: iRCp ! m ڶRCp V:)RC) AM:! m =M: M:.! m M:.P0p ! m i P0p V:;P; EM:.! m M:. >ge ( ! m G2>ge ( D:>g L1Pge ( ! m Pge ( V:Pg L2.sM U* ! m m.sM U* .sM(Y.sM(Y G1.sM1 U* ! m m.sM1 U* .sM:Y.sM:Y G2;:$! m ;:$ .sMe0Ǯ/! m j.sMe0Ǯ/ & ! m  m& F!} ! m mF!} &,GF,G ai& ! m ڶ&  & ! m  m& !} P ! m m!} P &,G,G & ! m i &  & ! m  m& !} ! m m!} &,G,G A& ! m  m&  & ! m M &  m`!} ! m sM`!} &,G`,G m& ! m sM&  P ( ! m P ( &#P# L1P ( ! m & P ( &#P# L241XI U* ! m m41XI U* &:V4:V G141XI U* ! m m41XI U* &:V4:V G2P ( ! m mP ( &#P# L1P ( ! m &P ( &#P# L2& $! m  & $ & $! m & $ &H)@! m &&H)@ Iz; ! m '$Iz;> F$S'$S  Xkb SymbolsP*VIz;Ai ! m P*VIz;Ai &S*VS  Core Symbols&HB! m (&HB '$e>E! m  '$e>E ktڶ/4GJU! m i!ktڶ/4GJU |c r ? 6 ou9%B@@def9%B;%B;:G9:G90@D" " ? n > @ 6eer90@D" s.90@D4B0@Dt7XM@@" @ r ? A 6rIgt7XM@@ t7XM9XM9lRt7lR47b@Ob" A r @ B 647b@Ob47b@ORb@OP0@D 2@ " B r A C 6P0@D 2@ h/P0@DR0@DRbQQIK" C n B D 6cIQIK"QIKWIK91E_@$ " D r C E 691E_@$ 9UNQUNQ1ETO1EP.`Dx" E n D F 6s P.`DxT"anP.`DZtn.`DCh8F `" F n E G 6Ch8F `ChJKCh8FZn8FATgCI "! G n F 6uCoATgCI  ATgSMHtiSMHtiCIZnCIat "" H b Jjtilat Bk"hM  +ISO Action  mA ffect Field Values ;t "# I bj@t  k9dN 4M l"$ J b H KjM@l9klRt7 `O Affect A r"% K b J Lj47k" r `P Meaning l#"& L b K MjKl# kcIQ UTUThQ p"XkbSA_ISODNoAffectMods $ #"' M b Lj ##NkTOE UTUT Z =DIf  pXkbSA_ISONoAffectMods = is not set, any  pSA_SetMods = hURUTZ =" >or  pSA_LatchMods = actions occurring simultaneously with UPUT@Z =Ethe  pXkbISOAction = are treated as  pSA_LockMods = instead. ili."( N b Ol" bli. m  UTUTh p"XkbSA_ISONoAffectGroup Aci.") O b N Pli..m UTUT ; = 2If  pXkbSA_ISONoAffectGroup = is not set, any URUT; p K;SA_SetGroup = or  pSA_LatchGroup = actions occurring UPUT; =ct usXkbDescRec Field Containing =!@> ? Changed Data el"3 Y b X ZOl P UTUT`? pXkbKeyTypesMask l"4 Z b Y [OClslP V UTUT @ = first_type, URUT@@ = num_types z"5 [ b Z \OzP s UTUT A =;map->type[first_type] .. URUT@A =&map->type[first_type + num_types - 1] l#"6 \ b [ ]Ol# P"0 UTUT`B peXkbKeySymsMask -l#"7 ] b \ ^OMal#PV X UTUT C =first_key_sym, PURUT@C = num_key_syms az#"8 ^ b ] _ONz##dsP UTUT D = Y#map->key_sym_map[first_key_sym] .. ?URUTD =!map->key_sym_map[first_key_sym + CUPUT@D =num_key_syms - 1] lC#"9 _ b ^ `OlC# PP UTUT`E pXkbModifierMapMask MasCl#": ` b _ aOCCl#P V UTUT F =@first_modmap_key, URUT@F =num_modmap_keys zC#"; a b ` bOzC##P UTUT UTUT G =>t!map->modmap[first_modmap_key] .. AURUTG =rsmap->modmap[first_modmap_key + UPUT@G = ]num_modmap_keys-1] lg#"< b b a cOBlg# Pl UTUT`H pXkbExplicitComponentsMask gl#"= c b b dOfigl#UTP=nu UTUT I =first_key_explicit, _URUT@I =num_key_explicit szg#"> d b c eO_szg##..PUT UTUT J =_s(server->explicit[first_key_explicit] .. URUTJ =] &server->explicit[first_key_explicit + UPUT@J =num_key_explicit - 1] l#"? e b d fOkasl# ":PO UTUT`K pXkbKeyActionsMask l#"@ f b e gOk, l#nuPkey UTUT L =first_key_act, URUT@L = num_key_acts z#"A g b f hOafiz##URPGrs UTUT M =t_#server->key_acts[first_key_act] .. nuURUTM =!server->key_acts[first_key_act + UPUT@M =num_key_acts - 1] l#"B h b g iOioml# P"= b UTUT`N pfiXkbKeyBehaviorsMask UTl#"C i b h jO_y_l#Pnuke UTUT O =first_key_behavior, eURUT@O =num_key_behaviors z#"D j b i kOrexz##ciPURUT UTUT P =er)server->behaviors[first_key_behavior] .. URUTP =ex'server->behaviors[first_key_behavior + d fUPUT@P =num_key_behaviors - 1] l "E k b j lOMk l "@P O UTUT`Q pXkbVirtualModsMask keyl "F l b k mOURl keP z UTUT`R = bvmods z "G m b l nOGz t_P >keac UTUT`S =..server->vmods[*] l."H n b m oOPUTl. acP l UTUT`T p bXkbVirtualModMapMask l."I o b n pOTl.orP  UTUT U = bfirst_vmodmap_key, URUT@U =num_vmodmap_keys Tz."J p b oOUTz..beP z UTUT V = b#server->vmodmap[first_vmodmap_key] #URUTV =UT.. UTUPUTV =er"server->vmodmap[first_vmodmap_key *UNUT@V =ex+ num_vmodmap_keys - 1] keK 9"K q b #SebeK 99T "E UTUT x =MLThe  min_key_code 4 and  max_key_code 4 fields of the  xkb 4 dsURUTx 4Cparameter are used to allocate the  modmap 4 field of the clizUPUTx 4R7ent map. The field is allocated to contain the maximum G*UNUTx 47number of entries necessary for  -max_key_code 4 - ] 5ULUT@x min_key_code 4 + 1 keys. l#"L r b 1 sT# dM UTUT` p bXkbGroupAction = J@#"M s b r tTJ@# p_URUT UTUT` =vmgroup P1#"N t b s uP1#   UTUT` =V16.1.4 veri0 "O u b t vVi0 "seer UTUTh podrXkbSA_MovePtr  "P v b u w be UTUT` pXkbPtrAction = J@ "Q w b v xa J@ el  xk UTUT` =ptr P1 "R x b wdpP1 x UTUT` = f16.1.5 lloq׼ 2 y g z  xq׼ ntr%׼ 2 z g y  C  UL%׼ mig "U { b }Ug TVh XkbAllocServerMap Masks Xk "V | bUM b V#d 4UT Tl)"W } b { ~U"Nl)V1 `  Mask T) "X ~ b } U) V ` Effect UTl:"Y  b ~ Ul: V UTUT` =XkbExplicitComponentsMask : "Z b  U: aV@ UTUT  =VThe  min_key_code = and  max_key_code = fields of the  xkb = parameter URUT@ =Care used to allocate the  explicit  =field of the server map. 2lS."[ b Ur%lS.  gV UTUT` =XkbKeyActionsMask S ."\ b US ..V UTUT  =SeVThe  min_key_code = and  max_key_code = fields of the  xkb = parameter URUT =Gare used to allocate the  key_acts  =field of the server map. The )UPUT Kcount_acts = parameter is used to allocate the  acts = field of the *UNUT@ = server map. l"] b UTl  bV UTUT` =XkbKeyBehaviorsMask  "^ b UMk  "ZVU UTUT  =VThe  min_key_code = and  max_key_code = fields of the  xkb = parameter URUT@ = oEare used to allocate the  behaviors  =field of the server map. tl"_ b U.2l "[VU UTUT` =XkbVirtualModMapMask  "` b U   bV UTUT  =VThe  min_key_code = and  max_key_code = fields of the  xkb  =parameter URUT@ =thCare used to allocate the  vmodmap  =field of the server map. e d"a ab t_tsHH"b b asHHUN.. map. e.UTUT =TIunsigned shortnum_key_aliases;/* number of key aliases in the key */ aURUT =4XkbPropertyPtrproperties;/* properties array */ !UPUT =)XkbColorPtrcolors;/* colors array */ o.UNUT =_k)XkbShapePtrshapes;/* shapes array */ e;ULUT =/XkbSectionPtrsections;/* sections array */ fieHUJUT =ap,XkbDoodadPtrdoodads;/* doodads array */ .UUHUT =6XkbKeyAliasPtrkey_aliases;/* key aliases array */ bUFUTL =.}  XkbGeometryRec = *XkbGeometryPtr; u$ 4lThe  doodads 4 array is only for doodads not contained in any of the  sections 4 that has its own pa adoodads 4. The key aliases contained in the  key_aliases 4 array take precedence over any D =Cdefined in the keycodes component 4 of the keyboard description. UDUT$ =#typedef struct _XkbProperty { UBUT =#char *name;/* property name */ IuU@UT =ke%char *value;/* property value */ U>UTL =UT.}  XkbPropertyRec =,*XkbPropertyPtr; U<UT$ =typedef struct _XkbColor { PU:UT =or"unsigned intpixel;/* color */ U8UT = char *spec;/* color name */ U6UTL =tr(}  XkbColorRec =,*XkbColorPtr; UTU4UT$ =Do!typedef struct _XkbKeyAliasRec { *'U2UT =<charreal[XkbKeyNameLength];/* real name of the key */ UF4U0UT =} :charalias[XkbKeyNameLength];/* alias for the key */ AU.UTL =ad.}  XkbKeyAliasRec =,*XkbKeyAliasPtr; U$ 4ct4typedef struct _XkbPoint {/* x,y coordinates */ adc 4as shortx; q 4ia shorty; L 4ov)}  XkbPointRec 4, *XkbPointPtr; eU,UT$ =t"typedef struct _XkbOutline { U*UT =Cunsigned shortnum_points;/* number of points in the outline */ naU(UT =am;unsigned shortsz_points;/* size of the points array */ ue U&UT =Ounsigned shortcorner_radius;/* draw corners as circles with this radius */ stU$UT = PAXkbPointPtrpoints;/* array of points defining the outline */ U"UTL =sp-}  XkbOutlineRec =, *XkbOutlinePtr; U UT$ =c!typedef struct _XkbBounds { UUT =ctOshortx1,y1;/* upper left corner of the bounds, in  mm =/ 10 = */ l nUUT =UFQ shortx2,y2;/* lower right corner of the bounds, in  mm =/ 10 = */ .UUTL =} +}  XkbBoundsRec =, *XkbBoundsPtr; U$UUT$ =ty typedef struct _XkbShape { c1UUT = Atomname;/* shapes name */ >UUT =rtFunsigned shortnum_outlines;/* number of outlines for the shape */ KUUT =ty?unsigned shortsz_outlines;/* size of the outlines array */ horXUUT =nu@XkbOutlinePtroutlines;/* array of outlines for the shape */ d eUUT =/*RXkbOutlinePtrapprox;/* pointer into the array to the approximating outline */ rU UT =asMXkbOutlinePtrprimary;/* pointer into the array to the primary outline */ aU UT =inRXkbBoundsRecbounds;/* bounding box for the shape; encompasses all outlines */ UUTL =)}  XkbShapeRec =, *XkbShapePtr; d"c ae c  HH"d b orHHht..n  mmf .$ 4} tIf  approx 4 and/or  primary 4 is  {NULL 4, the default value is used. The default primary outline is D 4shRthe first element in the outlines array, as is the default approximating outline. )UTUT$ =pe/typedef struct _XkbKey {/* key in a row */ ine6URUT = o%XkbKeyNameRecname;/* key name */ uCUPUT =utIshortgap;/* gap in  mm =/ 10 = from previous key in row */ uPUNUT =/*8unsigned charshape_ndx;/* index of shape for key */ U ]ULUT =X=unsigned charcolor_ndx;/* index of color for key body */ jUJUTL =UT%}  XkbKeyRec =, *XkbKeyPtr; ~UHUT$ =he3typedef struct _XkbRow {/* row in a section */ =UFUT =peOshorttop;/* top coordinate of row origin, relative to sections origin */ UDUT = Pshortleft;/* left coordinate of row origin, relative to sections origin */ UBUT =mmBunsigned shortnum_keys;/* number of keys in the keys array */ U@UT = i7unsigned shortsz_keys;/* size of the keys array */ imaU>UT =Pintvertical;/*  {True ==>vertical row,  {False ==>horizontal row */ xiU<UT =0XkbKeyPtrkeys;/* array of keys in the row*/ eyU:UT =UR6XkbBoundsRecbounds;/* bounding box for the row */ U8UTL =ut%}  XkbRowRec =, *XkbRowPtr; d us7top 4 and  left 4 are in  mm =/ 10 4. pe_U6UT$ =ha&typedef struct _XkbOverlayRec { U4UT =r_!Atomname;/* overlay name */ (U2UT =EXkbSectionPtrsection_under;/* the section under this overlay */ e5U0UT =Cunsigned shortnum_rows;/* number of rows in the rows array */ coBU.UT =ig8unsigned shortsz_rows;/* size of the rows array */  OU,UT = l=XkbOverlayRowPtrrows;/* array of rows in the overlay */ \U*UT =mm;XkbBoundsPtrbounds;/* bounding box for the overlay */ rayiU(UTL =,}  XkbOverlayRec =,*XkbOverlayPtr; k}U&UT$ =U>%typedef struct _XkbOverlayRow { {U$UT =l Lunsigned shortrow_under;/* index into the row under this overlay row */ U"UT =n Bunsigned shortnum_keys;/* number of keys in the keys array */ U UT =/ 7unsigned shortsz_keys;/* size of the keys array */ ; UUT =us@XkbOverlayKeyPtrkeys;/* array of keys in the overlay row */ UTUUTL =de2}  XkbOverlayRowRec =,*XkbOverlayRowPtr; $ ohrow_under 4 is an index into the array of  rows 4 in the section under this overlay. The section e 4\under this overlay row is the one pointed to by  section_under 4 in this overlay rows uD {owXkbOverlayRec 4. owsUUT$ =UT typedef struct _XkbOverlayKey { ws UUT =ws6XkbKeyNameRecover;/* name of this overlay key */ UUT =inEXkbKeyNameRecunder;/* name of the key under this overlay key */ e'UUTL =tr2}  XkbOverlayKeyRec =,*XkbOverlayKeyPtr; ;UUT$ =UTtypedef struct _XkbSection { oHUUT = i!Atomname;/* section name */ *UUUT =L unsigned charpriority;/* drawing priority, 0=>highest, 255=>lowest */ UTbU UT =ig6shorttop;/* top coordinate of section origin */ oU UT =X3shortleft;/* left coordinate of row origin */ y r|UUT =Gunsigned shortwidth;/* section width, in  mm =/ 10 = */ $UUT = Iunsigned shortheight;/* section height, in  mm =/ 10 = */ yd"e a is ind HH"f b wHHow..UUTgty.UTUT =y Bshortangle;/* angle of section rotation, counterclockwise */ URUT =UTCunsigned shortnum_rows;/* number of rows in the rows array */ ver!UPUT =UTLunsigned shortnum_doodads;/* number of doodads in the doodads array */ .UNUT =ctOunsigned shortnum_overlays;/* number of overlays in the overlays array */ ;ULUT =ed8unsigned shortsz_rows;/* size of the rows array */ weHUJUT =>unsigned shortsz_doodads;/* size of the doodads array */ UUHUT =X@unsigned shortsz_overlays;/* size of the overlays array */ bUFUT =d ,XkbRowPtrrows;/* section rows array */ /oUDUT =U5XkbDoodadPtrdoodads;/* section doodads array */ h|UBUT ==KXkbBoundsRecbounds;/* bounding box for the section, before rotation*/ U@UT =8XkbOverlayPtroverlays;/* section overlays array */ U>UTL =-}  XkbSectionRec =, *XkbSectionPtr; T$ sztop 4 and  left 4 are the origin of the section, relative to the origin of the keyboard, in  mm =/ 10 4. D s .angle 4 is in  1 4/ 10 4 degrees. U<UTd * DoodadRec Structures e$ 4^The doodad arrays in the  {XkbGeometryRec 4 and the  {XkbSectionRec 4 may contain any D 48of the doodad structures and types shown in Table 13.1. rrd 4$The doodad structures form a union: U:UTd =datypedef union _XkbDoodad { =X#U8UTd =s XkbAnyDoodadRecany; 0U6UTd =UF" XkbShapeDoodadRecshape; =U4UTd =rr XkbTextDoodadRectext; DoJU2UTd =/* XkbIndicatorDoodadRecindicator; WU0UTd =c XkbLogoDoodadReclogo; sedU.UTl =ti+}  XkbDoodadRec =, *XkbDoodadPtr; ovw$ 4n lThe  top 4 and  left 4 coordinates of each doodad are the coordinates of the origin of the doodad to 4 _relative to the keyboards origin if the doodad is in the  {XkbGeometryRec 4 doodad array, .  4s \and with respect to the sections origin if the doodad is in a  {XkbSectionRec 4 doodad  4Thuarray.  =The  color_ndx = or  on_color_ndx = and  off_color_ndx = fields are color indices into the e { aeXkbGeometryRec =s color arra 1y = and are the colors to draw the doodads with. Similarly, the D unTshape_ndx = fields are indices into the  {XkbGeometryRec =s shape array. 4 U,UT$ =ha!typedef struct _XkbShapeDoodad { U*UT =ex Atom name;/* doodad name */ U(UT =ndNunsigned chartype;/*  pXkbOutlineDoodad = or  pXkbSolidDoodad =*/ U&UT =Junsigned charpriority;/* drawing priority, 0=>highest, 255=>lowest */ U$UT = <shorttop;/* top coordinate, in  mm =/ 10 = */ heU"UT =da>shortleft;/* left coordinate, in  mm =/ 10 = */ U UT =e Sshortangle;/* angle of rotation, clockwise, in  1 =/ 10 = degrees */ se(UUT =th/unsigned shortcolor_ndx;/* doodad color */ 5UUT =ar/unsigned shortshape_ndx;/* doodad shape */ x BUUTL =b5}  XkbShapeDoodadRec =, *XkbShapeDoodadPtr; VUUT$! =tr typedef struct _XkbTextDoodad { acUUT! =raAtomname;/* doodad name */ e pUUT! =un2unsigned chartype;/*  pXkbTextDoodad = */ }UUT! =haJunsigned charpriority;/* drawing priority, 0=>highest, 255=>lowest */ UUT! =A<shorttop;/* top coordinate, in  mm =/ 10 = */ d d"g aX UTHH"h b i pHHq55,, = h/,UTUT! =m>shortleft;/* left coordinate, in  mm =/ 10 = */ URUT! =mSshortangle;/* angle of rotation, clockwise, in  1 =/ 10 = degrees */ ise!UPUT! =14shortwidth;/* width in  mm =/ 10 = */ or.UNUT! =oo6shortheight;/* height in  mm =/ 10 = */ ;ULUT! =d /unsigned shortcolor_ndx;/* doodad color */ apeHUJUT! =bS!char *text;/* doodad text */ rUUHUT! =Xk9char *font;/* arbitrary font name for doodad text */ dbUFUTL! =UT3}  XkbTextDoodadRec =, *XkbTextDoodadPtr; dadvUDUT$" =%typedef struct _XkbIndicatorDoodad { dUBUT" ==>Atomname;/* doodad name */ U@UT" =op7unsigned chartype;/*  pXkbIndicatorDoodad = */ U>UT" = aJunsigned charpriority;/* drawing priority, 0=>highest, 255=>lowest */ U<UT" = i<shorttop;/* top coordinate, in  mm =/ 10 = */ U:UT" =,>shortleft;/* left coordinate, in  mm =/ 10 = */ U8UT" =/ Sshortangle;/* angle of rotation, clockwise, in  1 =/ 10 = degrees */ 1U6UT" =se/unsigned shortshape_ndx;/* doodad shape */  U4UT" = *Iunsigned shorton_color_ndx;/* color for doodad if indicator is on */ U2UT" =!Kunsigned shortoff_color_ndx;/* color for doodad if indicator is off */ !cU0UTL" =od=}  XkbIndicatorDoodadRec =, *XkbIndicatorDoodadPtr; o U.UT$# = t typedef struct _XkbLogoDoodad { U,UT# =ecAtomname;/* doodad name */ UT&U*UT# =de2unsigned chartype;/*  pXkbLogoDoodad = */ 3U(UT# =doJunsigned charpriority;/* drawing priority, 0=>highest, 255=>lowest */ @U&UT# =<shorttop;/* top coordinate, in  mm =/ 10 = */ orMU$UT# =55>shortleft;/* left coordinate, in  mm =/ 10 = */ ZU"UT# =Sshortangle;/* angle of rotation, clockwise, in  1 =/ 10 = degrees */ 10gU UT# =/unsigned shortcolor_ndx;/* doodad color */ ocktUUT# =//unsigned shortshape_ndx;/* doodad shape */ sigUUT# =x;(char *logo_name;/* text for logo */ *UUTL# =on2}  XkbLogoDoodadRec =, *XkbLogoDoodadPtr l& 3".Getting Keyboard Geometry From the Server $' atYYou can load a keyboard geometry as part of the keyboard description returned by  Xkbd' XGetKeyboard . However, if a keyboard description has been previously loaded, you can am' ^instead obtain the geometry by calling the  XkbGetGeometry . In this case, the geometry ' wiareturned is the one associated with the keyboard whose device  )ID  is contained in the keyD' *board description. =55$( 4 lYTo load a keyboard geometry if you already have the keyboard description, use  XkbGetfD( seGeometry 4. &UUTl) =*/ =di8XkbShapePtr shape =;/* shape to be examined */ e z$? ibdXkbComputeShapeBounds 4 updates the  {BoundsRec 4 contained in the  shape 4 by examining ti? 4a ]all the outlines of the shape and setting the  {BoundsRec 4 to the minimum x and minimum id"k aath souHH"l b n. HHp )) if  jmi)? 4 Sy, and maximum x and maximum y values found in those outlines.  XkbComputeShape+? A xBounds 4 returns  {False 4 if  shape 4 is  {NULL 4 or if there are no outlines for the shape; otherwise, de"D? 4 oit returns  {True 4. g7,Z 4edd  4If you add or delete a key to or from a row, or if you update the shape of one of the keys ;DZ 4BoYin that row, you may need to update the bounding box of that row. To update the bounding sQDZ 4e /box of a row, use  XkbComputeRowBounds 4. uteeUTUTl[ =daQBool  tXkbComputeRowBounds =( geom =,  section =,  row =) rURUTd\ =ouWXkbGeometryPtr geom =;/* geometry  1that  =contains the  section = */ UPUTd] = aLXkbSectionPtr section =;/* section  1that  =contains the row */ bUNUTd^ =. =XkbRowPtr row =;/* row to be examined and updated */ $_ cXkbComputeRowBounds 4 checks the bounds of all keys in the  row }  4and updates the bound+_ 4A fing box of the row if necessary.  XkbComputeRowBounds 4 returns  {False 4 if any of the arguD_ 4de;ments is  {NULL 4; otherwise, it returns  {True 4. ,Z,` 4yof  4If you add or delete a row to or from a section, or if you change the geometry of any of the ` 4 yZrows in that section, you may need to update the bounding box for that section. To update D` 4, Dthe bounding box of a section, use  XkbComputeSectionBounds 4. XULUTla = HBool  tXkbComputeSectionBounds =( geom =,  section =) eo UJUTdb = WXkbGeometryPtr geom =;/* geometry  1that  =contains the  section = */ SecUHUTdc =onIXkbSectionPtr section =;/* section to be examined and updated */ k*$d =bXkbComputeSectionBounds 4 examines all the rows of the  section 4 and updates the bounding 7d 4 thbox of that section so that it contains all rows.  XkbComputeSectionBounds 4 returns  {False 4 CoDDd 4 rMif any of the arguments is  {NULL 4; otherwise, it returns  {True 4. Y,e 4 rYKeys that can generate multiple keycodes may be associated with multiple names. Such mfe 4yoXkeys have a primary name and an alternate name. To find the alternate name by using the edsDe 4ndUprimary name for a key that is part of an overlay, use  XkbFindOverlayForKey 4. ,UFUTlf =eSVchar *  tXkbFindOverlayForKey =( geom =,  section =,  under =) UDUTdg =onWXkbGeometryPtr geom =;/* geometry  1that  =contains the  section = */ ainUBUTdh = =OXkbSectionPtr section =;/* section to be searched for matching keys */ amiU@UTdi = kFchar * under =./* primary name of the key to be considered */ $j  cXkbFindOverlayForKey 4 uses the primary name of the key,  under 4, to look up the alternate Dj 4ouname, which it returns. 4lk 3d+Adding Elements to a Keyboard Geometry ; o$l 4nsWXkb provides functions to add a single new element to the top-level keyboard geometry. as l 4ipeIn each case the  num_  * 4 fields of the corresponding structure is incremented by 1. These nl 4thbfunctions do not change  sz_ * 4 unless there is no more room in the array. Some of these #l 4UT[functions fill in the values of the elements structure from the arguments. For other funcr 0Dl 4gHtions, you must explicitly write code to fill the structures elements.  E,m 4inbThe top-level geometry description includes a list of  fgeometry properties 4. A geometry Rm 4iZproperty associates an arbitrary string with an equally arbitrary name. Programs that dis_m 4ayVplay images of keyboards can use geometry properties as hints, but they are not interlDm 4ouJpreted by Xkb. No other geometry structures refer to geometry properties. d"m akpr sileHH"n b ey.HH}ip++um_  kf +$n 4e XTo add one property to an existing keyboard geometry description, use  XkbAddGeomPro uDn mo perty 4. e a)UTUTlo =e YXkbPropertyPtr  tXkbAddGeomProperty =( geom =,  name =,  value =) m6URUTdp =nc;XkbGeometryPtr geom =;/* geometry to be updated */ de CUPUTdq =ur5char * name =;/* name of the new property */ mPUNUTdr =nc8char * value =;/* value for the new property */ y c$s ifXkbAddGeomProperty 4 adds one property with the specified  name 4 and  value 4 to the keyps 4gelboard geometry specified by  geom 4. {  XkbAddGeomProperty 4 returns  {NULL 4 if any of the b.}s 4 sZparameters is empty or if it was not able to allocate space for the property. To allocate Ds 4Yspace for an arbitrary number of properties, use the  XkbAllocGeomProps 4 function. $t 4YTo add one key alias to an existing keyboard geometry description, use  XkbAddGeomKeyeDt , Alias 4. dGeULUTlu =QXkbKeyAliasPtr  tXkbAddGeomKeyAlias =( geom =,  alias, real =) eUJUTdv ==;XkbGeometryPtr geom =;/* geometry to be updated */ etrUHUTdw =;/char * alias =;/* alias to be added */ =urUFUTdx = Cchar * real =;/* real name to be bound to the new alias */ va$y foiXkbAddGeomKeyAlias 4 adds one key alias with the value  alias 4 to the geometry  geom 4, and y 4voassociates it with the key whose real name is  real 4.  XkbAddGeomKeyAlias 4 returns  {NULL 4 if  ry 4 ^any of the parameters is empty or if it was not able to allocate space for the alias. To allo"Dy 4. acate space for an arbitrary number of aliases, use the  XkbAllocGeomKeyAliases 4 function. G7$z 4ioWTo add one color name to an existing keyboard geometry description, use  XkbAddGeomon,DDz mK Color 4. YUDUTl{ =.SXkbColorPtr  tXkbAddGeomColor =( geom =,  spec =,  pixel =)  fUBUTd| = e;XkbGeometryPtr geom =;/* geometry to be updated */ ry sU@UTd} =tr.char * spec =;/* color to be added */ U>UTd~ =*/5unsigned int pixel =;/* color to be added */ $ o fXkbAddGeomColor 4 adds the specified color  name 4 and  pixel 4 to the specified geometry  omggeom 4. The top-level geometry description includes a list of up to  {MaxColors 4 (32)  color   ashnames 4. A color  name 4 is a string whose interpretation is not specified by Xkb and neither is t 4orcthe  pixel 4 values interpretation. All other geometry data structures refer to colors using Xkb 4sftheir indices in this global list or pointers to colors in this list.  XkbAddGeomColor 4 returns  {ombNULL 4 if any of the parameters is empty or if it was not able to allocate space for the color.  4 \To allocate space for an arbitrary number of colors to a geometry, use the  XkbAllocGeom bD U@Colors 4 function. *d 4 cHTo add one outline to an existing shape, use  XkbAddGeomOutline 4. coU<UTl = NXkbOutlinePtr  tXkbAddGeomOutline =( shape =,  sz_points =) %U:UTd =to6XkbShapePtr shape =;/* shape to be updated */ 2U8UTd =et>int sz_points =;/* number of points to be reserved */ E$ 4`An outline consists of an arbitrary number of points.  XkbAddGeomOutline 4 adds an outline XR 4 tnto the specified  shape 4 by reserving  sz_points 4 points for it. The new outline is allocated and _ 4fzeroed.  XkbAddGeomOutline 4 returns  {NULL 4 if any of the parameters is empty or if it was l 4^not able to allocate space. To allocate space for an arbitrary number of outlines to a shape, yD 4"use  XkbAllocGeomOutlines 4. d"o aey,  bHH"p b HHne,,shape, uleo,d 4DTo add a shape to a keyboard geometry, use  XkbAddGeomShape 4. UTUTl =U:YXkbShapePtr  tXkbAddGeomShape =( geom =,  name =,  sz_outlines =) t)URUTd =ts;XkbGeometryPtr geom =;/* geometry to be updated */ 46UPUTd =80Atom name =;/* name of the new shape */ OuCUNUTd =ouBint sz_outlines =;/* number of outlines to be reserved */ V$ 4sWA geometry contains an arbitrary number of shapes, each of which is made up of an arbiAddc 4tuetrary number of outlines.  XkbAddGeomShape 4 adds a shape to a geometry  geom 4 by allocatap 4atiing space for  sz_outlines 4 outlines for it and giving it the name specified by  name 4. If a } 4`shape with name  }name 4 already exists in the geometry, a pointer to the existing shape is  4freturned.  XkbAddGeomShape 4 returns  {NULL 4 if any of the parameters is empty or if it was  4 g^not able to allocate space.  To allocate space for an arbitrary number of geometry shapes, D ),$use   XkbAllocGeomShapes . URd 4XkQTo add one key at the end of an existing row of keys, use  XkbAddGeomKey 4. tULUTl =/*1XkbKeyPtr  tXkbAddGeomKey =( row =) nUJUTd = 0XkbRowPtr row =;/* row to be updated */ $ 4om[Keys are grouped into rows.  XkbAddGeomKey 4 adds one key to the end of the specified  mbsrow 4. The key is allocated and zeroed.  XkbAddGeomKey 4 returns  {NULL 4 if  row 4 is empty or if sp 4li\it was not able to allocate space for the key. To allocate space for an arbitrary number of D 4am-keys to a row, use  XkbAllocGeomKeys 4. a*d 4isTTo add one section to an existing keyboard geometry, use  XkbAddGeomSection 4. LL?UHUTl = pXkbSectionPtr  tXkbAddGeomSection =( geom =,  name =,  sz_rows =,  sz_doodads =,  sz_overlays =) LUFUTd =;XkbGeometryPtr geom =;/* geometry to be updated */ YUDUTd =dd2Atom name =;/* name of the new section */ fUBUTd =8Eint sz_rows =;/* number of rows to reserve in the section */ =sU@UTd =Kint sz_doodads =;/* number of doodads to reserve in the section */ [KeU>UTd =o Mint sz_overlays =;/* number of overlays to reserve in the section */ $ 4 4]A keyboard geometry contains an arbitrary number of sections.  XkbAddGeomSection 4 adds s 4^one section to an existing keyboard geometry  geom 4. The new section contains space for  4`the number of rows, doodads, and overlays specified by  sz_rows 4,  sz_doodads 4, and ec g Ysz_overlays 4. The new section is allocated and zeroed and given the name specified by  iohname 4. If a section with name  }name 4 already exists in the geometry, a pointer to the existing  4trisection is returned.  XkbAddGeomSection 4 returns  {NULL 4 if any of the parameters is empty or w 4UT]if it was not able to allocate space for the section. To allocate space for an arbitrary numD 4sAber of sections to a geometry, use  XkbAllocGeomSections 4. ed 4o 6To add a row to a section, use  XkbAddGeomRow 4. U<UTl =n FXkbRowPtr  tXkbAddGeomRow =( section =,  sz_keys =) %U:UTd =rows to a section, use the  XkbAllocGeomRows 4 function. d"q ad r kbdGHH"r b HH ,,ys =) m,$ 4ecXTo add one doodad to a section of a keyboard geometry or to the top-level geometry, use beD seXkbAddGeomDoodad 4. )UTUTl =omWXkbDoodadPtr  tXkbAddGeomDoodad =( geom =,  section =,  name =) `Xk6URUTd =dsJXkbGeometryPtr geom =;/* geometry to which the doodad is added */ CUPUTd =TXkbSectionPtr section =;/* section, if any, to which the doodad is added */ roPUNUTd =1Atom name =;/* name of the new doodad */ mc$ 4{bA  doodad 4 describes some visible aspect of the keyboard that is not a key and is not a secp 4w.ation.  XkbAddGeomDoodad 4 adds a doodad with name specified by  name 4 to the geometry } 4geom 4 if  section 4 is  {NULL 4 or to the section of the geometry specified by  section 4 if  section 4 is  4knot  {NULL 4.  XkbAddGeomDoodad 4 returns  {NULL 4 if any of the parameters is empty or if it o a 4oaZwas not able to allocate space for the doodad. If there is already a doodad with the name  omyname 4 in the doodad array for the geometry (if  section 4 is  {NULL 4) or the section (if  section 4 is r 4;cnon- {NULL 4), a pointer to that doodad is returned. To allocate space for an arbitrary number sec 4hiZof doodads to a section, use the  XkbAllocGeomSectionDoodads 4 function. To allocate  4Zspace for an arbitrary number of doodads to a keyboard geometry, use the  XkbAllocGeomD bDoodads 4 function. d 4ad@To add one overlay to a section, use  XkbAddGeomOverlay 4. etULUTl =\XkbOverlayPtr  tXkbAddGeomOverlay =( section =,  name =,  sz_rows =) byUJUTd =f PXkbSectionPtr section =;/* section to which an overlay will be added */ 4UHUTd = 4.Atom name =;/* name of the overlay */ )UFUTd =oaEint sz_rows =;/* number of rows to reserve in the overlay */ d<$ e `XkbAddGeomOverlay 4 adds an overlay with the specified name to the specified  section 4. LI 4n bThe new overlay is created with space allocated for  sz_rows 4 rows. If an overlay with name V }ce[name 4 already exists in the section, a pointer to the existing overlay is returned.  ocGc 4cXkbAddGeomOverlay 4 returns  {NULL 4 if any of the parameters is empty or if it was not able geop 4X^to allocate space for the overlay. To allocate space for an arbitrary number of overlays to a }D 4 7section, use the  XkbAllocGeomOverlay 4 function. layd 4GeGTo add a row to an existing overlay, use  XkbAddGeomOverlayRow 4. UDUTl =on_XkbOverlayRowPtr  tXkbAddGeomOverlayRow =( overlay =,  row_under, sz_keys =) mUBUTd =amUTd = sAint sz_keys =;/* number of keys to reserve in the row */ s$ e ]XkbAddGeomOverlayRow 4 adds one row to the  overlay 4. The new row contains space for a ecesz_keys 4 keys. If  row_under 4 specifies a row that doesnt exist on the underlying section,  4\XkbAddGeomOverlayRow 4 returns  {NULL 4 and doesnt change the overlay.  XkbAddGeosp uemOverlayRow 4 returns  {NULL 4 if any of the parameters is empty or if it was not able to alloXD 4 cate space for the overlay. *d 4 tKTo add a key to an existing overlay row, use  XkbAddGeomOverlayKey 4. =on?U<UTl = WXkbOverlayKeyPtr  tXkbAddGeomOverlayKey =( overlay =,  row, under =) LU:UTd =ay all outlines are freed */ TK$] 4St}If  free_all 4 is  {True 4, all outlines are freed regardless of the value of  first  4or  count 4. Other*XD] 4utZwise,  count 4 outlines are freed beginning with the one specified by  first 4. md 4rebTo  allocate space for 4 an arbitrary number of keys to a row, use  XkbAllocGeomKeys 4. UDUTl =d EStatus  tXkbAllocGeomKeys =( row =,  num_needed =) UBUTd =veDXkbRowPtr row =;/* row to which keys should be allocated */ UTU@UTd = ;int num_needed =;/* number of new keys required */ $ eegXkbAllocGeomKeys 4 allocates  num_needed 4 keys and adds them to the  row 4. No initializa*/ D 4tion of the keys is done. dP 4re4To free geometry keys, use  XkbFreeGeomKeys 4. umU>UTlQ =^void ' tXkbFreeGeomKeys =( row =,  first =,  count =,  free_all =) U<UTdR =@XkbRowPtr row =;/* row in which keys should be freed */ eeU:UTdS =e 0int first =;/* first key to be freed */  U8UTdT =wi5int count =;/* number of keys to be freed */ U6UTdU = ABool free_all; =/*  {True = => all keys are freed */ a-$V 4 k~If  free_all 4 is  {True 4, all keys are freed regardless of the value of  first  4or  count 4. Otherwise, :DV ªLcount 4 keys are freed beginning with the one specified by  first 4. UTOd 4 @To allocate geometry properties, use  XkbAllocGeomProps 4. dU4UTl =XkGStatus  tXkbAllocGeomProps =( geom =,  num_needed =)  qU2UTd =iaVXkbGeometryPtr geom =;/* geometry for which properties should be allocated */ ~U0UTd = Aint num_needed =;/* number of new properties required */ e`B["u a Ycnt`B[ ?$T<"v q Y $w=?$T< ke s?A?A?$$`zY`@("w q Y %U8`zY`@(5in `z} G} GYD`YOQ"x m Y OQ {J4Q"y m Y J4QfreF.Q"z m  Y ereF.QaluA)V@"{ j Y i, A)V@coeginningspUUd TUTAtom(s) UUd Tat(array) pBQ"| m Y U4BQGStB]@ "} m Y ,B]@ 2"~ p Yge2ry r @NQ Q" k Y y inNQ Q =/NQ  NQ ε@. ]" i Y "uε@. ]εIbεIb T num_levelsN> Q" k Y ?N> Q s?N>  N> ε-y ]" i Y (ε-y ]ε6bε6b Tmods@(N"[" a YN"[  * kQ@$*" a Y4 * kQ@$* x R60 @" n Y. R60 @ m l=$l=$R6<R6A^@ =" a Y iA^@ = O>Q" m Y O>QKBQ" m Y atKBQG?F@Q" m  Y G?F@Q??db@" j Y ??db@UUd TXkbKTMapEntryRec(s) "UUd T(array) C?J Q" m Y ]C?J QY C?>]@ " m Y bC?>]@ ??>b@=" a YN ??>b@= H " b  H y6bh NExample Key Type a " b*k  4d 4 x l" b .ll= ` Symbolic Description '" b ' ` Key Type Data Structure l? " b l?  Q?hC ?Xkb Keyboard Controls V? " bV? QUVUTdD 8UU l" b lR" m `E 7]Type of Control Vl" b bVl?R= `F 7 Control Name l " b  l Sy UTUT`G 13Controls for enabling and disabling other controls Vl " b Vl Sd x UTUThH 1EnabledControls l " b - =l SyTscrti UTUT`I 1Control for bell behavior Vl " b Vl TyTtruur UTUThJ 1AudibleBell l " b Ql ?U Keoa UTUT`K 1!Controls for repeat key behavior V l " b UVV l U UTUThL 1PerKeyRepeat l3 " b ]l3 V UTUT`M 1Controls for keyboard overlays V3l " b a V3l "V UTUThN 1 Overlay1 lO " b f elO otWols UTUT`O 1/Controls for using the mouse from the keyboard VOl " b nleVOl W" b UTUThP 1MouseKeys lk " b Colk r Xl UTUT`Q 1(Controls for better keyboard access by TVkl " b lVkl "X UTUThR 1AccessXFeedback Kel " b akel Y" b UTUT`S 1UV&Controls for general keyboard mapping Vl " b *Vl  Y] UTUThT 1GroupsWrap RVN`" n G 6 erRVN`lRVNWVN>QKԉ" a  V>QKԉ ( ?@@W" a "?@@W  r7 " k  UTr7 /CoB' ]" k  dB' ]ߠB T Core Xliber7 " a TUTr7 O%=,@" r  O%=,@Sx*5 ]" r  QSx*5 ]n?3sSx3s T Xkb-capable dЂ5uޠ ]" r  dЂ5uޠ ]n?>*dЂ>* TUserV@/1 ]" r  V@/1 ]n?IVI T Application Sx*5!1" a  oroSx*5!1 TFmY" n  6*TFmYTFm]mO%=,@" a sapO%=,@ %=,@" r   %=,@WI*. ]" r  I*. ]+?3sI3s T Xkb-aware !o5uޠ ]" r  !o5uޠ ]+?>*!o>* TUserUT@/1 ]" r  k@/1 ]+?II T Application*/1!1" a  a */1!1 %=,@" a r %=,@ %=,@" r  r %=,@Sx*8 ]" r  l*8 ]?3s3s T Xkb-unaware ЂЏ5uޠ ]" r  Џ5uޠ ]?>*Џ>* TUser@/1 ]" r  o@/1 ]?II T ApplicationSx*8!1" a  n*8!1 %=,@" a %=,@ 5?Q:LQ" l 5?Q:LQ 5?QM5M$?QLQ" l r $?QLQI$?Q$?M(GHb@% " l "(GHb@% (G@Qh_HV%l " b ]V%l  @1 UTUTh 1DetectableAutorepeat  R H" l  R H% R rB%\? " b %\?  r UTUT` 1xBoolean HCT&f" b >HCT&f ?warЂ UTUT( 1Detectable- URUT@ 1ޠ Autorepeat Џ&fC" b >r &fC  ?? UTUT` =ic oC" b >nC  ?=@ UTUT` 1 CY" b >QCY  ?Q: UTUT` = 5g 3 =pz2 g z  z rg 3 =pzLQ X.= 2 g  y " X.= %dC" b  >H%dC  b ?] UTUT` 110.3.3 q.= 2 g  tleq.= R%.= 2 g   %.= K  2 g  K  %%K 2 g   %K HZ  " b &Z  '`ЂUTh# Doodad Types R  " b&  '`&fUTUTd$ 8 z  " b&z  '`UTUTd% 8 l~" b &l~'a `& 7Doodad :" b &2r'a =pz `' 7 Structure ~" b &d~'aH ` 7Type l7c" b ql7c gGjt ` 7Field 7N" b %7N Gj2 ` 7 Function lGc " b  lGc GkZUTUT` 1 b mk_delay GN " b UTGN GkTyp RUTUT` 1LTime (ms) between the initial key press and the first repeated motion event lTc " b lTc GlUTUT` 1UT mk_interval TN " b TN GlUTUT` 1)Time (ms) between repeated motion events lac " b alac 'Gmucte UTUT` 1mk_time_to_max aN " bHaN TyGm7UTUT` 1 BNumber of events (count) before the pointer reaches maximum speed lnc " bb lnc Gn UTUT` 1 mk_max_speed nN " bnN GnGUTUT` 1UT >Gڈ骨 2 u3ڈ骨ڈ⣃骨 #> t=? =?G:⣃骨 3 v4⣃骨⣃7骨 #? t>@ >@Gnel7骨 7骨7ؽ骨 #@ t?A ?AGؽ骨 ؽ骨ؽr骨 #A t@B @BGr骨 r骨r&骨 #B tAC ACG&骨 &骨& (骨 #C tBD BDG (骨  (骨 (Ca骨 #D tCE CEGCa骨 8Ca骨Ca]骨 #E tDF DFGb]骨 q]骨]#x骨 # F tEG EGYE#x骨 #x骨#xڈ骨H #!G iFH Cڈ骨H =F]" bx#"H iGI Rbx]" bx] ]  6(count)ՙz R bx##I iHJ uՙz R bxՙ@ՙ@ 6(msec)îy0OYZ4Ur#,R wQS Hq! OYZ4UrϮK#-S wRT ϮK]YKϮK829$b#.T uSU  u829$bՙ@ 29829Y=i$L#/U uT  vY=i$L bxî2>rY=iH2#0V a@H2-R=9]UU$ *iAccessDOS provides access to the DOS operating system for people with physical impairments and was develUU * uloped by the Trace R&D Center at the University of Wisconsin. For more information on AccessDOS, contact the UU *kTrace R&D Center, Waisman Center and Department of Industrial Engineering, University of Wisconsin-Madison Z*UUD *AWI 53705-2280. Phone: 608-262-6966. e-mail: info@trace.wisc.edu. kl/#1W b Xl/fp ` 7YZAction r /#2X bWY! /fp ` 7 Beep Code #/@ #3Y bXZ89#/@ Ufp u ` 7ax_options bit 29l? #4Z bY[ vl? îfqYiUTUT` 1LED turned on  ? #5[ bZ\= ? fqOS ovUTUT` 1 DHigh-pitched beep #?@ #6\ b[]sev#?@  ufq thTrUTUT` 1thXkbAX_IndicatorFBMask lL #7] b\^cthlL fr&D ntUTUT` 1 aLED turned off Ind L #8^ b]_nad L fr537-2UTUT` 12-Low-pitched beep t#L@ #9_ b^`bX#L@ frUTUT`! 1XkbAX_IndicatorFBMask lY #:` b_a!lY fspUTUT`" 1 More than one LED changed state  Y #;a b`b Y fs`UTUT`# 19Two high-pitched beeps Z b#Y@ #<b bacf#Y@ fsLEtuUTUT`$ 1XkbAX_IndicatorFBMask lf #=c bbdqS lf  Dfttch bUTUT`% 1Control turned on  f #>d bceqth f thftnditoUTUT`& 1 Rising tone b#f@ #?e bdff#f@ ftLEtuUTUT`' 1XkbAX_FeatureFBMask _ls #@f begfrls  fu-piheUTUT`( 1@ Control turned off  s #Ag bfh s funditoUTUT`) 1 Falling tone b#s@ #Bh bgif#s@ fu Mo tUTUT`* 1d XkbAX_FeatureFBMask l #Ci bhjl fv#UTUT`+ 1ch$More than one control changed state b  #Dj bikf  fvXkX_UTUT`, 1Two high-pitched beeps bd#@ #Ek bjft#@ %fvtrotuUTUT`- 1XkbAX_FeatureFBMask l#Fl bmtdilfwton bUTUT . 1SlowKeys and BounceKeys about URUT@. 1to be turned on or off  #Gm bln  fwlUTUT`/ =f!Three high 1- =pitched beeps o#@ #Hn bmoA b#@  fw UTUT`0 1toXkbAX_SlowWarnFBMask al #Io bnpil @ fxfUTUT`1 1UTSlowKeys key pressed t  #Jp boqj  fxfUTUT`2 =UTMedium 1- =pitched beep nt#@ #Kq bprD b#@ fx UTUT`3 1X_XkbAX_SKPressFBMask Twl #Lr bqs#El tfy@ UTUT`4 1roSlowKeys key accepted   #Ms brt#F  difyUTUT`5 1onMedium-pitched beep #@ #Nt bsu.#@ orfy UTUT`6 1 bXkbAX_SKAcceptFBMask l #Ou btvTl 1fzhedeeUTUT`7 1SlowKeys key rejected   #Pv buw  XkfzarnMaUTUT`8 1Low-pitched beep #@ #Qw bvxx#@ UTfzs k pUTUT`9 1XkbAX_SKRejectFBMask lh #Rx bwyxlh UTf{ 1 =UTUT`: 1#Accepted SlowKeys key released  h #Sy bxz h Xkf{ssFasUTUT`; 1Medium-pitched beep #h@ #Tz by{ #h@ Slf{y aepUTUT`< 1XkbAX_SKReleaseFBMask lt #U{ bz|lt Mef|hedeeUTUT`= 1BounceKeys key rejected  t #V| b{}UT t X_f|BMa UTUT`> 1Low-pitched beep #t@ #W} b|~dee#t@ Slf|y recUTUT`? 1XkbAX_BKRejectFBMask l#X~ b}nMal Lof} be UTUT`@ 1StickyKeys key latched  #Y b~TUT Ref}k UTUT A 1#RLow-pitched beep followed by URUT@A 1fhigh-pitched beep #@ #Z bd#@  #Sf}UTUT`B 1XkbAX_StickyKeysFBMask asl #[ b#l  bf~ UTUT`C 1StickyKeys key locked   #\ b    bf~UTUT`D 1High-pitched beep #@ #] bjte#@ f~{}UTUT`E 1XkbAX_StickyKeysFBMask BMal #^ b#l  bfdUTUT`F 1StickyKeys key unlocked UT  #_ b  fnMaUTUT`G 1Low-pitched beep #@ #` b d#@ #YfUTUT`H 1XkbAX_StickyKeysFBMask ~Q~#a b od ~Q~fjtch b `P 7detail bQ #b bSfQ jXkX_ `Q 7asReason ~a~ #c b~a~ jUTUTUThR 1ysXkbAXN_SKPress a #d ba jUTUTUT`S 1ch-A key was pressed when SlowKeys was enabled. ~n~ #e b}~n~ XkjyKeFBUTUThT 1XkbAXN_SKAccept n #f bn jeyseyUTUT`U 1:A key was accepted (held longer than the SlowKeys delay). ~{~ #g bopi~{~ @ j#` bUTUThV 1zXkbAXN_SKRelease Y{ #h b_ic{ j#aUTUT`W 1o'An accepted SlowKeys key was released.  b~~ #i b~~ jUTUThX 1j{XkbAXN_SKReject  #j bc b j UTUT`Y 1AA key was rejected (released before the SlowKeys delay expired). d~~ #k b~~ UTj1chA UTUThZ 1en|XkbAXN_BKAccept  #l b} XkjyKeFBUTUT`[ 1"A key was accepted by BounceKeys. ~~#m b~~ ysjUTUTUTh\ 1}XkbAXN_BKReject th #n b#g pij~UTUT ] 1#`8A key was rejected (pressed before the BounceKeys delay URUT@] 1 expired). ~~ #o baUT~~ ccjwKe kUTUTh^ 1 b~XkbAXN_AXKWarning  #p b  UTj1jUTUT`_ 1>AccessXKeys is about to turn on/off StickyKeys or BounceKeys. !2e #q b ,A !2e asbI thSlUTUT` 1ed(1<<1) @e!ɚV #r b@e!ɚV bIUTUTUTUT`_ 1Xk$Slow key accept notification wanted #ll. #s bXkl. UTbJ1A UTUT`` 1y XkbAXN_SKRejectMask .2e #t b.2e UTbJUTUTUT`a 1(1<<2) th@e.ɚV #u b#g@e.ɚV pibJ~UTUT`c 1#`$Slow key reject notification wanted hel; #v bxrel; bKUTUT`d 1XkbAXN_SKReleaseMask ;2e #w bKrn;2e bK UTUT`e 1(1<<3) @e;ɚV #x bcss@e;ɚV  obKckyysUTUT`g 1%Slow key release notification wanted lH #y blUTlH 1)bL!VUTUT`h 1XkbAXN_BKAcceptMask H2e #z b_H2e nobLn wteUTUT`i 1(1<<4) b@eHɚV #{ bTb@eHɚV bLXkXNUTUT`j 1&Bounce key accept notification wanted lU #| bUTlU 2)bM.VUTUT`q 1XkbAXN_BKRejectMask U2e #} bcU2e nobMn wteUTUT`W 1(1<<5) b@eUɚV #~ bb@eUɚV bMXkXNUTUT`L 1&Bounce key reject notification wanted lb # bUTlb 3)bN;VUTUT`b 1XkbAXN_AXKWarningMask b2e # bgb2e  nbNon ntUTUT`c 1(1<<6) b@ebɚV # b)b@ebɚV bNXkXNUTUT`d 1$AccessX warning notification wanted lo # beUTlo 4)bOHVUTUT`e 1XkbAXN_AllEventsMask H0 # b >jH0 t ?ionanh Xkb Control ms  T&f0 # b >TUT&f0 KR ? UVUTd 8#} b0 # b >ob0  ?(15)UVUTd 8 0 # b >0 UT ?`LUVUTd 8t  i%d0 # b >b%d0  ? 3)UVUTd 8UT THT&f# b >eHT&f ?g` 7 nControl n &f# b >V&f ?be   7Control Selection Mask @ 7wa(which parameter) # b > ?bO   7Relevant XkbControlsRec Ma@ 7 Data Fields Y# b >Y ?XkCo   7UTBoolean Control @ 7enabled_ctrls bit %d# b >#}%d ?   7Secti@ 7(1on UVHT&f# b > bHT&f  ?  UTUTh 1AccessXFeedback i&f# b >b&f  ? 3) UTUT` =UTXkbAccessXFeedbackMask ## b > ?7 nCo UTUT  1 ax_options: bURUT@ 1VXkbAX_*FBMask Y# b >oroY  ?@wa UTUT` 1) XkbAccessXFeedbackMask b%d# b >%d  ?Reva UTUT` 1Ma10.6.3 HT&f # b >#HT&f  ?Y UTUTh 1XkAccessXKeys &f # b >en&f  ?# UTUT` 1 } # b >  ?@(1 UTUT` =&f Y # b >fY  ? UTUT` =eeXkbAccessXKeysMask %d # b >%d 3) ? UTUT` 1ed10.6.1 #HT&fA# b >HT&fA  ?7 nCo UTUTh 1AccessXTimeout UT&fA# b >&fA  ? UTUT` =XkbAccessXTimeoutMask A# b >AA ?d UTUT  = ax_timeout vaURUT =Maaxt_opts_mask #UPUT =#axt_opts_values 0UNUT =axt_ctrls_mask Y=ULUT@ =axt_ctrls_values yYA# b >YA  ? UTUT` =XkbAccessXTimeoutMask %dA# b >%dA (1 ? UTUT` 1Y10.6.2 #HT&f # b >HT&f UT ?=eeXk UTUTh 1AudibleBell &f # b >&f UT ?`ed UTUT` 1 f # b >&f  n ?UT UTUT` 1ss mY # b >Y  ?? UTUT` =XkbAudibleBellMask ime%d # b >%d  ?? UTUT` 9.2 H'T&f # b >p_mH'T&f # ?s_vue UTUTh 1AutoReset &f' # b >u y&f' # ?> UTUT` =Y ' # b >Xk' d ?A UTUT` = 'Y # b >UT'Y .2 ?&f UTUT` = %d' # b >ee%d'  ?iblel UTUT` 110.1.2 bH5T&f # b >TH5T&f  ? f UTUTh 1#BounceKeys &f5 # b >UT&f5  ?  UTUT` =XkbBounceKeysMask 5 # b >5 me ? UTUT` =debounce_delay 5Y # b >5Y &f ?# b UTUT` =_mXkbBounceKeysMask %d5 # b >Au%d5  ? b UTUT` 1&f10.6.7 H^T&f # b  > H^T&f # ?> UTUTh 1EnabledControls &f^ # b >&f^  ?'Y UTUT` =XkbControlsEnabledMask =^ # b >^  ?bl UTUT` =enabled_ctrls ^Y # b >T^Y  ? f UTUT` #Non-Boolean Control &f%d^ # b >T&f%d^  ?UT UTUT` 1Xk10.1.1 ysMHlT&f # b >HlT&f  ? UTUTh 1GroupsWrap lay&fl # b >&fl  ?# UTUT` =XkbGroupsWrapMask l # b >l  ? b UTUT` = groups_wrap lY # b > lY # ?> UTUT` Non-Boolean Control %dl # b >%dl  ?'Y UTUT` 10.7.1 rolHzT&f # b >bHzT&f  ?  UTUTh 1UTIgnoreGroupLock le&fz # b >&fz  ?? UTUT` 1 z # b >z T ?^ UTUT` 1 zY # b >&fzY  ? UTUT` =XkbIgnoreGroupLockMask %dz # b >%dz  ?l UTUT` 110.7.3 UTHT&f # b >HT&f  ? UTUTh 1IgnoreLockMods UT&f # b >&f  ?lY UTUT` =XkbIgnoreLockModsMask  # b >  ?l UTUT` = ignore_lock UTY # b >#Y  ?T&f UTUT` Non-Boolean Control UT%d # b >#%d  ? UTUT` 15.1 UTHT&f # b > bHT&f  ?  UTUTh 1InternalMods &f # b >&f  ? UTUT` =XkbInternalModsMask ck # b >  ?? UTUT` = internal 0Y # b >Y  ?? UTUT` Non-Boolean Control ck%d # b >%d  ?? UTUT` 15.1 HT&f # b >#HT&f  ? UTUTh 1MouseKeys &f # b >#&f # ?Y UTUT` =&fXkbMouseKeysMask  # b >  ? UTUT` = mk_dflt_btn UTY # b > bY  ?  UTUT` =XkbMouseKeysMask %d # b > b%d &f ?  UTUT` 110.5.1 HwT&fA# b HwT&fA   UTUTh 1MouseKeysAccel &fwA# b b&fwA    UTUT` =XkbMouseKeysAccelMask wA# b bwAAd   UTUT  = mk_delay URUT = mk_interval #UPUT =mk_time_to_max T&f0UNUT = mk_max_speed T=ULUT@ =Mo mk_curve fwYA# b &fwYA  UT UTUT` =Xk =XkbMouseKeysAccelMask %dwA# b %dwA  UT UTUT` 1bt10.5.2 HT&f # b HT&f   UTUT UTUTh 1ou Overlay1 d&f # b bd&f  UT UTUT` 110 1 # b    UTUT` 1 Y # b #Y  b  UTUT` =XkbOverlay1Mask %d # b %d  w UTUT` 10.4 HT&f # b HT&f UP  UTUT` 1&f Overlay2 &f # b omk&f   b UTUT` 1  # b  Ac %d UTUT` 1 b Y # b Y  5.2 UTUT` =XkbOverlay2Mask %d # b TUT%d  1 d&f UTUT` #10.4 HT&f # b HT&f   UTUTh 1 bPerKeyRepeat &f # b TUT&f  # UTUT` =XkbPerKeyRepeatMask  # b kve  # b UTUT` =per_key_repeat Y # b Y #  UTUT`! &fNon-Boolean Control %d # b %d  mk&f UTUT`" 110.3.1 bHT&f# b HT&f   UTUTh# 1RepeatKeys &f# b &f Y  UTUT`$ =UTXkbRepeatKeysMask # b   UTUT % 1UT repeat_delay 0URUT@% 1repeat_interval Y# b Y  b Keype UTUT`& =XkbRepeatKeysMask %d# b %d  eyRea UTUT`' 110.3 HT&f # b HT&f UT `  UTUTh( 1 SlowKeys &f # b &f  ! UTUT`) =CoXkbSlowKeysMask  # b   mk UT UTUT`* = bslow_keys_delay Y # b  Y UT h# UTUT`+ =XkbSlowKeysMask %d # b  %d UT `$UT UTUT`, 1k 10.6.6 H T&f'# b  H T&f'  UT UTUTh- 1elStickyKeys @%&f '# b  #&f '  Y UTUT`. =eyXkbStickyKeysMask  '# b # ''  UTUT / 1yR ax_options: URUT/ 1XkbAX_TwoKeysMask  b#UPUT@/ 1XkbAX_LatchToLockMask  Y'# b  Y' #  UTUT`0 =XkbStickyKeysMask %d '# b s%d ' #  UTUT`1 110.6.8 mkj| # b ks_j|   b h3 Controls Mask Bits | # b s| # d4 4 J| # b 10J|   bd5 4 >| # b ->| % d6 4 j# b jXk ysMk `7 Mask Bit K0# b K0/ optns  8 / which or X@8 UPchanged_ctrls JK`# b JK`  Y`9 enabled_ctrls ># b > %d`: Value j # b |j  s_ UTUT`; =XkbRepeatKeysMask K0 # b K0  b s UTUT`< =ok #JK` # b JK`   10 UTUT`= =ok > # b |>  -> UTUT`> =%(1L<<0) j # b j   UTUT`? 1XkbSlowKeysMask K0 # b bK0   UTUT`@ =nsok JK` # b! PchJK` ` # b UTUT`A =ok > #! b " 9> >  UTUT`B 1(1L<<1) >j #" b!# j  # UTUT`C 1XkbBounceKeysMask K0 ## b"$ XkK0  # UTUT`D =ok JK` #$ b#% TJK`  # UTUT`E =ok J> #% b$& T>  # UTUT`F 1(1L<<2) j $& b%' >j  # UTUT`G 1XkbStickyKeysMask K0 $' b&( XkK0  # UTUT`H =ok JK` $( b') TJK`  # UTUT`I =Pok J> $) b(* T>  # UTUT`J 1(1L<<3) j $* b)+ Bj  # UTUT`K 1XkbMouseKeysMask K0 $+ b*, XkK0  # UTUT`L =ok JK` $, b+- TJK`  # UTUT`M =Tok J> $- b,. T>  # UTUT`N 1T(1L<<4) j $. b-/ Fj  $ UTUT`O 1XkbMouseKeysAccelMask  K0 $ / b.0 kti K0 0 $ b UTUT`P =Xkok J K` $ 0 b/1 HJ K` ` $ b UTUT`Q =ok > $ 1 b02 I>  $ b UTUT`R 1(1L<<5) j $ 2 b13 j  $ b UTUT`S 1BXkbAccessXKeysMask K0 $ 3 b24 uKeK0  + b, UTUT`T =ok K0JK` $4 b35 LJK`  , b- UTUT`U =ok K`> $5 b46 MT>  - b. UTUT`V 1>(1L<<6) j% $6 b57 T(1j%  . b/ UTUT`W 1XkbAccessXTimeoutMask %K0 $7 b68 eAc%K0  / b0 UTUT`X =ok K0J%K` $8 b79 PXkJ%K`  0 b1 UTUT`Y =ok K`>% $9 b8: Q>%  1 b2 UTUT`Z 1>(1L<<7) j3 $: b9; (1j3  2 b3 UTUT`[ 1XkbAccessXFeedbackMask 3K0 $; b:< ssk3K0  24 UTUT`\ =ok J3K` $< b;= okJ3K`  35 UTUT`] =ok >3 $= b<> ok>3  46 UTUT`^ 1(1L<<8) jA $> b=? 1<6jA  57 UTUT`_ 1XkbAudibleBellMask AK0 $? b>@ etMAK0  68 UTUT`` 1 JAK` $@ b?A XJAK`  8 b9 UTUT`a =ok K`>A $A b@B Y>A  9 b: UTUT`b 1>(1L<<9) jO $B bAC (1jO  : b; UTUT`c 1XkbOverlay1Mask OK0 $C bBD csXOK0  $ UTUT`d 1s kJOK` $D bCE TUTJOK`    UTUT`e =ok ok>O $E bDF TUT>O >   UTUT`f 1 (1L<<10) j] $ F bEG Tj]    UTUT`g 1XkbOverlay2Mask ]K0 $!G bFH _]K0  K0 UTUT`h 1 J]K` $"H bGI 8J]K`   K` UTUT`i =ok X>] $#I bHJ 9UT>] `  UTUT`j 1 (1L<<11) jk $$J bIK TUTjk   UTUT`k 1XkbIgnoreGroupLockMask kK0 $%K bJL XkkK0 $ $ UTUT`l 1c XJkK` $&L bKM TUTJkK`  $ UTUT`m =Tok J>k $'M bLN T>k  $ UTUT`n 1T (1L<<12) jy $(N bMO fjy  $ UTUT`o =TXkbGroupsWrapMask yK0 $)O bNP XkyK0  $! UTUT`p =_ok JyK` $*P bOQ TJyK` ` $" b UTUT`q = >y $+Q bPR T>y  $# UTUT`r 19 (1L<<27) j $,R bQS jj  $$ UTUT`s =TXkbInternalModsMask K0 $-S bRT kgnK0    UTUT`t =ok XkJK` $.T bSU UTJK`  $& UTUT`u =T T> $/U bTV TUT> >   UTUT`v 1 (1L<<28) j $0V bUW Tj    UTUT`w =XkbIgnoreLockModsMask K0 $1W bVX TXkK0  $) UTUT`x =ok JK` $2X bWY TJK`  $* UTUT`y =T > $3Y bXZ TUT>  $+ UTUT`z 1T (1L<<29) j $4Z bY[ rj  $, UTUT`{ =XkbPerKeyRepeatMask K0 $5[ bZ\ kntK0  $- UTUT`| =kok JK` $6\ b[] TJK`  $. UTUT`} = T> $7] b\^ TUT>  $/ UTUT`~ 1T (1L<<30) j $8^ b]_ vj  $0 UTUT` =TXkbControlsEnabledMask K0 $9_ b^` neLK0 0 $1 b UTUT` =Xkok JK` $:` b_a xJK` ` $2 b UTUT` = > $;a b`b T>  $3 b UTUT` 1UT (1L<<31) j$<b bac zTj  $4 b UTUT` =rXkbAccessXOptionsMask K0$=c bbd ryRK0 0 $5 b UTUT` =ntok JK`$>d bce |JK` ` $6 b UTUT` =ok >$?e bd }> ] b^ UTUT  =>(XkbStickyKeysMask | URUT@ =UTXkbAccessXFeedbackMask) j $@f bg vj  $0UT UTUT` 1XkXkbAllBooleanCtrlsMask K0 $Ag bfh LK0   bUT UTUT` 1ok JK` $Bh bgi xJK` ` $2 b UTUT` =ok >> $Ci bhj >>   bUT UTUT` 1(1(0x00001FFF) j $Dj bik j   UTUT UTUT` 1ccXkbAllControlsMask K0 $Ek bjl K0   UTUT UTUT` 1ok JK` $Fl bkm JK`   UTUT UTUT` = > $Gm bln >>  ^UT UTUT` 1(X (0xF8001FFF) kl $Hn bmp kskl  gh 3EGroupsWrap options ( groups_wrap  field) Xk $Io b $A  K0UTUTd 8 b T*$Jp bnq $B*x K` ` 7$2groups_wrap symbolic name h*H$Kq bpr h*H  b ` 7value ; $Lr bqs k;   UTUTh 1UTXkbWrapIntoRange sh;H $Ms brt h;H   UTUT` 1(0x00) okI $Nt bsu I  UT UTUTh 1XkbClampIntoRange hIH $Ou btv hIH UT `(X UTUT` 1(0x40) W $Pv buw W   UTUTh 1apXkbRedirectIntoRange ihWH $Qw bv hWH   UTUT` 1(0x80)  Tl] $Rx b{ $Bl] x K`h $2@_Access X Enable/Disable Bits ( ax_options  field) ] $Sy b b] va ;UTUTd 8s V] $Tz b V] UT WrantUTUTd 8 mZ$U{ bx| mZ UT ` 7okAccess X Control m$V| b{} mUT h ` 7Raax_options bit HmH$W} b|~ mH UT ` 7value ~Z $X~ b} ~Z   UTUT UTUT` 1XkAccessXFeedback ~ $Y b~ ~   UTUT` 1XkbAX_SKPressFBMask ~H $Z b ~H   UTUT` 1Ac(1L<<0) blZ $[ b Z $S  UTUT` 1  $\ b s  $T  UTUT` 1XkbAX_SKAcceptFBMask aH $] b H  m UTUT` 1 (1L << 1) Z $^ b Z   UTUT` 1UT  $_ b Git  |~ UTUT` 1XkbAX_FeatureFBMask H $` b H   UTUT` 1 (1L << 2) Z $a b Z  b  UTUT` 1  $b b kX_  $Z UTUT` 1XkbAX_SlowWarnFBMask H $c b 1<0H   UTUT` 1 (1L << 3) Z $d b Z  b s UTUT` 1  $e b kX_  $] UTUT` 1XkbAX_IndicatorFBMask H $f b 1<<H   UTUT` 1 (1L << 4) Z $g b Z  b G UTUT` 1  $h b kX_  $` UTUT` 1XkbAX_StickyKeysFBMask H $i b <) H $a  UTUT` 1 (1L << 5) Z $j b Z  kX_ UTUT` 1  $k b _ow  $c b UTUT` 1<0XkbAX_SKReleaseFBMask H $l b <) H $d  UTUT` 1 (1L << 8) Z $m b Z  kX_ UTUT` 1  $n b _di  $f b UTUT` 1<<XkbAX_SKRejectFBMask H $o b <) H $g  UTUT` 1 (1L << 9) Z $p b Z  kX_ UTUT` 1  $q b _ic  $i UTUT` 1<XkbAX_BKRejectFBMask H $r b 1<<H   UTUT` 1 (1L << 10) Z $s b Z  _ow UTUT` 1  $t b _Re  $l b UTUT` 1) XkbAX_DumbBellFBMask dH $u b <) H $m  UTUT` 1 (1L << 11)  Z $v b  Z  di UTUT` 1 StickyKeys  b $w b   b < UTUT` 1XkbAX_TwoKeysMask  H $x b  H   UTUT` 1 (1L << 6) Z $y b Z _  UTUT` 1  $z b a  $r  UTUT` 1XkbAX_LatchToLockMask H ${ b H   UTUT` 1 (1L << 7) &Z $| b &Z   UTUT` 1 & $} b lMa&   UTUT` 1XkbAX_AllOptionsMask &H $~ b &H  b  UTUT` 1(0xFFF) l.~ $ b &s bl.~ $w'b UTUT` indicator doodad = . $ b& .  b'b UTUT` { bXkbIndicatorDoodadRec = .~ $ b&.~ 'b UTUT` XkbIndicatorDoodad = 1l<~ $ b&al<~ 'h UTUT` outline doodad = ckM< $ b&< 'h UTUT` {XkbShapeDoodadRec = <~ $ b&<~ 'h UTUT UTUT` XkbOutlineDoodad = blJ~ $ b&lJ~ 'iXkX_ UTUT` solid doodad = ~J $ b& bJ UT'i1(0 UTUT` {XkbShapeDoodadRec = J~ $ b&bJ~ 'ior od UTUT` XkbSolidDoodad = &lX~ $ b&blX~  b'catDo UTUT` text doodad = bX $ b&X 'Xknd UTUT` {XkbTextDoodadRec = X~ $ b&X~ UT'ou UTUT` kMXkbTextDoodad = l$ $ b  l$ UT cc`h1 c2dBadKeyboard Protocol Error resource_id Values $ $ b TUT$ ne cc bUTUTd6 8$ b$ $ b $  ccsod UTUTd7 8 $ $ b $  ccUTUTUTd8 8Do dl64l$ b l64l cd'i `9 7high-order byte Do64-$ b 64- cd b `: 7UTvalue 64$ b $64 cd `; 7Xkmeaning UTR4Nx$ b R4Nx cd `< 7UTlow-order byte UTl6El $ b l6El  ce UTUTh= =UTsXkbErr_BadDevice 6E- $ b res6E-  ce$ UTUT`> =T0xff 6E $ b T6E  ce$ b UTUT`D =device not found RENx $ b RENx  b ce UTUT` =device  1ID = l6Sl $ b l6Sl  cf4 UTUTh =dtXkbErr_BadClass 96S- $ b $6S-  cf- UTUT` = b0xfe 6S $ b $6S $ cf UTUT` =+device found, but it is of the wrong class NxRSNx $ b xRSNx  cf UTUT` =r class  1ID = l6al$ b l6al  cgUT UTUTh =rruXkbErr_BadId 6a-$ b 6a- e cg UTUT UTUT` = 0xfd 6a$ b 6ae cg UTUT UTUT  =ce,device found, class ok, but device does not URUT@ =1contain a feedback with the indicated  1ID = RaNx$ b bRaNx 6 cg  UTUT` =feedback  1ID = lf~ $ b& blf~ 6'  UTUT` logo doodad = bf $ b&f 'cf UTUT` {XkbLogoDoodadRec = f~ $ b&f~ 'R UTUT` cXkbLogoDoodad = i0$ b xi0Zl6 UTUT( pcuXKbSA_PtrBtn TURUTH pXkXkbSA_LockPtrBtn $ b UTZUT UTUT` p6XkbPtrBtnAction = bJ@$ becJ@ Z,dece UTUT` =bubtn ceP1$ b edP1 d Z R UTUT` =$16.1.6 i0 $ bgi0 [k I UTUTh! pXkbSA_SetPtrDflt  $ b [oda = UTUT`" pXkbPtrDfltAction = J@ $ bcfJ@ Xk[adR UTUT`y =dflt P1 $ bP1 UT[cXk UTUT`z =016.1.7 i0 $ bi0 ^ UTUTh{ prBXkbSA_ISOLock d$ aHH$ b THH|io$. {fcess 4. If  XkbAllocIndicatorMaps 4 was unable to allocate the indicators record, it reports a D 4Bad {Alloc 4 error.  *$ 40]To free memory used by the  indicators 4 member of an  {XkbDescRec 4 structure, use 7D A_XkbFreeIndicatorMaps. KUTUTl =3void C tXkbFreeIndicatorMaps =( xkb =)  =XURUTd ==XkbDescPtr xkb =;/* keyboard description structure */ k$ 4@sIf the  indicators 4 member of the keyboard description record pointed to by  xkb 4 is not  {NULL 4, xD chXkbFreeIndicatorMaps 4 frees the memory associated with the  indicators 4 member of  xkb 4. d$ akA_$HH$ b HH,, T/, UT UTl 2 DBells $ 4XThe core X protocol allows only applications to explicitly sound the system bell with a e , 4 iVgiven duration, pitch, and volume. Xkb extends this capability by allowing clients to 9 4heYattach symbolic names to bells, disable audible bells, and receive an event whenever the kF 4. dkeyboard bell is rung. For the purposes of this document, the  audible 4 bell is defined to be esS 4/*[the system bell, or the default keyboard bell, as opposed to any other audible sound gener th`D 4tiated elsewhere in the system. 4 u, 4,`You can ask to receive  {XkbBellNotify 4 events (see section 9.4) when any client rings toD 4 any one of the following: URUTd 1T =he default bell UPUTd 1$gA =ny bell on an input device that can be specified by a  }bell_class = and  }bell_id = pair UNUT$ 1,mA =ny bell specified only by an arbitrary name 1.  =( 1T =his is, from the servers point of view, cULUT =teQmerely a name, and not connected with any physical sound-generating device. Some sUJUT =y [client application must generate the sound, or visual feedback, if any, that is associated ls,UHUTD =enwith the name.) $ 4ke`You can also ask to receive  {XkbBellNotify 4 events when the server rings the default bell es 4/*[or if any client has requested events only (without the bell sounding) for any of the bell thD 4titypes previously listed. t$ 4]You can disable audible bells on a global basis (to set the  {AudibleBell 4 control, see i! 4[Chapter 10). For example, a client that replaces the keyboard bell with some other audible . 4be_cue might want to turn off the  {AudibleBell 4 control to prevent the server from also genUN; 4AYerating a sound and avoid cacophony. If you disable audible bells and request to receive HD {ULUXkbBellNotify 4 events, you can generate feedback different from the default bell. e]$ 4UT`You can, however, override the  {AudibleBell 4 control by calling one of the functions that cij 4aforce the ringing of a bell in spite of the setting of the  {AudibleBell 4 control  Xkb w fForceDeviceBell 4 or  XkbForceBell 4 (see section 9.3.3). In this case the server does not genD 4orerate a bell event. $ 4tyYJust as some keyboards can produce keyclicks to indicate when a key is pressed or repeati 4AuPing, Xkb can provide feedback for the controls by using special beep codes. The nt { k[AccessXFeedback 4 control is used to configure the specific types of operations that gen {D 4onXerate feedback. See section 10.6.3 for a discussion on  {AccessXFeedback 4 control. d $ 4diWThis chapter describes bell names, the functions used to generate named bells, and the s, D 4ee'events the server generates for bells. ]l 3YoEBell Names ver$ 4leWYou can associate a name to an act of ringing a bell by converting the name to an Atom ing 4pi\and then using this name when you call the functions listed in this chapter. If an event is ic) 4kb\generated as a result, the name is then passed to all other clients interested in receiving er6 {[XkbBellNotify 4 events. Note that these are arbitrary names and that there is no binding preC  4\to any sounds. Any sounds or other effects (such as visual bells on the screen) must be ThP 4 \generated by a client application upon receipt of the bell event containing the name. There en] 4 Tis no default name for the default keyboard bell. The server does generate some preonj 4Ydefined bells for the AccessX controls (see section 10.6.3). These named bells are shown dw 4\in Table 9.1; the name is included in any bell event sent to clients that have requested to D 4Yo&receive  {XkbBellNotify 4 events. d$ amngth uHH$ b lteHHH 4kb 0 aBl< 4pa l= 3in Audible BellsG /$> 4ZUsing Xkb you can generate bell events that do not necessarily ring the system bell. This <> 4[is useful if you need to use an audio server instead of the system beep. For example, when t bI> 4`an audio client starts, it could disable the audible bell (the system bell) and then listen for enV> { `XkbBellNotify 4 events (see section 9.4). When it receives a  {XkbBellNotify 4 event, the cD> 4beKaudio client could then send a request to an audio server to play a sound. n dx$? 4WYou can control the audible bells feature by passing the  {XkbAudibleBellMask 4 to d t? ]XkbChangeEnabledControls 4 (see section 10.1.1). If you set  {XkbAudibleBellMask 4 on, ? 4[the server rings the system bell when a bell event occurs. This is the default. If you set ? {XXkbAudibleBellMask 4 off and a bell event occurs, the server does not ring the system  D? 4]bell unless you call  XkbForceDeviceBell 4 or  XkbForceBell 4 (see section 9.3.3). $@ 4is[Audible bells are also part of the per-client auto-reset controls. For more information on ID@ 4an)auto-reset controls, see section 10.1.2. adA 3ysBell Functions n ldB 4XUse the functions described in this section to ring bells and to generate bell events. ti$ 4WThe input extension has two types of feedbacks that can generate bells bell feedback so 4iand keyboard feedback. Some of the functions in this section have  }bell_class 4 and  }bell_id 4 * 4happarameters; set them as follows: Set H }bell_class 4 to I {BellFeedbackClass 4 or J {KbdFeedse7 {teabackClass 4. A device can have more than one feedback of each type; set  }bell_id 4 to the eDD 4nd5particular bell feedback of  }bell_class 4 type. ed$ aa or HH$ b HHbe  per-cli 1 c ,M 4iobTable 9.2 shows the conditions that cause a bell to sound or an  {XkbBellNotifyEvent 4 to BLM 41be generated when a bell function is called.W ed 3s Generating Named Bells ts.$ 4 [To ring the bell on an X input extension device or the default keyboard, use  XkbDevice soD Bell. UDUTl =omgBool K tXkbDeviceBell =( display, window, device_id, bell_class, bell_id, percent, name =) ameUBUTd =fo=Display * display =;/* connection to the X server */ U@UTd =eeNWindow window =;/* window for which the bell is generated, or None */ ,U>UTd =t Uunsigned int device_spec =;/* device  1ID =, or  {XkbUseCoreKbd = */ s9U<UTd =\unsigned int bell_class =;/* X input extension bell class of the bell to be rung */ $FU:UTd = ^unsigned int bell_id =;/* X input extension bell  1ID = of the bell to be rung */ SU8UTd =e Dint percent =;/* bell volume, from -100 to 100 inclusive */ ot`U6UTd =?Atom name =;/* a name for the bell, or  {NULL = */  es$ 4s cSet  }percent 4 to be the volume relative to the base volume for the keyboard as described for theD u XBell 4. ice$ 4qNote that  }bell_class 4 and  }bell_id 4 indicate the bell to physically ring.  }name 4 is simply an dD 4)4arbitrary moniker for the client applications use. /*$ 4 XZTo determine the current feedback settings of an extension input device, use  XGetFeed bZbackControl 4. See the X input extension documentation for more information on  XGetD U<1FeedbackControl 4 and related data structures. $ 4on`If a compatible keyboard extension is not present in the X server,  XkbDeviceBell 4 immediin 4 jately returns  {False 4. Otherwise,  XkbDeviceBell  4rings the bell as specified for the display  4ot`and keyboard device and returns  {True 4. If you have disabled the audible bell, the server  D 4peXdoes not ring the system bell, although it does generate a  {XkbBellNotify 4 event. he"d 4 uVYou can call  XkbDeviceBell 4 without first initializing the keyboard extension. 7$ 4o WAs a convenience function, Xkb provides a function to ring the bell on the default keyhe DD 4sboard:  XkbBell. YU4UTl = tABool L tXkbBell =( display, window, percent, name =) XfU2UTd ==Display * display =;/* connection to the X server */ isU0UTd =at3Window window =;/* event window, or None*/  4U.UTd = sXint percent =;/* relative volume, which can range from -100 to 100 inclusive */ XU,UTd =vi7Atom name =;/* a bell name, or  {NULL = */ {d$ angr e HH$ b dicHH ** the aud2 s*$ 4pekIf a compatible keyboard extension isnt present in the X server,  XkbBell 4 calls  XBell  4with 4 u 4X{the specified  }display 4 and  }percent 4, and returns  {False 4. Otherwise,  XkbBell  4calls  XkbDeviide" ngwceBell 4 with the specified  }display, window, percent,  4and  }name 4, a  }device_spec 4 of  {XkbUseC(/ {, voreKbd 4, a  }bell_class  4of  {XkbDfltXIClass 4, and a  }bell_id  4of  {XkbDfltXIId, 4 and returns <D {in True 4. eveQ$ 4*/]If you have disabled the audible bell, the server does not ring the system bell, although it o^D 4 X.does generate a  {XkbBellNotify 4 event. sd 4ULPYou can call  XkbBell 4 without first initializing the keyboard extension. l 3!MGenerating Named Bell Events c$ 4VUsing Xkb, you can also generate a named bell event that does not ring any bell. This D 4 eOallows you to do things such as generate events when your application starts. 4 u$ 4X\For example, if an audio client listens for these types of bells, it can produce a whoosh X 4 ]sound when it receives a named bell event to indicate a client just started. In this manner,  4, Sapplications can generate start-up feedback and not worry about producing annoying claD 4 b)beeps if an audio server is not running. X$ 4d [To cause a bell event for an X input extension device or for the keyboard, without ringing dib D 4r 4the corresponding bell, use  XkbDeviceBellEvent. UTUTl =ernBool N tXkbDeviceBellEvent =( display, window, device_spec, bell_class, bell_id, percent, name =) ,URUTd =enUTd =Xint percent =;/* relative volume, which can range from -100 to 100 inclusive */ bNU<UTd =re7Atom name =;/* a bell name, or  {NULL = */ rcea$ 4ol^If a compatible keyboard extension isnt present in the X server,  XkbBellEvent 4 immedin 4mately returns  {False 4. Otherwise,  XkbBellEvent  4calls  XkbDeviceBellEvent 4 with the speciC{ 4ULzfied  }display, window, percent,  4and  }name 4, a  }device_spec 4 of  {XkbUseCoreKbd 4, a  }bell_class d$ afctono HH$ b HHin))vent. cl3) 4Evhof  {XkbDfltXIClass 4, and a  }bell_id  4of  {XkbDfltXIId, 4 and returns what  XkbDevicectD r BellEvent 4 returns. 8Wi*d ;:XkbBellEvent 4 generates a  {XkbBellNotify 4 event. ?d 4UYou can call  XkbBellEvent 4 without first initializing the keyboard extension. eXl 3;(YForcing a Server-Generated BellP l$ 4If]To ring the bell on any keyboard, overriding user preference settings for audible bells, use yD atXkbForceDeviceBell 4. OUTUTl =elhBool Q tXkbForceDeviceBell =( display, window, device_spec, bell_class, bell_id, percent =) , URUTd = }=Display * display =;/* connection to the X server */ }UPUTd =4Window window =;/* event window, or None */ UNUTd =Uunsigned int device_spec =;/* device  1ID =, or  {XkbUseCoreKbd = */ ULUTd =Uunsigned int bell_class =;/* input extension class of the bell to be rung */ oUJUTd = Wunsigned int bell_id =;/* input extension  1ID = of the bell to be rung */ UHUTd =elXint percent =;/* relative volume, which can range from -100 to 100 inclusive */ X$ 4th]If a compatible keyboard extension isnt present in the X server,  XkbForceDeviceBell 4 r 4iimmediately returns  {False 4. Otherwise,  XkbForceDeviceBell  4rings the bell as specified for u 4kthe display and keyboard device and returns  {True 4. Set  }percent 4 to be the volume relative to , d 4ladthe base volume for the keyboard as described for  XBell 4. There is no  }name 4 parameter er"D 4Rbecause  XkbForceDeviceBell  4does not cause an  {XkbBellNotify 4 event. 7d 4dPYou can call  XkbBell 4 without first initializing the keyboard extension. L$ 4ZTo ring the bell on the default keyboard, overriding user preference settings for audible YD 4b!bells, use  XkbForceBell 4. nUFUTl = t8 =Bool R tXkbForceBell =( display, percent) {UDUTd =, unsigned longserial;/* X server serial number for event */ CUNUT =o @Boolsend_event;/*  {True = => synthetically generated */ ThPULUT =yJDisplay *display;/*  1server connection where event generated  =*/ ]UJUT =ev;Timetime;/*  1server time when event generated = */ elljUHUT = +intxkb_type;/*  pXkbBellNotify = */ hspwUFUT =lBUunsigned intdevice;/* Xkb device  1ID =, will not be  pXkbUseCoreKbd = */ UDUT =th1intpercent;/* requested volume as % of max */ UBUT =(intpitch;/* requested pitch in Hz */ U@UT =8intduration;/* requested duration in microseconds */ U>UT =Aunsigned intbell_class;/* X input extension feedback class */ hU<UT =e Cunsigned intbell_id;/* X input extension feedback  1ID = */ edeU:UT =ot+Atomname;/* name of requested bell */ kb U8UT =nt3Windowwindow;/* window associated with event */ al;U6UT =l KBoolevent_only;/*  {False = -> the server did not produce a beep */ > sU4UTL =at"} T XkbBellNotifyEvent =; , 4 1``If your application needs to generate visual bell feedback on the screen when it receives a me D 4teMbell event, use the window ID in the  {XkbBellNotifyEvent 4, if present. pd$ a X n bHH$ b thHHue*/ UB *5  UT UTl@ 2 *Keyboard ControlsU $A 4quTThe Xkb extension is composed of two parts: a server extension, and a client-side X X,A 4eeZlibrary extension. This chapter discusses functions used to modify controls effecting the 9A 4U:Ybehavior of the server portion of the Xkb extension. Chapter 11 discusses functions used oFA 4w _to modify controls that affect only the behavior of the client portion of the extension; those r dSDA 4ee(controls are known as Library Controls. bBh$ 4; XXkb contains control features that affect the entire keyboard, known as global keyboard e u 4ei[controls. Some of the controls may be selectively enabled and disabled; these controls are , i 4bknown as the V fBoolean Controls 4. Boolean Controls can be turned on or off under program  4thZcontrol and can also be automatically set to an on or off condition when a client program  4 *eexits. The remaining controls, known as the  fNon-Boolean Controls 4, are always active. The { e {ie\XkbControlsRec 4 structure describes the current state of most of the global controls and mo 4ct\the attributes effecting the behavior of each of these Xkb features. This chapter describes diD 4us-the Xkb controls and how to manipulate them. a$B 4beZThere are two possible components for each of the Boolean Controls: attributes describing B 4ntWhow the control should work, and a state describing whether the behavior as a whole is rd,B 4eyYenabled or disabled. The attributes and state for most of these controls are held in the DB {nt1XkbControlsRec 4 structure (see section 10.8). $> 4sUYou can manipulate the Xkb controls individually, via convenience functions, or as a o!> 4au_whole. To treat them as a group, modify an  {XkbControlsRec 4 structure to describe all of rem.> 4noUthe changes to be made, and then pass that structure and appropriate flags to an Xkb e;> 44]library function, or use a  {XkbControlsChangesRec 4 (see section 10.10.1) to reduce nettH> 4ffXwork traffic. When using a convenience function to manipulate one control individually, UD> 4ro=you do not use an  {XkbControlsRec 4 structure directly. jBlU 4ne9The Xkb controls are grouped as shown in Table 10.1. d$ adorwhheHH$ b BHHxleate for 6co $V 4BXThe individual categories and controls are described first, together with functions for puV 4olYmanipulating them. A description of the  {XkbControlsRec 4 structure and the general hDV 4ifYfunctions for dealing with all of the controls at once follow at the end of the chapter. elX 3th8Controls that Enable and Disable Other ControlsW $Y 4liWEnable and disable the boolean controls under program control by using the  {EnabledttY {ffSControls 4 control; enable and disable them upon program exit by configuring the llyDY {>AutoReset 4 control. {lZ 3 s$ The XEnabledControls Control ne0$[ 4 a]The  {EnabledControls 4 control is a bit mask where each bit that is turned on means the =[ 4whWcorresponding control is enabled, and when turned off, disabled. It corresponds to the J[ denabled_ctrls 4 field of an  {XkbControlsRec 4 structure (see section 10.8). The bits describibWD[ 4 wCing which controls are turned on or off are defined in Table 10.7. ptild\ 4onXUse  XkbChangeEnabledControls 4 to manipulate the  {EnabledControls 4 control. llUDUTl =t jBool Y tXkbChangeEnabledControls =( dpy =,  device_spec =,  mask =,  values =) UBUTd =6Display * dpy =;/* connection to X server */ U@UTd =l Dunsigned int device_spec =;/* keyboard device to modify */ ; U>UTd = tIunsigned int mask =;/* 1 bit -> controls to enable / disable */ U<UTd =Gunsigned int values =;/* 1 bit => enable, 0 bit => disable */ 4 a$ 4oneThe  }mask 4 parameter specifies the boolean controls to be enabled or disabled, and the  }vals } e^ues 4 mask specifies the new state for those controls. Valid values for both of these masks  4n Xare composed of a bitwise inclusive OR of bits taken from the set of mask bits in Table wD 4lsL10.7, using only those masks with ok in the  }enabled_ctrls 4 column.  $ 4CoZIf the X server does not support a compatible version of Xkb or the Xkb extension has not  4abgbeen properly initialized,  XkbChangeEnabledControls 4 returns  {False 4; otherwise, it sends plaD 4/6the request to the X server and returns  {True 4. 3$ 4_s^Note that the  {EnabledControls 4 control only enables and disables controls; it does not @ 4s ^configure them. Some controls, such as the  {AudibleBell 4 control, have no configuration M 4*/Xattributes and are therefore manipulated solely by enabling and disabling them. Others, enZ 4 aRhowever, have additional attributes to configure their behavior. For example, the g {algRepeatControl 4 control uses  repeat_delay 4 and  repeat_interval 4 fields to describe the om t 4\timing behavior of keys that repeat. The  {RepeatControl 4 behavior is turned on or off rld$ ae somtiHH$ b t HHbe**  Xkb7on* 4eepending on the value of the  {XkbRepeatKeysMask 4 bit, but you must use other means, TrD 4Das described in this chapter, to configure its behavior in detail. nd.l 3; "'The ZAutoReset Control[ B$ 4 cVYou can configure the boolean controls to automatically be enabled or disabled when a O 4nd[program exits. This capability is controlled via two masks maintained in the X server on a 4 a\ 4di[per-client basis. There is no client-side Xkb data structure corresponding to these masks. onti 4es_Whenever the client exits for any reason, any boolean controls specified in the  auto-reset \tiv eycmask 4 are set to the corresponding value from the  auto-reset values 4 mask. This makes it  4\possible for clients to clean up after themselves automatically, even if abnormally termiD 4Znated. The bits used in the masks correspond to the  {EnabledControls 4 control bits. $ 4asXFor example, a client that replaces the keyboard bell with some other audible cue might pt 4ts^want to turn off the  {AudibleBell 4 control to prevent the server from also generating a  4ig\sound and avoid cacophony. If the client were to exit without resetting the  {AudibleBell pr 4caacontrol, the user would be left without any feedback at all. Setting  {AudibleBell 4 in both l 4isZthe auto-reset mask and auto-reset values guarantees that the audible bell will be turned D 4exback on when the client exits. ontd 4th[To get the current values of the auto-reset controls, use  XkbGetAutoResetControls 4. e UTUTl =es_Bool \ tXkbGetAutoResetControls =( dpy =,  auto_ctrls =,  auto_values =) vesURUTd =ve6Display * dpy =;/* connection to X server */ )UPUTd =madunsigned int * auto_ctrls =;/* specifies which bits in  auto_values = are relevant */ t 6UNUTd =ke]unsigned int * auto_values =;/* 1 bit => corresponding control has auto-reset on */ AI$ trpXkbGetAutoResetControls 4 backfills  }auto_ctrls 4 and  }auto_values 4 with the  {AutoReset 4 cone VD 4septrol attributes for this particular client. It returns  {True 4 if successful, and  {False 4 otherwise. tik$] 4 bTo change the current values of the  {AutoReset 4 control attributes, use  XkbSetAutoResetxD] ur Controls. ULUTl^ = opBool ] tXkbSetAutoResetControls =( dpy =,  changes =,  auto_ctrls =,  auto_values =) bGUJUTd =s6Display * dpy =;/* connection to X server */ UHUTd =dUunsigned int changes =;/* controls for which to change auto-reset values */ UFUTd =ec`unsigned int * auto_ctrls =;/* controls from changes  1that  =should auto reset */ biUDUTd =ueCunsigned int * auto_values =;/* 1 bit => auto-reset on */ o_v$ it[XkbSetAutoResetControls  changes the auto-reset status and associated auto-reset values  4 tohfor the controls selected by  }changes . For any control selected by  }changes , if the correfo clcsponding bit is set in  }auto_ctrls , the control is configured to auto-reset when the client cha lugexits. If the corresponding bit in  }auto_values  is on, the control is turned on when the client UL Boaexits; if zero, the control is turned off when the client exits. 4 For any control selected by a }UTichanges 4, if the corresponding bit is not set in  }auto_ctrls 4, the control is configured to not "D 4on*reset when the client exits. For example: 7d JTo leave the auto-reset controls for  {StickyKeys  the way they are: LUBUTd =es,ok = XkbSetAutoResetControls(dpy, 0, 0, 0);  _$ \To change the auto-reset controls so that  {StickyKeys  are unaffected when the client aulD d exits: d aU@UTd = 4 set  pDetectableAutorepeat = */ 1UHUTd4 =jBool * supported_rtrn =; /* backfilled  {True = if  pDetectableAutorepeat = supported */ D$5 ,YXkbSetDetectableAutorepeat 4 sends a request to the server to set  {DetectableAutorelQ5 {r peat 4 on for the current client if  }detectable 4 is  {True 4, and off it  }detectable 4 is  {False 4; it then ^5 4Toowaits for a reply. If  }supported_rtrn 4 is not  {NULL 4,  XkbSetDetectableAutorepeat 4 backfills 4ork5 }ivlsupported_rtrn 4 with  {True 4 if the server supports  {DetectableAutorepeat 4, and  {False 4 lex5 4ioaif it does not.  XkbSetDetectableAutorepeat 4 returns the current state of  {DetectableAuA5 {diotorepeat 4 for the requesting client:  {True 4 if  {DetectableAutorepeat 4 is set, and  {False 4 verD5 43 otherwise. dl 3* H5Controls for Keyboard Overlays (Overlay1 and Overlay2 Controls)i Bo, 4\A keyboard overlay allows some subset of the keyboard to report alternate jkeycodes when  4teZthe overlay is enabled. For example, a keyboard overlay can be used to simulate a numeric  4 oXor editing keypad on a keyboard that does not actually have one by reusing some portion 4 4; Wof the keyboard as an overlay. This technique is very common on portable computers and L D 4ct'embedded systems with small keyboards. $ 4d_VXkb includes direct support for two keyboard overlays, using the  {Overlay1 4 and  {aOverlay2 4 controls. When  {Overlay1 4 is enabled, all of the keys that are members of the e" 4_first keyboard overlay generate an alternate keycode. When  {Overlay2 4 is enabled, all of  i/ 4seXthe keys that are members of the second keyboard overlay generate an alternate keycode. d < 4 aWThe two overlays are mutually exclusive; any particular key may be in at most one overf tI 4orelay.  {Overlay1 4 and  {Overlay2 4 are boolean controls. As such, you may enable and disable vd$ aeyd HH$ b nbyHHb 4! the key ;er!V 4y dthem using either the  {EnabledControls 4 control or the  {AutoReset 4 control discussed in cD 4Xksection 10.1.1. u$ 4oa[To specify the overlay to which a key belongs and the alternate keycode it should generate   4endwhen that overlay is enabled, assign it either the  {XkbKB_Overlay1 4 or  {XkbKB_Overlay2 4 an"D 4. -key behaviors, as described in section 16.2. ;l 3th7:Controls for Using the Mouse from the Keyboardk nerO$ 4eyYUsing Xkb, it is possible to configure the keyboard to allow simulation of the X pointer a\ 4e [device. This simulation includes both movement of the pointer itself and press and release . Ai 4abZevents associated with the buttons on the pointer. Two controls affect this behavior: the v {\MouseKeys 4 control determines whether or not simulation of the pointer device is active,  4]as well as configuring the default button; the  {MouseKeysAccel 4 control determines the  4 iVmovement characteristics of the pointer when simulated via the keyboard. Both of them  4loPare boolean controls; as such, you may enable and disable them using either the t  {, ^EnabledControls 4 control or the  {AutoReset 4 control discussed in section 10.1.1. The  4sc\individual keys that simulate different aspects of the pointer device are determined by the rdD 4+keyboard mapping, discussed in Chapter 16. urel 3ll?The MouseKeys Controll $ 4e \The  {MouseKeys 4 control allows a user to control all the mouse functions from the key A 4ababoard. When  {MouseKeys 4 are enabled, all keys with  {MouseKeys 4 actions bound to them  D 4eK_generate core pointer events instead of normal  {KeyPress 4 and  {KeyRelease 4 events.  $ 4asiThe  {MouseKeys 4 control has a single attribute,  mk_dflt_btn 4 that specifies the core button o- 4tiZnumber to be used by mouse keys actions that do not explicitly specify a button. There is : 4 sano convenience function for getting or setting the attribute; instead use  XkbGetControls 4 oGD 4ut:and  XkbSetControls 4 (see sections 10.9 and 10.10). [UTUT$ {viVMouseKeys = can also be turned on and off by pressing the key combination necessary gURUT =Zto produce an  {XK_Pointer_EnableKeys = keysym. The de 1  =facto default standard sUPUTD =Rfor this is  {Shift+Alt+NumLock =, but this may vary depending on the keymap. l 3 A#DThe MouseKeysAccel Controlm Mo$ 4abZWhen the  {MouseKeysAccel 4 control is enabled, the effect of a key-activated pointer  4 iTmotion action changes as a key is held down. If the control is disabled, pressing a as 4sXmouse-pointer key yields one mouse event. When  {MouseKeysAccel 4 is enabled, mouse  4nu]movement is defined by an initial distance specified in the  {XkbSA_MovePtr 4 action and BL 4onUthe following fields in the  {XkbControlsRec 4 structure (see section 10.8).G d$ atlsd .1HH$ b soHHrby&ation ne<UT&U$ 4n YThere are no convenience functions to query or change the attributes of the  {MouseKeyb { isAccel 4 control; instead use  XkbGetControls 4 and  XkbSetControls 4 (see sections 10.9 and AoD 4Mo10.10). $` 4 ZThe effects of the attributes of the  {MouseKeysAccel 4 control depend on whether the D` {ct[XkbSA_MovePtr 4 action (see section 16.1) specifies relative or absolute pointer motion. 4s+UTUTlh y Absolute Pointer Motion {=$i 4 aIf an  {XkbSA_MovePtr 4 action specifies an absolute position for one of the coordinates but hJi 4r]still allows acceleration, all repeated events contain any absolute coordinates specified in uWi 4.8`the action. For example, if the  {XkbSA_MovePtr 4 action specifies an absolute position for di 4]the X direction, but a relative motion for the Y direction, the pointer accelerates in the Y &qDi 4n -direction, but stays at the same X position. rURUTla Relative Pointer Motion $ 4el^If the  {XkbSA_MovePtr 4 action specifies relative motion, the initial event always moves  4_the cursor the distance specified in the action. After  mk_delay 4 milliseconds, a second co 4et_motion event is generated, and another occurs every  mk_interval 4 milliseconds until the bsoD 4n.user releases the key. $ 4 M]Between the time of the second motion event and  mk_time_to_max 4 intervals, the change  4rdbin pointer distance per interval increases with each interval. After  mk_time_to_max 4 inter 4if[vals have elapsed, the change in pointer distance per interval remains the same and is caleciD 4os^culated by multiplying the original distance specified in the action by  mk_max_speed 4. $ 4te`For example, if the  {XkbSA_MovePtr 4 action specifies a relative motion in the X direction  4ntpof 5,  mk_delay 4=160,  mk_interval 4=40,  mk_time_to_max 4=30, and  mk_max_speed 4=30, the a,D 41following happens when the user presses the key: tAUPUTd 1 SThe pointer immediately moves 5 pixels in the X direction when the key is pressed. ed,MUNUT$ 1s gAfter 160 milliseconds ( mk_delay 1), and every 40 milliseconds thereafter ( mk_interval 1), YULUTD 1ee&the pointer moves in the X direction. eUJUT$ 1axPThe distance in the X direction increases with each interval until 30 intervals iqUHUTD 1 i(( mk_time_to_max 1) have elapsed. r}UFUT$ 1ifIAfter 30 intervals, the pointer stops accelerating, and moves 150 pixels eUDUT 1ci[( mk_max_speed 1 * the original distance) every interval thereafter, until the key is  UBUTD 1. released. $ 4pleThe increase in pointer difference for each interval is a function of  mk_curve. 4 Events after  4_dYthe first but before maximum acceleration has been achieved are accelerated according to 0"L 4the formula:N $ 4seaWhere  action_delta 4 is the relative motion specified by the  {XkbSA_MovePtr 4 action,  esbmk_max_speed  4and  mk_time_to_max 4 are parameters to the  {MouseKeysAccel 4 control,  4incand the curveFactor is computed using the  {MouseKeysAccel 4  mk_curve 4 parameter as fol di"L 4re lows: O es d$ aHUT_tmaHH$ b fAfHHupo  , and mo  VV= e T$ 4m_With the result that a  mk_curve 4 of zero causes the distance moved to increase linearly a"  4. Qfrom  action_delta 4 to P. A negative  mk_curve 4 causes an initial cn 4ve]sharp increase in acceleration that tapers off, and a positive curve yields a slower initial h{ 4teZincrease in acceleration followed by a sharp increase as the number of pointer events gen 4e berated by the action approaches  mk_time_to_max 4. The legal values for  mk_curve 4 are D 4_tbetween -1000 and 1000. o *"l 4ccMA distance vs. time graph of the pointer motion is shown in Figure 10.1.Q lb  qMouseKeys Acceleration foll 3GControls for Better Keyboard Access by Physically Impaired Personsn $ 4_tVThe Xkb extension includes several controls specifically aimed at making keyboard use  4moZmore effective for physically impaired people. All of these controls are boolean controls  4nc[and may be individually enabled and disabled, as well as configured to tune their specific gatL 44Ubehavior.  6The behavior of these controls is based on the AccessDOS packageR. fd$ ai hea iHH$ b tHHve,, 4e ber>ti,l 3to The SAccessXKeys Controlo m#$ 4VEnabling or disabling the keyboard controls through a graphical user interface may be 0 4 mRimpossible for people who need to use the controls. For example, a user who needs = {_SlowKeys 4 (see section 10.6.6) may not even be able to start the graphical application, let $ 4nsbalone use it, if  {SlowKeys 4 is not enabled. To allow easier access to some of the controls,  4ca_the  {AccessXKeys 4 control provides a set of special key sequences similar to those availind"L 4anable in pAccessDOS. nfi7$ 4r _When the  {AccessXKeys 4 control is enabled, the user can turn controls on or off from the cesDD 4 f;keyboard by entering the following standard key sequences: XUTUTdG 1[Holding down a shift key by itself for eight seconds toggles the  {SlowKeys 1 control. 4e dURUT$I 1tibPressing and releasing the left or right  Shift 1 key five times in a row, without any interpUPUTI 1rdSvening key events and with less than 30 seconds delay between consecutive presses, for|UNUTDI 1o 5toggles the state of the  {StickyKeys 1 control. ULUT$ 1KeVSimultaneously operating two or more modifier keys deactivates the  {StickyKeys 1 UJUTD 1 control. $ 4wK^When the  {AccessXKeys 4 control is disabled, Xkb does not look for the above special key D 4 4 sequences. vid$ 4l YSome of these key sequences optionally generate audible feedback of the change in state,   4Wh^as described in section 10.6.3, or  {XkbControlsNotify 4 events, described in section D 4 f10.11. d bl 3lo#ZThe AccessXTimeout Controlq UT$ 4in]In environments where computers are shared, features such as  {SlowKeys 4 present a probT  4sidlem: if  {SlowKeys 4 is on, the keyboard can appear to be runresponsive because keys are not ) 4ey[accepted until they are held for a certain period of time. To help solve this problem, Xkb 1o 6 4e ^provides an  {AccessXTimeout 4 control to automatically change the enabled/disabled state C 4iv[of any boolean controls and to change the value of the  {AccessXKeys 4 and  {AccessX{APD {trXFeedback 4 control attributes if the keyboard is idle for a specified period of time. s.e$ 4[When a timeout as specified by  {AccessXTimeout 4 occurs and a control is consequently , r 4Wh\modified, Xkb generates an  {XkbControlsNotify 4 event. For more information on  {Xkbn D { f3ControlsNotify 4 events, refer to section 10.11. out$ 4_Use  ,XkbGetAccessXTimeout 4 to query the current  {AccessXTimeout 4 options for a keyresD 4board device. UHUT, 1 Bool s tXkbGetAccessXTimeout 1( display 1,  device_spec 1,  timeout_rtrn 1,  ctrls_mask_rtrn 1,  d fUFUTD d Gctrls_values_rtrn 1,  options_mask_rtrn, options_values_rtrn 1) s aUDUTd 1ut:Display * display 1;/* connection to X server */ UBUTd 1Tunsigned int device_spec 1;/* device to query, or  wXkbUseCoreKbd 1 */ {U@UTd 1Sunsigned short * timeout_rtrn 1;/* delay until AccessXTimeout, seconds */ peU>UTd 1Sunsigned int * ctrls_mask_rtrn 1;/* backfilled with controls to modify */ conU<UTd 1ly]unsigned int * ctrls_values_rtrn 1;/* backfilled with on/off status for controls */ iU:UTd 1Xk^unsigned short * opts_mask_rtrn 1;/* backfilled with  ax_options 1 to modify */ U8UTd 1etaunsigned short * opts_values_rtrn 1;/* backfilled with values for  ax_options 1 */ 1$ . ^XkbGetAccessXTimeout 4 sends a request to the X server to obtain the current values for the > { aAccessXTimeout 4 attributes, waits for a reply, and backfills the values  into the appropritK _rrate arguments 4.   4The parameters  opts_mask_rtrn 4 and  opts_values_rtrn 4 are backfilled with d$ a q *HH$ b tHHde$, second k?UT lorux{~$ *X 4rn`the options to modify and the values for  ax_options 4, which is a field in the  {XkbCon_ve {/*ltrolsRec 4 structure (see section 10.8).  XkbGetAccessXTimeout  4returns   {True 4 if successr 4h Rful; if a compatible version of the Xkb extension is not available in the server, D ba0XkbGetAccessXTimeout 4 returns  {False 4. $ 4Xk]To configure the  {AccessXTimeout 4 options for a keyboard device, use  XkbSetAccessXD Ac Timeout 4. )UTUT, 1 fkBool t tXkbSetAccessXTimeout 1( display 1,  device_spec, timeout, ctrls_mask, ctrls_values, The6URUTD tsopts_mask, opts_values 1) luCUPUTd 1ck9Display * display 1;/* connection to X server */ qPUNUTd 1Wunsigned int device_spec 1;/* device to configure, or  wXkbUseCoreKbd 1 */ ]ULUTd 1sePunsigned short timeout 1;/* seconds idle until AccessXTimeout occurs */ tojUJUTd 1luCunsigned int ctrls_mask 1;/* boolean controls to modify */ wUHUTd 1sR_unsigned int ctrls_values 1;/* new bits for controls selected by  ctrls_mask 1 */ cesUFUTd 1 Funsigned short opts_mask 1;/*  ax_options 1 to change */ UDUTd 1iunsigned short opts_values 1;/* new bits for  ax_options 1 selected by  opts_mask 1 */ $ 4^timeout 4 specifies the number of seconds the keyboard must be idle before the controls are  4BoXmodified.  ctrls_mask 4 specifies what controls are to be enabled or disabled, and c UR`ctrls_values 4 specifies whether those controls are to be enabled or disabled. The bit values /* 4erZcorrespond to those for enabling and disabling boolean controls (see section 10.1.1). The  1fopts_mask 4 field specifies which attributes of the  {AccessXKeys 4 and  {AccessXFeedback 4  4`controls are to be changed, and  opts_values 4 specifies the new values for those options. sR 4cjThe bit values correspond to those for the  ax_options 4 field of an  {XkbDescRec 4 (see section D 4ma10.8). /* $ t`XkbSetAccessXTimeout 4 sends a request to configure the  {AccessXTimeout 4 control to the on! 4 lserver.   4It does not wait for a reply, and normally returns  {True 4. If a compatible version of e .D 4s fthe Xkb extension is not available in the server,  XkbSetAccessXTimeout 4 returns  {False 4. Gl 3$The aAccessXFeedback Controlu es[$ 4trYJust as some keyboards can produce keyclicks to indicate when a key is pressed or repeatsh 4 dTing, Xkb can provide feedback for the controls by using special beep codes. Use the  u {icXAccessXFeedback 4 control to configure the specific types of operations that generate coD 4ha feedback. $ 4sp]There is no convenience function for modifying the  {AccessXFeedback 4 control, although t 4x_[the feedback as a whole can be enabled or disabled just as other boolean controls are (see  4etZsection 10.1). Individual beep codes are turned on or off by modifying the following bits   4 qin the v ax_options 4 field of an  {XkbControlsRec 4 structure and using  XkbSetControls 4 (see BL 4thsection 10.10):f ad$ amut. HH$ b oroHH ards canl@ic lorux{~$I 4RImplementations that cannot generate continuous tones may generate multiple beeps I 4 \instead of falling and rising tones; for example, they can generate a high-pitched beep fols I 4Xlowed by a low-pitched beep instead of a continuous falling tone. Other implementations ifI 4sXEcan only ring the bell with one fixed pitch. In these cases, use the  I 4edjw {XkbAX_DumbBellFBMask 4 bit of  ax_options 4 to indicate that the bell can only ring with a DI 4on fixed pitch. f,J 4 b_When any of the above feedbacks occur, Xkb may generate a  {XkbBellNotify 4 event (see ureDJ 4Sesection 9.4). lK 3iAccessXNotify Eventsx ,M 4$\The server can generate  {XkbAccessXNotify 4 events for some of the global keyboard DM 4Scontrols. The structure for the  {XkbAccessXNotify 4 event type is as follows: 1UHUT$N =Itypedef struct { n>UFUTN 4ra9inttype;/*  =Xkb extension base event code 4 */ KUDUTN 4ofHunsigned longserial;/*  =X server serial number for event 4 */ eeXUBUTN 4FBoolsend_event;/*  {True = => synthetically generated 4 */ eU@UTN 4taLDisplay *display;/*  1server connection where event generated  4*/ thrU>UTN 4 =Timetime;/*  1server time when event generated 4 */ U<UTN 4o 0intxkb_type;/*  pXkbAccessXNotify 4 */ U:UTN 4d Vintdevice =;/* Xkb device  1ID =, will not be  pXkbUseCoreKbd 1  =*/ U8UTN =ifintdetail;/* XkbAXN_* */ U6UTN =9.'KeyCodekeycode;/* key of event */ fy U4UTN =3intslowKeysDelay;/* current SlowKeys delay */ ssXU2UTN =fo3intdebounceDelay;/* current debounce delay */ ScoU0UTLN =ur%} y XkbAccessXNotifyEvent =; t$O 4s:aThe  -detail 4 field describes what AccessX event just occurred and can be any of the values BLO 4 in Table 10.4.j 4ofd$ asiaeeUBHH$ b {ruHH{ gNA * $` 4^The  keycode 4 field reports the keycode of the key for which the event occurred. If the ` 4 maction is related to  {SlowKeys 4, the  slowKeysDelay 4 field contains the current  {SlowKeys 4 "` 4Ikacceptance delay. If the action is related to  {BounceKeys 4, the  debounceDelay 4 field contains /D` 4k/the current  {BounceKeys 4 debounce delay. =EUTUTda aySelecting for AccessX Events /W$k 4N\To receive  {XkbAccessXNotify 4 events under all possible conditions, use  XkbSelectbAdk =eEvents 4 (see section 4.3) and pass  {XkbAccesXNotifyMask 4 in both  }bits_to_change 4 and eqDk } values_for_bits 4. n$l 4of_To receive  {XkbStateNotify 4 events only under certain conditions, use  XkbSelectEventl fDetails 4 using  {XkbAccessXNotify 4 as the  }event_type 4 and specifying the desired state BLl 4cchanges in  }bits_to_change 4 and  }values_for_bits 4 using mask bits from Table 10.5.b `Ilh 3la1StickyKeys, RepeatKeys, and MouseKeys Events f]$_ 6cudThe  {StickyKeys 6,  {RepeatKeys 6, and  {MouseKeys 6 controls do not generate specific Kej_ 6bofevents. Instead, the latching, unlatching, locking 4, 6 or unlocking of modifiers using  {Stickw _ {aybyKeys 6 generates  {XkbStateNotify 6 events as described in section 5.4. Repeating keys _ 6nd^generate normal  {KeyPress 6 and  {KeyRelease 6 events, though the auto-repeat can be _ 6 adetected using  {DetectableAutorepeat 6 (see section 10.3.3). Finally,  {MouseKeys 6 genfD_ 6kbEerates pointer events identical to those of the core pointer device. Ely 3The tSlowKeys Control $z 44USome users may accidentally bump keys while moving a hand or typing stick toward the ez 4ha\key they want. Usually, the keys that are accidentally bumped are just hit for a very short laz 4at`period of time. The  {SlowKeys 4 control helps filter these accidental bumps by telling the an z 4 gserver to wait a specified period, called the  SlowKeys acceptance delay 4, before delivering ingz 4ki\key events. If the key is released before this period elapses, no key events are generated. fy z 4crVUsers can then bump any number of keys on their way to the one they want without acciz 4as[dentally getting those characters. Once they have reached the key they want, they can then leAd$ a, {HH$ b ohoHH d** 3ThB C*&z 4z^hold the desired key long enough for the computer to accept it.  {SlowKeys 4 is a boolean 3Dz 4ke*control with one configurable attribute. H${ 4e bWhen the  {SlowKeys 4 control is active, the server reports the initial key press, subsequent U{ 4deZacceptance or rejection, and release of any key to interested clients by sending an approbL{ 4ys=priate  {AccessXNotify 4 event (see section 10.6.4). i$| 4he]To get the  {SlowKeys 4 acceptance delay for a keyboard device, use  XkbGetSlowKeysDerD| um lay 4. r)UTUTl} =wa_Bool  tXkbGetSlowKeysDelay =( display =,  device_spec =,  delay_rtrn =) th6URUTd~ =e :Display * display =;/* connection to X server */ CUPUTd 1 {Munsigned int device_spec 1;/* device ID, or  wXkbUseCoreKbd 1 */ oPUNUTd 1Uunsigned int * delay_rtrn 1;/* backfilled with  wSlowKeys 1 delay, ms */ tc$ ,g aXkbGetSlowKeysDelay  4requests the attributes of the  {SlowKeys 4 control from the server, ip 4e fwaits for a reply and backfills  }delay_rtrn  4with the  {SlowKeys 4 delay attribute.  ,Xkb} ,ubjGetSlowKeysDelay ,  4returns 4  {True 4 if successful; if a compatible version of the Xkb extenD 4Xsion is not available in the server,  ,XkbGetSlowKeysDelay 4 returns  {False 4. |d 4 {eTo set the  {SlowKeys 4 acceptance delay for a keyboard device, use  XkbSetSlowKeysDelay 4. aULUTl 1ZBool  tXkbSetSlowKeysDelay 1( display 1,  device_spec 1,  delay 1) UJUTd 1UR9Display * display 1;/* connection to X server */ nUHUTd 1UPWunsigned int device_spec 1;/* device to configure, or  wXkbUseCoreKbd 1 */ 1 UFUTd 1>unsigned int delay 1;/*  wSlowKeys 1 delay, ms */ $ y,lXkbSetSlowKeysDelay 4 sends a request to configure the  {SlowKeys 4 control to the server.   4It fr 4pdoes not wait for a reply, and normally returns  {True 4. Specifying a value of  {0 4 for the  }delay , 4gparameter causes  XkbSetSlowKeys 4 to generate a  {BadValue 4 protocol error. If a compatible ex 4`version of the Xkb extension is not available in the server  XkbSetSlowKeysDelay 4 returns "D {To False 4. Slo;l 3ceuThe BounceKeys Control  O$ 4laXSome users may accidentally bounce on a key when they release it. They press it once, vi\ 4elcthen accidentally press it again after they release it. The  {BounceKeys 4 control temporarily di 4Udisables a key after it has been pressed, effectively debouncing the keyboard. The v  4 ifperiod of time the key is disabled after it is released is known as the  BounceKeys delay 4. D {gu%BounceKeys 4 is a boolean control. s$ 4fraWhen the  {BounceKeys 4 control is active, the server reports acceptance or rejection of any l 4r ]key to interested clients by sending an appropriate  {AccessXNotify 4 event (see section D 4co 10.6.4). $ 4_Use  XkbGetBounceKeysDelay 4 to query the current  {BounceKeys 4 delay for a keyboard elaD 4device. UDUTl 1loaBool  tXkbGetBounceKeysDelay 1( display 1,  device_spec 1,  delay_rtrn 1) nUBUTd 1a 9Display * display 1;/* connection to X server */ U@UTd 1idMunsigned int device_spec 1;/* device ID, or  wXkbUseCoreKbd 1 */ mU>UTd 1Punsigned int * delay_rtrn 1;/* backfilled with bounce keys delay, ms */ he#$ ]XkbGetBounceKeysDelay  4requests the attributes of the  {BounceKeys 4 control from the 0 4 iserver, waits for a reply, and backfills  }delay_rtrn  4with the  {BounceKeys 4 delay attribute. yd$ a ce lHH$ b sHH\ ))t (see sC)= iXkbGetBounceKeysDelay ,  6returns   {True 6 if successful; if a compatible version of the Xkb bJD 6\extension is not available in the server  XkbGetSlowKeysDelay 6 returns  {False 6. 1d 4 1^To set the  {BounceKeys 4 delay for a keyboard device, use  XkbSetBounceKeysDelay 4. UTUTl 1\Bool  tXkbSetBounceKeysDelay 1( display 1,  device_spec 1,  delay 1) UT)URUTd 1gn9Display * display 1;/* connection to X server */ s6UPUTd 1Wunsigned int device_spec 1;/* device to configure, or  wXkbUseCoreKbd 1 */  4CUNUTd 1 9unsigned int delay 1;/* bounce keys delay, ms */ lV$ ]XkbSetBounceKeysDelay 4 sends a request to configure the  {BounceKeys 4 control to the ec 4oserver.   4It does not wait for a reply and normally returns  {True 4. Specifying a value of  {zero e sp 4mfor the  }delay  4parameter causes  XkbSetBounceKeysDelay 4 to generate a  {BadValue 4 protocol } 4 b_error. If a compatible version of the Xkb extension is not available in the server,  XkbSets D +BounceKeysDelay 4 returns  {False 4. 4 l 3rdThe vStickyKeys Control Del$ 4[Some people find it difficult or even impossible to press two keys at once. For example, a lay 4lone-fingered typist or someone using a mouth stick cannot press the  Shift 4 and  1 4 keys at the ic 4vi^same time. The  {StickyKeys 4 control solves this problem by changing the behavior of the  4dedmodifier keys. With  {StickyKeys 4, the user can first press a modifier, release it, then press eK 4 tWanother key. For example, to get an exclamation point on a PC-style keyboard, the user ns D 4ifPcan press the  Shift 4 key, release it, and then press the  1 4 key. ca $ {ncYStickyKeys 4 also allows users to lock modifier keys without requiring special locking o 4f ^keys. When  {StickyKeys 4 is enabled, a modifier is latched when the user presses it just ' 4 ^once. The user can press a modifier twice in a row to lock it, and then unlock it by pressing 4D 4diit one more time. I$ 4o YWhen a modifier is latched, it becomes unlatched when the user presses a nonmodifier key aV 4t por a pointer button. For instance, to enter the sequence  {Shift 4+ {Control 4+ Z 4 the user could l c 4m qpress and release the  Shift 4 key to latch it, then press and release the  Control 4 key to latch it, ep 4eaeand finally press and release the Z key. Because the  Control 4 key is a modifier key, pressing -} 4e jit does not unlatch the  Shift 4 key. Thus, after the user presses the  Control 4 key, both the  {lShift 4 and  {Control 4 modifiers are latched. When the user presses the  Z 4 key, the effect is  4 {vas though the user had pressed  {Shift 4+ {Control 4+ Z 4. In addition, because the  Z 4 key is not D 4twOa modifier key, the  {Shift 4 and  {Control 4 modifiers are unlatched. one$ 4ZLocking a modifier key means that the modifier affects any key or pointer button the user  4\presses until the user unlocks it or it is unlocked programmatically. For example, to enter ol 4 u]the sequence (XKB) on a keyboard where ( is a shifted 9, ) is a shifted 0, and s 4dis a shifted single quote, the user could press and release the  Shift 4 key twice to lock the t { kShift 4 modifier. Then, when the user presses the  9 4,   4,  x 4,  k 4,  b 4,   4, and  0 4 keys in sequence, it  4jgenerates (XKB). To unlock the  {Shift 4 modifier, the user can press and release the  Shift 4 D 4key. {$ {erZStickyKeys 4 is a boolean control with two separate attributes that may be individually ) 4Yconfigured: one to automatically disable it, and one to control the latching behavior of e6D 4modifier keys. ierd$ ayr HH$ b st HHra** to enteD*MULUTl KBwStickyKeys Options i_$ 4)eThe  {StickyKeys 4 control has two options that can be accessed via the  ax_options 4 of an el  {tbXkbControlsRec 4 structure (see section 10.8). The first option,  {TwoKeys 4, specifies y  4 ^whether  {StickyKeys 4 should automatically turn off when two keys are pressed at the  4s Ysame time. This feature is useful for shared computers so people who do not want them do  4bnot need to turn  {StickyKeys 4 off if a previous user left  {StickyKeys 4 on. The second   4uagoption,  {LatchToLock 4, specifies whether or not  {StickyKeys 4 locks a modifier when hav"D 4pressed twice in a row. er7$ 4fUse  ,XkbGetStickyKeysOptions 4 to query the current  {StickyKeys 4 attributes for a keyboard DD 4device. *XUTUTl 1*eBool  tXkbGetStickyKeysOptions 1( display 1,  device_spec 1,  options_rtrn 1) heURUTd 149Display * display 1;/* connection to X server */ xrUPUTd 1 eMunsigned int device_spec 1;/* device ID, or  wXkbUseCoreKbd 1 */ tUNUTd 1woSunsigned int * options_rtrn 1;/* backfilled with StickyKeys option mask */ ati$ ,n cXkbGetStickyKeysOptions   4requests the attributes of the  {StickyKeys 4 control from the ers 4noaserver, waits for a reply, and backfills  }options_rtrn  4with a mask indicating whether the fD 44]individual  {StickyKeys 4 options are on or off. Valid bits in  }options_rtrn 4 are: df { XkbAX_TwoKeysMask dg {XkbAX_LatchToLockMask $j ,gXkbGetStickyKeysOptions  6returns 4  {True 6 if successful; if a compatible version of the Xkb a kDj 6`extension is not available in the server  ,XkbGetStickyKeysOptions 6 returns  {False 6. ,d 4,eTo set the  qStickyKeys 4 attributes for a keyboard device, use  XkbSetStickyKeysOptions 4. xULUTl 1 e]Bool  tXkbSetStickyKeysOptions 1( display 1,  device_spec, mask, values 1) 'UJUTd 1 *9Display * display 1;/* connection to X server */ n4UHUTd 1Ounsigned int device_spec 1;/* device to configure, or XkbUseCoreKbd */ StiAUFUTd 1l Junsigned int mask 1;/* selects StickyKeys attributes to modify */ NUDUTd 14Cunsigned int values; 1/* values for selected attributes */  {a$ ,ti_XkbSetStickyKeysOptions 4 sends a request to configure the  {StickyKeys 4 control to the sk n 4jserver.   4It does not wait for a reply and normally returns  {True 4. The valid bits to use for {D 4blUboth 6  4the 6  }mask 6  4and 6  }values 6  4parameters are 6: $ | {sOXkbAX_TwoKeysMask D | {XkbAX_LatchToLockMask $e 6sb  4If a compatible version of the Xkb extension is not available in the server,  ,XkbSetStickDe ,ti(yKeysOptions 4 returns  {False 4. vil 3ue.zControls for General Keyboard Mapping $ 4ctWThere are several controls that apply to the keyboard mapping in general. They control co 4CoWhandling of out-of-range group indices and how modifiers are processed and consumed in butD 4UDthe server. These are: ilm {GroupsWrap ect)ln { {IgnoreGroupLock Xk7lo {onIgnoreLockMods toElp {SInternalMods d$ a ep aHH$ b tsHHl''he 6 E4'Ydq {pFIgnoreGroupLock 4 is a boolean control; the rest are always active. n$ 4tcWWithout the modifier processing options provided by Xkb, passive grabs set via translat a{ 4rv\tions in a client (for example,  {Altspace 4) do not trigger if any modifiers  4ro\other than those specified by the translation are set. This results in problems in the user y  4pp^interface when either  {NumLock 4 or a secondary keyboard group is active. The  {Ignore { p_LockMods 4 and  {IgnoreGroupLock 4 controls make it possible to avoid this behavior with"D 4Lout exhaustively specifying a grab for every possible modifier combination. ds;l 3p#{The GroupsWrap Control O$ 4\The  {GroupsWrap 4 control determines how illegal groups are handled on a global basis. \ 4VThere are a number of valid keyboard sequences that can cause the effective group numi 4leXber to go out of range. When this happens, the group must be normalized back to a valid invD 4 bDnumber. The  {GroupsWrap 4 control specifies how this is done. a$ 4leRWhen dealing with group numbers, all computations are done using the group index,  4 sOwhich is the group number minus one. There are three different algorithms; the D {rf4GroupsWrap 4 control specifies which one is used: d UTUTl =heXkbRedirectIntoRange $ 4 aSAll invalid group numbers are converted to a valid group number by taking the last " 4ouVfour bits of the  {GroupsWrap 4 control and using them as the group index. If the D 4Gr1result is still out of range, Group one is used. hURUTl =4XkbClampIntoRange  $ 4 hQAll invalid group numbers are converted to the nearest valid group number. Group a 4caQnumbers larger than the highest supported group number are mapped to the highest t&D 4ro>supported group; those less than one are mapped to group one. ;UPUTl =XkbWrapIntoRange iM$ 4e.NAll invalid group numbers are converted to a valid group number using integer ZD 4up$modulus applied to the group index. to$ 4nu[There are no convenience functions for manipulating the  {GroupsWrap 4 control. Manipurol| 4nejlate the  {GroupsWrap 4 control via the  -groups_wrap 4 field in the  {XkbControlsRec 4 struc 4 viture, then use  ,XkbSetControls 4 and  ,XkbGetControls 4 (see section 10.9 and section 10.10) to nD 4e query and change this control. DUNUT$( =ilaSee also section 15.3.2 or a discussion of the related field,  group_info =, which also norhULUTD( =p -malizes a group under certain circumstances. pl 3#The IgnoreLockMods Control th$ 4d YThe core protocol does not provide a way to exclude specific modifiers from grab calculahD 4toYtions, with the result that locking modifiers sometimes have unanticipated side effects. r$ 4nv]The  {IgnoreLockMods 4 control specifies modifiers that should be excluded from grab cali 4`culations. These modifiers are also not reported in any core events except  {KeyPress 4 and pu {]KeyRelease 4 events that do not activate a passive grab and that do not occur while a grab o,D 4 is active. 4 vd$ a ,ctn HH$ b e HHqs ++$( =ilFti+A$ 4ofbManipulate the  {IgnoreLockMods 4 control via the  ignore_lock 4 field in the  {XkbConN {cejtrolsRec 4 structure, then use  XkbSetControls 4 and  XkbGetControls 4 (see sections 10.9 and [D 4 tZ10.10) to query and change this control. Alternatively, use  XkbSetIgnoreLockMods 4. $ 4fi[To set the modifiers that, if locked, are not to be reported in matching events to passive 4D 4 m%grabs, use  XkbSetIgnoreLockMods. r)UTUT, =jBool  tXkbSetIgnoreLockMods =( display, device_spec, affect_real, real_values, affect_virtual, 6URUTD virtual_values =) s CUPUTd =te=Display * display =;/* connection to the X server */ PUNUTd =e.Uunsigned int device_spec =;/* device  1ID =, or  wXkbUseCoreKbd = */ ]ULUTd! =$Vunsigned int affect_real =;/* mask of real modifiers affected by this call */ jUJUTd" =_unsigned int real_values =;/* values for affected real modifiers (1=>set, 0=>unset) */ inwUHUTd# =\unsigned int affect_virtual =;/* mask of virtual modifiers affected by this call */ lsUFUTd$ = 1eunsigned int virtual_values =;/* values for affected virtual modifiers (1=>set, 0=>unset) */ o$% YXkbSetIgnoreLockMods 4 sends a request to the server to change the servers  qIgnoree% q4mLockMods 4 control.  }affect_real 4 and  }real_values 4 are masks of real modifier bits indicating M% 4y,Zwhich real modifiers are to be added and removed from the servers  qIgnoreLockMods 4 % 4jcontrol. Modifiers selected by both  }affect_real 4 and  }real_values 4 are added to the servers % {;eIgnoreLockMods 4 control; those selected by  }affect_real 4 but not by  }real_values 4 are % 4alcremoved from the servers  {IgnoreLockMods 4 control. Valid values for  }affect_real 4 and s f% }od_real_values 4 consist of any combination of the eight core modifier bits:  {ShiftMask 4, sk % {rs~LockMask 4,  {ControlMask 4,  {Mod1Mask 4 -  {Mod5Mask 4.  }affect_virtual 4 and  }virtual_values 4 are % 4) Vmasks of virtual modifier bits indicating which virtual modifiers are to be added and  % 4qUremoved from the servers  {IgnoreLockMods 4 control. Modifiers selected by both l% }ofhaffect_virtual 4 and  }virtual_values 4 are added to the servers  {IgnoreLockMods 4 control; m &% 4gnithose selected by  }affect_virtual 4 but not by  }virtual_values 4 are removed from the servers v3% {d bIgnoreLockMods 4 control.   4See section 7.1 for a discussion of virtual modifier masks to @% 4rquse in  }affect_virtual 4 and  }virtual_values 4.  XkbSetIgnoreLockMods 4 does not wait for a reply rMD% 44_from the server. It returns  qTrue 4 if the request was sent, and  qFalse 4 otherwise. er fl 3k(The IgnoreGroupLock Control , z$ 4,\The  {IgnoreGroupLock 4 control is a boolean control with no attributes. If enabled, it  4maYspecifies that the locked state of the keyboard group should not be considered when actiD 4vevating passive grabs. $ 4 c^Because  {IgnoreGroupLock 4 is a boolean control with no attributes, use the general boolD 4to?ean controls functions (see section 10.1) to change its state. 4gnl 3y !The InternalMods Control $ 44WThe core protocol does not provide any means to prevent a modifier from being reported Se 4a ]in events sent to clients; Xkb, however makes this possible via the  {InternalMods 4 con  4 [trol. It specifies modifiers that should be consumed by the server and not reported to clirve  4Tr\ents. When a key is pressed and a modifier that has its bit set in the  {InternalMods 4 Ig 4ro]control is reported to the server, the server uses the modifier when determining the actions $ 4en`to apply for the key. The server then clears the bit, so it is not actually reported to the cli b1 4ac`ent. In addition, modifiers specified in the  {InternalMods 4 control are not used to deter 4>D 4trLmine grabs and are not used to calculate core protocol compatibility state. fd$ ate.ThHH$ b 4HHes--o prevenGro-S$ 4iManipulate the  {InternalMods 4 control via the  internal 4 field in the  {XkbControlsRec 4 ` 4 kstructure, using  XkbSetControls 4 and  XkbGetControls 4 (see sections10.9 and 10.10).  AltermD k8natively,  )use   XkbSetServerInternalMods 4. {$| 4Ig\To set the modifiers that are consumed by the server before events are delivered to the clierD| 4 'ent, use  XkbSetServerInternalMods. y. )UTUT,} =nBool  tXkbSetServerInternalMods =( display, device_spec, affect_real, real_values, affect_virtual, 6URUTD} ervirtual_values =) e CUPUTd~ = 4=Display * display =;/* connection to the X server */ cPUNUTd =tiVunsigned int device_spec =;/* device  1ID =, or  wXkbUseCoreKbd = */ ]ULUTd =Vunsigned int affect_real =;/* mask of real modifiers affected by this call */ jUJUTd =ro_unsigned int real_values =;/* values for affected real modifiers (1=>set, 0=>unset) */  fwUHUTd =bC\unsigned int affect_virtual =;/* mask of virtual modifiers affected by this call */ ntUFUTd =ioeunsigned int virtual_values =;/* values for affected virtual modifiers (1=>set, 0=>unset) */ s$ \XkbSetServerInternalMods 4 sends a request to the server to change the internal modifiers th 4iconsumed by the server.  }affect_real 4 and  }real_values 4 are masks of real modifier bits indiM 4y,Xcating which real modifiers are to be added and removed from the servers internal modies 4gfiers control. Modifiers selected by both  }affect_real 4 and  }real_values 4 are added to the t 4;nservers internal modifiers control; those selected by  }affect_real 4 but not by  }real_values 4 are  4ie\removed from the servers internal modifiers mask. Valid values for  }affect_real 4 and f }od_real_values 4 consist of any combination of the eight core modifier bits:  {ShiftMask 4, sk  {rs~LockMask 4,  {ControlMask 4,  {Mod1Mask 4 -  {Mod5Mask 4. } affect_virtual 4 and  }virtual_values 4 are  4) Vmasks of virtual modifier bits indicating which virtual modifiers are to be added and   4l Qremoved from the servers internal modifiers control. Modifiers selected by both  }jaffect_virtual 4 and  }virtual_values 4 are added to the servers internal modifiers control; those & 4velselected by  }affect_virtual 4 but not by  }virtual_values 4 are removed from the servers internal }3 4e `modifiers control.   4See section 7.1 for a discussion of virtual modifier masks to use in ff@ }otjaffect_virtual 4 and  }virtual_values 4.  XkbSetServerInternalMods 4 does not wait for a reply MD 4ct^from the server. It returns  qTrue 4 if the request was sent and  qFalse 4 otherwise. fl 3 % The XkbControlsRec Structure sz$ 4{VMany of the individual controls described in sections 10.1 through 10.7 may be manipu 4e Ylated via convenience functions discussed in those sections. Some of them, however, have  4Zno convenience functions. The  {XkbControlsRec 4 structure allows the manipulation of  4Yone or more of the controls in a single operation and to track changes to any of them in m 4thgconjunction with the  XkbGetControls 4 and  XkbSetControls 4 functions. This is the only way d fD 4ntAto manipulate those controls that have no convenience functions. nd 4ioUT = Nunsigned charmk_dflt_btn;/* default button for keyboard driven mouse */ %U<UT =>unsigned charnum_groups;/* number of keyboard groups */ 2U:UT =beFunsigned chargroups_wrap;/* how to wrap out-of-bounds groups */ ?U8UT = SAXkbModsRecinternal;/* defines server internal modifiers */ nLU6UT =bCMXkbModsRecignore_lock;/* modifiers to ignore when checking for grab */ rYU4UT =olUunsigned intenabled_ctrls;/* 1 bit => corresponding boolean control enabled */ ol$ b n lunhiss UTUT` =type ALPHATHREE { an'$ bee 'map->types[i].name oll$ bxgalUT= 4#d UTUT` =Ar#modifiers = Shift+Lock+LevelThree; U@'$ b T'ar_bt UTUT` = fXkb->map->types[i].mods / l$ b rpslar*/ U: UTUT` umap[None]= Level1; wra'$ b   U8'Moterl; UTUT` =erXkb->map->types[i].map[0] l$ b  /*lheg f g UTUT` map[Lock]= Level1; nt'$ b   ol' o UTUT` =Xkb->map->types[i].map[1] l$ b tyl UTUT` =map[Shift]= Level2; '$ b Xk'ol UTUT` =Xkb->map->types[i].map[2] l$ brmolev U@ UTUT` =$map[LevelThree]= Level3; '$ bT'pe /  UTUT` =$Xkb->map->types[i].map[3] l$ bTlev' UTUT` = bmap[Shift+LevelThree]= Level3; '$ brXk']  UTUT` =Xkb->map->types[i].map[4] l $ bmal  UTUT` preserve[None]= None; ' $ bXk' ]  UTUT` =Xkb->map->types[i].perserve[0] l$ bht]l$ b UTUT` =Xkpreserve[Lock]= Lock; '$ bm->'$ UTUT` =rXkb->map->types[i].preserve[1] l($ be Ll( b UTUT` preserve[Shift]= None; '($ bei]'( b UTUT` =Xkb->map->types[i].preserve[2] l7$ b=evl7 b UTUT` preserve[LevelThree]= None; '7$ b]ap'7 UTUT` =Xkb->map->types[i].preserve[3] UTlF$ blFXk UTUT` preserve[Shift+Level3]= None; 'F$ b'F bh UTUT` =Xkb->map->types[i].preserve[4] lU$ blU' UTUT` =level_name[Level1]= Base; r'U$ b'U L UTUT` ="Xkb->map->types[i].level_names[0] ld$ b lde( UTUT` =level_name[Level2]= Caps; Xk'd$ b!'dl UTUT` ="Xkb->map->types[i].level_names[1] ls$! b "ls]7 UTUT` =level_name[Level3]= Level3; 's$" b!#'sl UTUT` ="Xkb->map->types[i].level_names[2] l$# b"$lF UTUT` =}; h'$$ b#erv' b UTUT` = Zi $% b' Zi 1]  rhS $#group_info Range Normalization  i %& b Xk i _n lUTUTdT 8 b ly%' b%( ly el_me `U 7XkBits set in group_info b2y%( b') 2y "Xk>m `V 7_nNormalization method l %) b(* l   UTUT`W =XkbRedirectIntoRange 2 %* b)+ 2   UTUT UTUThX =>mXkbRedirectIntoRange l %+ b*, l  UT UTUT`Y =};XkbClampIntoRange 2 %, b+- 2   UTUThZ =XkbClampIntoRange l %- b,. rl   nfoan UTUT`[ =none of the above 2 %. b- 2 UT  dT b UTUTh\ =XkbWrapIntoRange l % / b1el  s!up_foh Group Index Constants5  % 0 bm al!eth UTUTd 8 l% 1 b/2lUT"=Xk ` 7 Constant Name h$% 2 b13h$UT"X ` 7ecValue l % 3 b24l #  UTUT` =XkbGroup1Index pInh$ %4 b35h$ #  UTUT` =0 l %5 b46l $l UTUT` =XkbGroup2Index UTh$ %6 b57h$ $2 UTUT` =1 l %7 b68tanl %/ b1 UTUT` =XkbGroup3Index  sh$ %8 b79 deh$ %% UTUT` =m2 l %9 b8:TUTl &% UTUT` =XkbGroup4Index h$ %: b9Coh$ &%  b UTUT` =3 d%; a HH%< b; HH7%%bGroup1Io%$ ]XkbAllocGeomProps 4 allocates space for  num_needed 4 properties and adds them to the  4bspecified geometry  geom 4. No initialization of the properties is done. A geometry property " 47Zassociates an arbitrary string with an equally arbitrary name. Geometry properties can be / 48[used to provide hints to programs that display images of keyboards, but they are not inter s<D 4Jpreted by Xkb. No other geometry structures refer to geometry properties. Qd 4@To free geometry properties, use  XkbFreeGeomProperties 4. eUTUTl =UTevoid  tXkbFreeGeomProperties =( geom =,  first =,  count =,  free_all =) rURUTd = bQXkbGeometryPtr geom =;/* geometry in which properties should be freed */ UPUTd =5int first =;/* first property to be freed */ UNUTd =%;int count =;/* number of properties to be freed */ ULUTd =GeGBool free_all; =/*  {True = => all properties are freed */ em $ 4If  free_all 4 is  {True 4, all properties are freed regardless of the value of  first  4or  count 4. OtherZasD 4ar\wise,  count 4 properties are freed beginning with the one specified by  first 4. td 4 pFTo allocate geometry key aliases, use  XkbAllocGeomKeyAliases 4. UJUTl =prLStatus  tXkbAllocGeomKeyAliases =( geom =,  num_needed =) UHUTd =reWXkbGeometryPtr geom =;/* geometry for which key aliases should be allocated */ UFUTd =erBint num_needed =;/* number of new key aliases required */ $ _XkbAllocGeomKeyAliases 4 allocates space for  num_needed 4 key aliases and adds them to  4fcthe specified geometry  geom 4. A key alias is a pair of strings that associates an alternate ope*D 4*/1name for a key with the real name for that key. *?d 4llATo free geometry key aliases, use  XkbFreeGeomKeyAliases 4. 4TUDUTl = aevoid  tXkbFreeGeomKeyAliases =( geom =,  first =,  count =,  free_all =) aUBUTd =RXkbGeometryPtr geom =;/* geometry in which key aliases should be freed */ nU@UTd = p6int first =;/* first key alias to be freed */ {U>UTd =UJ all key aliases are freed */ y $ 4sesIf  free_all 4 is  {True 4, all aliases in the top level of the specified geometry  }geom 4 are freed  4Xk|regardless of the value of  first  4or  count 4. Otherwise,  count 4 aliases in  }geom 4 are freed beginifD 4eo.ning with the one specified by  first 4. d 4te=To allocate geometry colors, use  XkbAllocGeomColors 4. U:UTl =HStatus  tXkbAllocGeomColors =( geom =,  num_needed =) 4U8UTd =RXkbGeometryPtr geom =;/* geometry for which colors should be allocated */ U6UTd = =>int num_needed =;/* number of new colors required. */  $ li`XkbAllocGeomColors 4 allocates space for  num_needed 4 colors and adds them to the speci/  4UJcfied geometry  geom 4. A color name is a string whose interpretation is not specified by Xkb. all& 4 =^All other geometry data structures refer to colors using their indices in this global list or 3D 4!pointers to colors in this list. d%= akre  irHH%> b= n 4HH 4))p w)d @To free geometry colors,  )use   XkbFreeGeomColors . UTUTl =oravoid  tXkbFreeGeomColors =( geom =,  first =,  count =,  free_all =) )URUTd =MXkbGeometryPtr geom =;/* geometry in which colors should be freed */ c6UPUTd =2int first =;/* first color to be freed */ CUNUTd =/ 7int count =;/* number of colors to be freed */ acePULUTd =dCBool free_all; =/*  {True = => all colors are freed */ omec$ 4A If  free_all 4 is  {True 4, all colors are freed regardless of the value of  first  4or  count 4. Otherwise, efpD tNcount 4 colors are freed beginning with the one specified by  first 4. d JTo allocate points in an outline,  )use   XkbAllocGeomPoints . UJUTl =%KStatus  tXkbAllocGeomPoints =( outline =,  num_needed =) UHUTd =SXkbOutlinePtr outline =;/* outline for which points should be allocated */ UFUTd ==int num_needed =;/* number of new points required */ t$ ,kXkbAllocGeomPoints 4 allocates space for  num_needed 4 points in the specified  outline 4. The frD 4points are not initialized. /*dI fDTo free points in a outline,  )use   XkbFreeGeomPoints . toUDUTlJ =ULdvoid & tXkbFreeGeomPoints =( outline =,  first =,  count =,  free_all =)  UBUTdK =alNXkbOutlinePtr outline =;/* outline in which points should be freed */ U@UTdL = 43int first =;/* first point to be freed. */ s a%U>UTdM = w7int count =;/* number of points to be freed */ 2U<UTdN =tsCBool free_all; =/*  {True = => all points are freed */ lE$O 4 t|If  free_all 4 is  {True 4, all points are freed regardless of the value of  first  4and  count 4. OtherneRO 4shdwise, the number of points specified by  count 4 are freed, beginning with the point specified d _DO 4+by  first 4 in the specified outline. fortd  fTo allocate space for an arbitrary number of geometry shapes,  )use   XkbAllocGeomShapes . U:UTl =ToHStatus  tXkbAllocGeomShapes =( geom =,  num_needed =) UTU8UTd = RXkbGeometryPtr geom =;/* geometry for which shapes should be allocated */ U6UTd =UT=int num_needed =;/* number of new shapes required */ c$ f_XkbAllocGeomShapes 4 allocates space for  num_needed 4 shapes in the specified geometry dMD *geom 4. The shapes are not initialized. d ts@To free geometry shapes,  )use   XkbFreeGeomShapes . */U4UTl =Obvoid  tXkbFreeGeomShapes =( geom =,  first =,  count =,  f ree_all =) U2UTd = MXkbGeometryPtr geom =;/* geometry in which shapes should be freed */ oU0UTd = b2int first =;/* first shape to be freed */ U.UTd = 7int count =;/* number of shapes to be freed */ all!U,UTd = aCBool free_all; =/*  {True = => all shapes are freed */ s 4$ 4xIf  free_all 4 is  {True 4, all shapes in the geometry are freed regardless of the values of  first 4 and geAD y kcount 4. Otherwise,  count 4 shapes are freed, beginning with the shape specified by  first 4. s rVd ITo allocate geometry sections,  )use   XkbAllocGeomSections . kU*UTl =ifJStatus  tXkbAllocGeomSections =( geom =,  num_needed =) xU(UTd =SXkbGeometryPtr geom =;/*geometry for which sections should be allocated */ lU&UTd =X?int num_needed =;/* number of new sections required */ d%? aotr mey HH%@ b? THHst))be freedq)$ =]XkbAllocGeomSections 4 allocates  num_needed 4 sections and adds them to the geometry uD s 5geom 4. No initialization of the sections is done. 4*d aDTo free geometry sections,  )use   XkbFreeGeomSections . rs>UTUTl =cvoid  tXkbFreeGeomSections =( geom =,  first =,  count =,  free_all =) d bKURUTd = rOXkbGeometryPtr geom =;/* geometry in which sections should be freed */ SecXUPUTd =UT5int first =;/* first section to be freed. */ eUNUTd =m_9int count =;/* number of sections to be freed */ rULUTd = wEBool free_all; =/*  {True = => all sections are freed */ n$ 4nu~If  free_all 4 is  {True 4, all sections are freed regardless of the value of  first  4and  count 4. Other 4cwise, the number of sections specified by  count 4 are freed, beginning with the section specD 4ll2ified by  first 4 in the specified geometry. d tETo allocate rows in a section,  )use   XkbAllocGeomRows . eUJUTl = 4IStatus  tXkbAllocGeomRows =( section =,  num_needed =) mUHUTd =UTQXkbSectionPtr section =;/* section for which rows should be allocated */ UFUTd = f;int num_needed =;/* number of new rows required */ m $ whXkbAllocGeomRows 4 allocates  num_needed 4 rows and adds them to the  section 4. No initial. D 4ization of the rows is done. md b@To free rows in a section,  )use   XkbFreeGeomRows . ru-UDUTl =onbvoid % tXkbFreeGeomRows =( section =,  first =,  count =,  free_all =) :UBUTd =luLXkbSectionPtr section =;/* section in which rows should be freed */ mbGU@UTd =ci1int first =;/* first row to be freed. */ TU>UTd =5int count =;/* number of rows to be freed */ eaU<UTd =ABool free_all; =/*  {True = => all rows are freed */ ot$ 4UJIf  free_all 4 is  {True 4, all rows are freed regardless of the value of  first  4and  count 4. Otherwise,   4eckthe number of rows specified by  count 4 are freed, beginning with the row specified by  first 4 owsD 4in the specified section. d esMTo allocate overlays in a section,  )use   XkbAllocGeomOverlays . U:UTl =izMStatus  tXkbAllocGeomOverlays =( section =,  num_needed =) )U8UTd =eeUXkbSectionPtr section =;/* section for which overlays should be allocated */ U6UTd = c?int num_needed =;/* number of new overlays required */ $ echXkbAllocGeomRows 4 allocates  num_needed 4 overlays and adds them to the  section 4. No ini. D 4%tialization of the overlays is done. rd eETo free rows in an section,  )use   XkbFreeGeomOverlays . wU4UTl =fvoid + tXkbFreeGeomOverlays =( section =,  first =,  count =,  free_all =) )U2UTd =cPXkbSectionPtr section =;/* section in which overlays should be freed */ co6U0UTd = b5int first =;/* first overlay to be freed. */ CU.UTd =in9int count =;/* number of overlays to be freed */ vPU,UTd =n,EBool free_all; =/*  {True = => all overlays are freed */ sc$ 4eo~If  free_all 4 is  {True 4, all overlays are freed regardless of the value of  first  4and  count 4. Otherp 4al^wise, the number of overlays specified by  count 4 are freed, beginning with the overlay }D 4 5specified by  first 4 in the specified section. d%A a4 N tiHH%B bA HH{ i((  Xkray(d LTo allocate rows in a overlay,  )use   XkbAllocGeomOverlayRows . ntUTUTl = PStatus  tXkbAllocGeomOverlayRows =( overlay =,  num_needed =) la)URUTd = *QXkbSectionPtr overlay =;/* section for which rows should be allocated */ .6UPUTd =in;int num_needed =;/* number of new rows required */ UTI$ gXkbAllocGeomOverlayRows 4 allocates  num_needed 4 rows and adds them to the  overlay 4. No isVD 4 o$initialization of the rows is done. lukd aHTo free rows in an overlay,  )use   XkbFreeGeomOverlayRows . sUNUTl =univoid * tXkbFreeGeomOverlayRows =( overlay =,  first =,  count =,  free_all =) eULUTd =LXkbSectionPtr overlay =;/* section in which rows should be freed */ UJUTd = b1int first =;/* first row to be freed. */ UHUTd = 5int count =;/* number of rows to be freed */ lUFUTd =erABool free_all; =/*  {True = => all rows are freed */ $ 4 tIf  free_all 4 is  {True 4, all rows are freed regardless of the value of  first  4and  count 4. Otherwise, ion 4oukthe number of rows specified by  count 4 are freed, beginning with the row specified by  first 4 D 4llin the specified overlay. d  QTo allocate keys in an overlay row,  )use   XkbAllocGeomOverlayKeys . a UDUTl =s LStatus  tXkbAllocGeomOverlayKeys =( row =,  num_needed =) reUBUTd =IXkbRowPtr row =;/* section for which rows should be allocated */ a%U@UTd ==;int num_needed =;/* number of new rows required */ Sec8$ aygXkbAllocGeomOverlayKeys 4 allocates  num_needed 4 keys and adds them to the  row 4. No iniw tED 4UH!tialization of the keys is done. Zd^ s LTo free keys in an overlay row,  )use   XkbFreeGeomOverlayKeys . =>oU>UTl_ =d evoid ) tXkbFreeGeomOverlayKeys =( row =,  first =,  count =,  free_all =) u|U<UTd` =a@XkbRowPtr row =;/* row in which keys should be freed */ f U:UTda = 1int first =;/* first key to be freed. */ fU8UTdb =45int count =;/* number of keys to be freed */ U6UTdc =ToABool free_all; =/*  {True = => all keys are freed */ a$d 4UTIf  free_all 4 is  {True 4, all keys are freed regardless of the value of  first  4and  count 4. Otherwise, rowd 4orkthe number of keys specified by  count 4 are freed, beginning with the key specified by  first 4 ireDd 4in the specified row. d caeTo allocate doodads that are global to a keyboard geometry,  )use   XkbAllocGeomDoodads . oU4UTl =onIStatus  tXkbAllocGeomDoodads =( geom =,  num_needed =) kU2UTd =ysSXkbGeometryPtr geom =;/* geometry for which doodads should be allocated */  fU0UTd =t>int num_needed =;/* number of new doodads required */ '$ ic\XkbAllocGeomDoodads 4 allocates  num_needed 4 doodads and adds them to the specified . 4D 4bAgeometry  geom 4. No initialization of the doodads is done. TId dTo allocate doodads that are specific to a section,  )use   XkbAllocGeomSectionDoodads . is^U.UTl = kSStatus  tXkbAllocGeomSectionDoodads =( section =,  num_needed =) rowkU,UTd =orTXkbSectionPtr section =;/* section for which doodads should be allocated */ ifxU*UTd =4>int num_needed =;/* number of new doodads required */ d%C ao k   HH%D bC onHHlo!!m =, s =!$ Xk^XkbAllocGeomSectionDoodads 4 allocates  num_needed 4 doodads and adds them to the specD 4nAified  section 4. No initialization of the doodads is done. *d DoBTo free geometry doodads,  )use   XkbFreeGeomDoodads . >UTUTl =Vvoid  tXkbFreeGeomDoodads =( doodads =,  count =,  free_all =) KURUTd! =ll9XkbDoodadPtr doodads =;/* doodads to be freed */ XUPUTd" =io8int count =;/* number of doodads to be freed */ loeUNUTd# =sDBool free_all; =/*  {True = => all doodads are freed */ ecx$$ 4onsIf  free_all 4 is  {True 4, all doodads in the array are freed, regardless of the value of  count 4. of D$ 4ed,Otherwise,  count 4 doodads are freed. od% FTo allocate an entire geometry,  )use   XkbAllocGeometry . ULUTl& =!@Status  tXkbAllocGeometry =( xkb =,  sizes =) UJUTd' =SeZXkbDescPtr xkb =;/* keyboard description for which geometry is to be allocated */ UHUTd( =TXkbGeometrySizesPtr sizes =;/* initial sizes for all geometry components */ ge$) )kbAllocGeometry 4 allocates a keyboard geometry and adds it to the keyboard description ( ) 4hspecified by  xkb.  4The keyboard description should be obtained via the  XkbGetKeyboard 4 or ) iocXkbAllockeyboard 4 functions. The  sizes 4 parameter specifies the number of elements to be  =) 4=>Wreserved for the subcomponents of the keyboard geometry and can be zero or more. These l dD) 4y Vsubcomponents include the  properties, colors, shapes, sections, and doodads 4. %d* daATo free an entire geometry,  )use   XkbFreeGeometry . y:UFUTl+ =XkPvoid  tXkbFreeGeometry =( geom =,  which =,  free_all =) xkGUDUTd, ==9XkbGeometryPtr geom =;/* geometry to be freed */ aTUBUTd- = wKunsigned int which =;/* mask of geometry components to be freed */  aU@UTd. =niLBool free_all; =/*  {True = => the entire geometry is freed. */ ett$/ 4 khThe values of  which 4 and  free_all  4determine how much of the specified geometry is freed. 4D/ 4ip(The valid values for  which 4 are: KeU>UT$0 =%#defineXkbGeomPropertiesMask(1<<0) fU<UT0 =si!#defineXkbGeomColorsMask(1<<1) bU:UT0 =be!#defineXkbGeomShapesMask(1<<2) fU8UT0 =ts##defineXkbGeomSectionsMask(1<<3) zerU6UT0 = d"#defineXkbGeomDoodadsMask(1<<4) U4UTD0 =op#defineXkbGeomAllMask(0x1f) $1 4 rIf  free_all 4 is  {True 4, the entire geometry is freed regardless of the value of  which 4. OtherD1 4etIwise, the portions of the geometry specified by  which 4 are freed. d%E a b - wHH% F bE eetHHee"" =niLBotll" UT UTl 2heXkb Keyboard Mapping *$ 4/UThe Xkb keyboard mapping contains all the information the server and clients need to i, 4edSinterpret key events. This chapter provides an overview of the terminology used to =9 4roVdescribe an Xkb keyboard mapping and introduces common utilities for manipulating the FD 4Xkkeyboard mapping. [, 40bThe mapping consists of two components, a server map and a client map. The  fclient 4 map h 4op^is the collection of information a client needs to interpret key events from the keyboard. It u 4frScontains a global list of key types and an array of key symbol maps, each of which ort 4ryZdescribes the symbols bound to a key and the rules to be used to interpret those symbols.   4cThe  server 4 map contains the information the server needs to interpret key events. This " 4t\includes actions and behaviors for each key, explicit components for a key, and the virtual oaD 4s 4modifiers and the per-key virtual modifier mapping. $ 4inXFor detailed information on particular components of the keyboard map, refer to Chapter D 4riQ15, Xkb Client Keyboard Mapping and Chapter 16, Xkb Server Keyboard Mapping. l 3keNotation and Terminology $ 4coZThe graphic characters or control functions that may be accessed by one key are logically   4helarranged in groups and levels, where  fgroup 4 and  flevel 4 are defined as in the ISO9995 stancoD 4stdard: 'URUT, = oZGroup:A logical state of a keyboard providing access to a collection of graphic char4UPUT =o Nacters. Usually these graphic characters logically belong together and may be AUNUTD =in,arranged on several levels within a group. enNULUTd = [UJUT, = aXLevel:One of several states (normally 2 or 3) governing which graphic character is hUHUT =fiMproduced when a graphic key is actuated. In certain cases the level may also luUFUTD =paaffect function keys. $ 4ef]These definitions, taken from the ISO standard, refer to graphic keys and characters. In the r 4ngYcontext of Xkb, Group and Level are not constrained to graphic keys and characters; they hD 4l Smay be used with any key to access any character the key is capable of generating. d i$ 4s,ZLevel is often referred to as Shift Level. Levels are numbered sequentially starting at D 4URone. UDUT$ =p:XShift level is derived from the modifier state, but not necessarily in the same way for UBUT =Us^all keys. For example, the  {Shift = modifier selects shift level 2 on most keys, but for U@UT =ls^keypad keys the modifier bound to  Num_Lock = (that is, the  {NumLock = virtual modiU>UTD =3)"fier) also selects shift level 2. d%!G arhi caHH%"H bG aafHHudefiniti um $ 4 gWFor example, consider the following key (the gray characters indicate symbols that are ar"L 4toCimplied or expected but are not actually engraved on the key): wil ss Shift Levels and Groups of$ 4XThis key has two groups, indicated by the columns, and each group has two shift levels. ia 4fFor the first group (Group1), the symbol shift level one is  ca 4, and the symbol for shift level  4amhtwo is  cA 4. For the second group, the symbol for shift level one is   4, and the symbol for onD 4r shift level two is   4. thd 3o Core Implementation i$ 4 ZThe standard interpretation rules for the core X keymap only allow clients to access keys   4Ysuch as the one shown in Figure 14.1. That is, clients using the standard interpretation  4_rules can only access one of four keysyms for any given  {KeyPress 4 event two different er %D 4(t"symbols in two different groups. :$ 4aIn general, the  {Shift 4 modifier, the  {Lock 4 modifier, and the modifier bound to the G veWNum_Lock 4 key are used to change between shift level 1 and shift level 2. To switch ns,T 4s [between groups, the core implementation uses the modifier bound to the  Mode_switch 4 l oa 4nd^key. When the  {Mode_switch 4 modifier is set, the keyboard is logically in Group 2. When nD 4elSthe  {Mode_switch 4 modifier is not set, the keyboard is logically in Group 1.  $ 4XThe core implementation does not clearly specify the behavior of keys. For example, the r D 4onZlocking behavior of the  CapsLock 4 and  Num_Lock 4 keys depends on the vendor. l 3siXkb Implementation  ati$ 4VXkb extends the core implementation by providing access to up to four keyboard groups   4`with up to 63 shift levels per key. In addition, Xkb provides precise specifications regardt 4 Wing the behavior of keys. In Xkb, modifier state and the current group are independent y aD 4beH(with the exception of compatibility mapping, discussed in Chapter 17). be,J 4co\ VXkb handles switching between groups via key actions, independent of any modifier state keJ 4deXinformation. Key actions are in the server map component and are described in detail in elDJ 4tcsection 16.1.4. no(, 4d ] WXkb handles shift levels by associating a key type with each group on each key. Each key i5 4 k]type defines the shift levels available for the groups on keys of its type and specifies the NBD 46modifier combinations necessary to access each level. d%#I adth rodiHH%$J bI HHto&. In v p    &ic$ 4_For example, Xkb allows key types where the  {Control 4 modifier can be used to access the pen 4Yshift level two of a key. Key types are in the client map component and are described in "D 4Xkdetail in section 15.2. n 7, 4ioY Xkb provides precise specification of the behavior of a key using key behaviors. Key iDD 4omWbehaviors are in the server map component and are described in detail in section 16.2. ]l 3ha/Getting Map Components from the Server eaq$ 4eyVXkb provides two functions to obtain the keyboard mapping components from the server. ~ 4pedThe first function,  XkbGetMap 4, allocates an  {XkbDescRec 4 structure, retrieves mapping  4 a]components from the server, and stores them in the  {XkbDescRec 4 structure it just allo 4\cated. The second function,  XkbGetUpdatedMap 4, retrieves mapping components from the D 4 X^server and stores them in an  {XkbDescRec 4 structure that has previously been allocated. $ 4ve^To allocate an  {XkbDescRec 4 structure and populate it with the servers keyboard client  4ctcmap and server map, use  XkbGetMap. XkbGetMap  4is similar to  XkbGetKeyboard 4 (see secng  4 iation 6.2), but is used only for obtaining the address of an  {XkbDescRec 4 structure that is i 4Spopulated with keyboard mapping components. It allows finer control over which subVXk 4ctZstructures of the keyboard mapping components are to be populated.  XkbGetKeyboard 4  4Xk_always returns fully populated components, while  XkbGetMap 4 can be instructed to return ]coD 4se!a partially populated component. bUTUTl =urFXkbDescPtr  tXkbGetMap =( display, which, device_spec =) )URUTd =, ;Display *  display =;/* connection to X server */ ^se6UPUTd =emMunsigned int which =;/* mask selecting subcomponents to populate */ CUNUTd =llNunsigned int device_spec =;/* device_id, or  wXkbUseCoreKbd = */ V$ 4`The  which 4 mask is a bitwise inclusive OR of the masks defined in Table 14.1. Only those  c 4Wportions of the keyboard server map and the keyboard client maps that are specified in 4pD } i(which 4 are allocated and populated. ar$! 4tsbIn addition to allocating and obtaining the server map and the client map,  XkbGetMap 4 also ! 4 btsets the  device_spec 4, the  min_key_code ,  4and  max_key_code 4 fields of the keyboard descripapD! 4cttion. urn$" ]XkbGetMap 4 is synchronous; it queries the server for the desired information, waits for a " 4 dfreply, and then returns. If successful , XkbGetMap 4 returns a pointer to the  {XkbDescRec 4 " 4unhstructure it allocated. If unsuccessful,  XkbGetMap 4 returns  {NULL 4. When unsuccessful, one i" 4c]of the following protocol errors is also generated:  {BadAlloc 4 (unable to allocate the " {e rXkbDescRec 4 structure),  {BadValue 4 (some mask bits in  }which 4 are undefined) {, 4 or  {BadIm" {ma]plementation 4 (a compatible version of the Xkb extension is not available in the server). D" 4In9To free the returned data, use  XkbFreeClientMap 4. e$ 4kbVXkb also provides convenience functions to get partial component definitions from the $ 4[server. These functions are specified in the convenience functions column in Table 14.1. $"1BL 4 WRefer to the sections listed in the table for more information on these functions. d%%K asul s poHH%&L bK "HHhoc XkbGe wns    sud 49Xkb defines combinations of these masks for convenience: gU:UT$ =ll0#define XkbResizableInfoMask(XkbKeyTypesMask) e U8UT =trA#defineXkbAllClientInfoMask(XkbKeyTypesMask | XkbKeySymsMask | fU6UT = XkbModifierMapMask) !U4UT = :#defineXkbAllServerInfoMask(XkbExplicitComponentsMask | .U2UT = , XkbKeyActionsMask| XkbKeyBehaviorsMask | a,;U0UT =ie-XkbVirtualModsMask | XkbVirtualModMapMask) iHU.UTD =ncL#defineXkbAllMapComponentsMask(XkbAllClientInfoMask|XkbAllServerInfoMask) er\$ 4arYKey types, symbol maps, and actions are all interrelated: changes in one require changes ei 4s Yin the others. The convenience functions make it easier to edit these components and han%vD 4sdle the interdependencies. s $R XTo update the client or server map information in an existing keyboard description, use DR XkbGetUpdatedMap . U,UTlS =deAStatus  tXkbGetUpdatedMap =( display, which, xkb =) U*UTdT =es;Display *  display =;/* connection to X server */ finU(UTdU =MaMunsigned int which =;/* mask selecting subcomponents to populate */ aU&UTdV =CXkbDescPtr xkb =;/* keyboard description to be updated */ UT$W 4kb`The  which 4 parameter is a bitwise inclusive OR of the masks in Table 14.1. If the needed MaW 4fcomponents of the  xkb 4 structure are not already allocated,  XkbGetUpdatedMap 4 allocates W 4ym]them.  XkbGetUpdatedMap 4 fetches the requested information for the device specified in DW 4heUT7 =thLunsigned charnum_key_syms;/* #  key_sym_map = entries changed */ eyU<UT7 =PKeyCodefirst_key_act;/* first key whose  key_acts  =entry changed */ thU:UT7 =sRIunsigned charnum_key_acts;/* #  key_acts = entries changed */ U8UT7 =inPKeyCodefirst_key_behavior;/* first key whose  behaviors = changed */ s U6UT7 =hiOunsigned charnum_key_behaviors;/* #  behaviors = entries changed */ ang(U4UT7 =s UKeyCodefirst_key_explicit;/* first key whose  explicit  =entry changed */ l5U2UT7 =coMunsigned charnum_key_explicit;/* #  explicit = entries changed */ nBU0UT7 =QKeyCodefirst_modmap_key;/* first key whose  modmap = entry changed */ eOU.UT7 =ifJunsigned charnum_modmap_keys;/* #  modmap = entries changed */ \U,UT7 =MKeyCodefirst_vmodmap_key;/* first key whose  vmodmap = changed */ niU*UT7 =Lunsigned charnum_vmodmap_keys;/* #  vmodmap = entries changed */ ngvU(UT7 ='unsigned charpad1;/* reserved */ irsd%)O a*th igd HH%*P bO trHHdUTfirst_ke S py/*UTUT7 =ioLunsigned shortvmods;/* mask indicating which  vmods = changed */ /URUTL7 = =2}  XkbMapChangesRec =,*XkbMapChangesPtr; '$8 4iccThe  changed 4 field identifies the map components that have changed in an  {XkbDescRec 4 _ke48 4 Wstructure and may contain any of the bits in Table 14.1, which are also shown in Table * fA8 4mh14.2. Every 1 bit in  -changed 4 also identifies which other fields in the  {XkbMapChangesRec 4 ntN8 4U,Ystructure contain valid values, as indicated in Table 14.2. The  min_key_code = and [8 7]max_key_code 4 fields are for reference only; they are ignored on any requests sent to the h8 4d Pserver and are always updated by the server whenever it returns the data for an uBL8 {XkbMapChangesRec 4.  %*$W 4 TTo update only partial components of a keyboard description, modify the appropriate UTW 4uZfields in the server and map components of a local copy of the keyboard description, then W 4bM\call  XkbChangeMap 4 with an  {XkbMapChangesRec 4 structure indicating which compo tDW 4thnents have changed.  U$UTlX =keIBool  tXkbChangeMap =( dpy =,  xkb =,  changes =) .&U"UTdY =sh6Display * dpy =;/* connection to X server */ 3U UTdZ = aUXkbDescPtr  xkb =;/* description from which new values  1are  =taken */ ,@UUTd[ =n OXkbMapChangesPtr  changes =;/*identifies component parts to update */ S$\ co_XkbChangeMap 4 copies any components specified by the  changes 4 structure from the key8`D\ 4reJboard description,  }xkb 4, to the X server specified by  }dpy 4. d%+Q a* e lyHH%,R bQ o mHHUT--elds in z m-$] 4op]If any components specified by  changes 4 are not present in the  xkb 4 parameter, ] 4`XkbChangeMap 4 returns  {False 4. Otherwise, it sends a request to the server and returns ke"D] {Ch True 4. 7d^ =jXkbChangeMap 4 can generate  {BadAlloc 4,  {BadLength 4, and  {BadValue 4 protocol errors. Pl_ 3tr+Tracking Changes to Map Components w vd,` 4ta_The Xkb extension reports  {XkbMapNotify 4 events to clients wanting notification wheno uq` 4Xever a map component of the Xkb description for a device changes. There are many differct~` 48Vent types of Xkb keyboard map changes. Xkb uses an event detail mask to identify each D` 4Xtype of change. The event detail masks are identical to the masks listed in Table 14.1. %,$b 4 ogTo receive  {XkbMapNotify 4 events under all possible conditions, use  XkbSelectEvents 4 (see ]IfDb 4ecksection 4.3) and pass  {XkbMapNotifyMask 4 in both  }bits_to_change 4 and  }values_for_bits 4.  r$c 44_To receive  {XkbMapNotify 4 events only under certain conditions, use  XkbSelectEventDe7c Xkitails 4 using  {XkbMapNotify 4 as the  }event_type 4 and specifying the desired map changes in Dc }Pbits_to_change 4 and  }values_for_bits 4 using mask bits from Table 14.1. n dd 4bM2The structure for  {XkbMapNotify 4 events is: UTUT$e =typedef struct { pURUTe =Xk2inttype;/* Xkb extension base event code */ UPUTe =Aunsigned longserial;/* X server serial number for event */ d,UNUTe =tiDBool send_event;/*  {True = => synthetically generated */ re9ULUTe =maMDisplay *display;/*  1server connection where event generated = */ 4FUJUTe = p6Timetime;/* server time when event generated */ SUHUTe =ec-intxkb_type;/*  pXkbMapNotify = */ `UFUTe =toOintdevice;/* Xkb device  1ID =, will not be  pXkbUseCoreKbd = */ XkbmUDUTe =tsIunsigned intchanged;/* identifies valid fields in rest of event */ czUBUTe =)unsigned intresized;/* reserved */ eU@UTe =g Cintfirst_type;/* index of first key  type = modified */ andU>UTe =ts)intnum_types/* # types modified */ U<UTe =Th;KeyCodemin_key_code;/* minimum keycode for device */ $eU:UTe =ct;KeyCodemax_key_code;/* maximum keycode for device */ evU8UTe =UTMKeyCodefirst_key_sym;/* first key whose  key_sym_map = changed */ dU6UTe =tiPKeyCodefirst_key_act;/* first key whose  key_acts  =entry changed */ U4UTe = *PKeyCodefirst_key_behavior;/* first key whose  behaviors = changed */ eU2UTe =UKeyCodefirst_key_explicit;/* first key whose  explicit  =entry changed */ XU0UTe = RKeyCodefirst_modmap_key; /* first key whose  modmap = entry changed */ U.UTe =kbFKeyCodefirst_vmodmap_key;/* #  modmap = entries changed */  U,UTe =t Bintnum_key_syms;/* #  key_sym_map = entries changed */ U*UTe =g ?intnum_key_acts;/* #  key_acts = entries changed */ */#U(UTe =eEintnum_key_behaviors;/* #  behaviors = entries changed */ K0U&UTe =deCintnum_key_explicit;/* #  explicit = entries changed */ e=U$UTe = m@intnum_modmap_keys;/* #  modmap = entries changed */ rsJU"UTe =rsBintnum_vmodmap_keys;/* #  vmodmap = entries changed */ WU UTe =acJunsigned intvmods;/* mask indicating which  vmods = changed */ dUUTLe =rs!}  XkbMapNotifyEvent =; ew$f 4 c\The  changed 4 field specifies the map components that have changed and is the bitwise cif 4d Xinclusive OR of the mask bits defined in Table 14.1. The other fields in this event are ed%-S ao  moHH%.T bS et HH entries  q{U*f 4m_^interpreted as the like-named fields in an  {XkbMapChangesRec 4 (see section 14.3.1). The f {bebXkbMapNotifyEvent 4 structure also has an additional  resized 4 field that is reserved for "Df 4*/ future use. ;lg 3m_2Allocating and Freeing Client and Server Maps O$h 4ecCalling  XkbGetMap 4 (see section 14.2) should be sufficient for most applications to get clied \h 4as\ent and server maps. As a result, most applications do not need to directly allocate client =iDh 4fand server maps. e~$i 4ieVIf you change the number of key types or construct map components without loading the i 4 bTnecessary components from the X server, do not allocate any map components directly %-i 4owusing  malloc 4 or  Xmalloc 4. Instead, use the Xkb allocators,  XkbAllocClientMap ,, 4 and  XkbAlDi locServerMap 4. $j 4injSimilarly, use the Xkb destructors,  XkbFreeClientMap ,, 4 and  XkbFreeServerMap 4 instead of Dj Evfree 4 or  Xfree 4. addk 3edAllocating an Empty Client Map "dl 4fu^To allocate and initialize an empty client map description record, use  XkbAllocClientMap. UTUTlm = EStatus  tXkbAllocClientMap =( xkb, which, type_count =) aURUTdn =d VXkbDescPtr  xkb =;/* keyboard description in which to allocate client map */ "UPUTd = cNunsigned int which =;/* mask selecting map components to allocate */ /UNUTd =keaunsigned int type_count =;/* value of  num_types = field in map to be allocated */ fB$ dodXkbAllocClientMap 4 allocates and initializes an empty client map in the  map 4 field of the 4O 4e hkeyboard description specified by  xkb 4. The  which 4 parameter specifies the particular com\ 4inZponents of the client map structure to allocate and is a mask composed by a bitwise incluiBL 4=sive OR of one or more of the masks shown in Table 14.3. kRU8UT$| =n kThe  min_key_code = and  max_key_code = fields of the  xkb = parameter must be legal values use^U6UT| =tM_if the  {XkbKeySymsMask = or  {XkbModifierMapMask = masks are set in the  which = URjU4UTD| =XkWparameter. If they are not valid,  XkbAllocClientMap = returns  {BadValue =. UT~$} 4gncIf the client map of the keyboard description is not  {NULL 4, and any fields are already allod i} 4 bcated in the client map,  XkbAllocClientMap 4 does not overwrite the existing values; it simd%/U ap c 4ieHH%0V bU dcrHH4 param { | t} 4nply ignores that part of the request. The only exception is the  types 4 array. If  type_count 4 is } 4 Ojgreater than the current  num_types 4 field of the client map,  XkbAllocClientMap 4 resizes the "D}  Dtypes 4 array and resets the  num_types 4 field accordingly. 7$~ 4 {hIf  XkbAllocClientMap 4 is successful, it returns  {Success 4. Otherwise, it can return either XkDD~ {ey free all client components and map itself */ $ teeXkbFreeClientMap 4 frees the components of client map specified by  which 4 in the  {XkbDes {tyccRec 4 structure specified by the  xkb 4 parameter and sets the corresponding structure comllo 4sueponent values to  {NULL 4. The  which 4 parameter specifies a combination of the client map D 44masks shown in Table 14.3.  $ 4If  free_all 4 is  {True 4,  }which 4 is ignored;  XkbFreeClientMap 4 frees every non- {NULL 4 structure e  4en[component in the client map, frees the  {XkbClientMapRec 4 structure referenced by the ree"D UTZmap 4 member of the  xkb 4 parameter, and sets the  map 4 member to  {NULL. ;l 3'Allocating an Empty Server Map maO$ 4poZTo allocate and initialize an empty server map description record, use  XkbAllocServer\D onMap. dqULUTl =EStatus  tXkbAllocServerMap =( xkb, which, count_acts =) a~UJUTd =wVXkbDescPtr  xkb =;/* keyboard description in which to allocate server map */ UHUTd =r Nunsigned int which =;/* mask selecting map components to allocate */ UFUTd =he`unsigned int count_acts =;/* value of  num_acts = field in map to be allocated */ ow$  gXkbAllocServerMap 4 allocates and initializes an empty server map in the  }server 4 field of the  4 4 hkeyboard description specified by  xkb 4. The  which 4 parameter specifies the particular com4BL 4ceRponents of the server map structure to allocate, as specified in Table 14.4.  U0UT$ = hThe  min_key_code = and  max_key_code = fields of the  xkb = parameter must be legal valToU.UTD =iaQues. If they are not valid,  XkbAllocServerMap = returns  {BadValue =. l %1W b XX tl ( 6hic c UTUT`{ =UJXkbKeyNamesMask Xk 4 %2X bWY pon 4 se 6*/ UH UTUT`| =un(1<<9) t @@G? %3Y bXZ nts@@G? UT 6=heun UTUT`} =un Xkb->names /* @ %4Z bY[ ell@  6gXkll UTUT`~ =lokeys[*], num_keys l %5[ bZ\ ell  7hkeoa UTUT` =ciXkbKeyAliasesMask  4 %6\ b[] pti 4  7Rpont UTUT` =p (1<<10) to@@G? %7] b\^ U0@@G?  7_co UTUT` = Xkb->names s o@ %8^ b]_ aTo@ ue 7y a n UTUT` =ll key_aliases[*], num_key_aliases uel %9_ b^` l  86 UTUT` =XkbVirtualModNamesMask Xk 4 %:` b_a pon 4 se 8*/ UH UTUT` =un(1<<11)  @@G? %;a b`b nts@@G? UT 8=heun UTUT` =un Xkb->names /* @ %<b bac ell@  8gXkll UTUT` =lo vmods[*] nl %=c bbd l  97 UTUT` =XkbGroupNamesMask  4 %>d bce  4  97 UTUT` =(1<<12) (1@@G? %?e bdf @@G?  97 UTUT` = Xkb->names ->n@ %@f beg @  97 UTUT` = groups[*] l! %Ag bfh l!  :l UTUT` =XkbRGNamesMask UT !4 %Bh bgi  !4 a :pon UTUT` =(1<<13) 8@@!G? %Ci bhj @@!G? b :nts UTUT` = Xkb->names =he!@ %Dj bik !@ c :ell UTUT` =radio_groups[*], num_rg UTl/K%Ek bjl %=l/K  ; UTUT` =XkbComponentNamesMask  /4K%Fl bkm > b /4K  ;  UTUT` =7(0x3f) @@/G?K%Gm bln ? b@@/G?K @ ;  UTUT` =7 Xkb->names `/@K%Hn bmo b/@KK ;    47 keycodes,  4] geometry, " 4h symbols, . 4physical symbols, : 4 types, and mesF@ 4compatibility map lz%Io bnp :lz <<138 ` XkbAllNamesMask  z4%Jp boq nts z4 Xk <=he UTUT` =%D (0x3fff) @@zG?%Kq bpr :e@@zG?  <rou[* UTUT` = Xkb->names %Ez@%Lr bq z@ UT <=Xk UTUT` =k all name components %FVr %Ms bw Vr UT 2==7(0h ?3XkbNameChanges Fields ܀r %Nt b ܀r Xk 2=`d 4%H b;r %Ou b ;r  2= keodd 4 r %Pv b r ic 2=s, d 4ty ,l%Qw bsx p l%I 2> ` Mask _?%Rx bwy kll_? 2>%J b ` tsFields 4PN%Sy bxz %DPN? 2>%K b ` e Component g%Tz by{ g 2>%L ` Field l%U{ bz| Tlpo 2?V UTUT` = bXkbKeyTypeNamesMask _?%V| b{} _?ha 2?ds  UTUT  =%N first_type, URUT@ = num_types PN%W} b|z oPN 2? UTUT` = Xkb->map =FP` %X~ b r  s>B %%Y ~ >B %   UUds TCore protocol `xJ"-N%Z ~ yxJ"-N'? b  tsUUdt T Xkb-aware UUdu T%DServer NUUdv T>!Maintains Xkb State and Mapping, n$UUdw T'core kb mapping, but not core kb state g7l7%[ k  ~ 67l7oKe.g%\ ~ oKe.g'XkbKey UUdx T b Xkb-unaware UUdy TClient 2UUdz TUT Core kb Xlib i$UUd{ TUTXkb-unaware App tyBO%] n ~oBOBOKO%^ n~`KOOKO%_ n0~%O O X XqV5 ! XqV9Dfe2 g  kma XqV9Dfe 1q ׼@K2 g   q ׼@K z]/%Q@2 a  z]/%Q@K,ú+%Qz]//Ub66fbM(7Ael2 a  UUfbM(7Aelwarv/1m0(7fbM1v o8ne;7@2 a  UUne;7@warAp~#u37ne;&6;wn-dq0@l3 a  q0@lO(7Qx0q:0{ZA_U}9@3 a  }9@%_ nۥ@ h9}CJ1/.O@3 a  /.O@5~=k.O/7b>pfbM7/{-nh3 a ZfbM7/{-nhbZ64j3 a  %ZbZ64j==p5zM>b1BtoZbZ64j3 a 2bZ64j%Q@3 a  2%Q@kma,ú1%Qw/UD66#(7A5l3 a  #(7A5l@#/1+(7"X1v 8 7@3 a  /U 7@Ael #)7k&6;8-d40@l3  a  Mv 40@l@47Q0t:0A_U9@3  a  ;6;9@l@ 9 CNJ1~.O@3  a  0~.O@@~5~=.Ow7LD>p~7/{-nh3  a ~7/{-nh̲Z64j3  a  @̲Z64j5~=k̲5z̲M>&1BZ̲Z64j3 a 7{̲Z64jFr3P F3 a  Fr3P FF|F| 4Rotated SectionsS 3 x S @n S -S 3 x ú-S D6-n S Z Z3 r 5lZ Z+H I K3 c aH I Kl  kHH3 c HHl H$1&3 c  ;H$1&l   H I K3 c~H I Kl   /{HH3 c 7{HHl   ZH$1&3 c ZH$1&l   4jl 3 b  l l l u3 b  l ul    xl 3 b  -l l   Zl 3 b  cl l    HH3 b c HHl     HH3 b cHHl     HH3 b 2cHHl  3 3  HH3 b 4c HHl ? 5 5  R3[vJ% b"c@#q1&}n % gj}n k % gk : % g3: n % gn x\!7 % g-\!7  % g 3o % go m % g bm -; =p % g -; =p Hk % gk : % g: bޡ7 % gޡ7   % gb H7p % g ?7p \!7t % g\!7t Ff'8fV % % gFf'8fV % Ul8fV % % gUl8fV % ds|8fV % % gds|8fV % Ff'8fV+33 % gFf'8fV+33 Ff' % % gFf' % Ul % % gUl % ds| % % gds| % Ff'+33 % gFf'+33 Ff'F̽ % % gFf'F̽ % UlF̽ % % gUlF̽ % ds|F̽ % % g ds|F̽ % Ff'F̽+33 % gFf'F̽+33 Ff'8fV+3333% gbFf'8fV+3333Ulc % % g Ulc % Ff'q % % gFf'q % Ulq % % gUlq % ds|q % % gds|q % Ff'q+33 % gFf'q+33 Ff'+33a33% gFf'+33a33X̽4̽f7O33% gX̽4̽f7O33 28fV % g28fV Z8fV % gZ8fV 8fV % g8fV 28fV % g28fV 28fV9 % g28fV9 8fV % g 8fV fV8fV % gfV8fV ̽8fV % g̽8fV 338fV % g8fV 8fV9 % g8fV9 j̽8fV % gj̽8fV y3#8fV % gy3#8fV 8fV % g8fV ̽8fV % g̽8fV a33j̽8fV9 % gj̽8fV9 \fV8fV % g\fV8fV \fV8fVf7 % g\fV8fVf7 "f'8fVff % g"f'8fVff f'F̽ % gf'F̽ ̍F̽ % g̍F̽  2F̽ % g 2F̽ ZF̽ % gZF̽ 3#F̽ % g3#F̽ F̽ % gF̽ F̽ % gF̽ 3#F̽ % g3#F̽ 3#F̽9 % g3#F̽9 qF̽ % gqF̽ fVF̽ % gfVF̽ ̽F̽ % g̽F̽ F̽ % gF̽ qF̽9 % gqF̽9 \fVF̽ % g\fVF̽ &[F̽p % g&[F̽p U3# % gU3# 2U3# % g2U3# ZU3# % gZU3# ̽U3# % g̽U3# 3#U3# % g3#U3# ϙU3# % gϙU3# ̽U3# % g̽U3# s̽U3# % gs̽U3# U3# % gU3# fVU3# % gfVU3# U3# % gU3# \fVU3# % g\fVU3# ̍U3# % g̍U3# \fVU3#f7 % g\fVU3#f7 Zr % gZr rl % grl fVr % gfVr \fVr % g  \fVr ('=r % g ('=r f'c % g   f'c ̍c % g    ̍c fVc % g    fVc ̽c % g  ̽c c % g  c 2c % g2c y3#c % gy3#c c % gc c % gc 3#c % g3#c \fVc33 % g\fVc33 2c' % g2c' \fVcf7 % g \fVcf7  \fV8fVf7 % g\fV8fVf7 \fVF̽f7 % g\fVF̽f7 \fV8fVE% g\fV8fVEx̍4̽@K% g.@x̍4̽@K (PJ F% g (PJ F22 |f'8fV % g-|f'8fV ̍8fV % g -̍8fV 28fV % g.28fV P8fV =p % g ".P8fV =p |f'F̽ % g!!-|f'F̽ ̍F̽ %! g " $-̍F̽ 2F̽ %" g!##.2F̽ PG( =pz%# g"$"&.3PG( =pz |f'U2 %$ g#%!%-|f'U2 ̍U2 %% g$&$)-̍U2 2U2 && g%'#'.72U2 |dq &' g&(&(.7|dq E2q &( g')'+.2q K|f'cZ &) g(*%*-|f'cZ F̍cZ &* g)+)-F̍cZ 2cZ &+ g*,(,.-2cZ Pc =pz&, g+-+-.-Pc =pz |f'8fV5&- g,.,..|f'8fV5*|f'8fV9Dff&. g-/@.|f'8fV9Dff-#R F& / g.0 -#R F"̽"̽ 4Editing%4* F& 0 g/1 24* F?? 4Function2UPJO F& 1 g02 g$UPJO F__ 4Alphar F& 2 g13 '2r F|̽|̽ 4 gr%L F& 3 g24 2r%L F|̽|̽ 4Keypad4̽;&4 y35g(4̽;|dJfV;4̽;'L\fV-f&5 z462'L\fV-f|f'Z'L\fVU3#\fVff&6 y57̍ff& gfVC&7 y68&C-_Z_Zff&8 z79.-_Zffz_Z_ZfV&9 y8:Dff}k&: y9;F}k22&; z:<20 g122JfV"̽33&< y;=i2JfV"̽33& JfV;JfV"̽JfV"̽ &= z<>AlJfV"̽ FJfV"̽U3#"̽B̍2ffl&> a=?B̍2ffl FX̽f7&? a>@FX̽f74x̍4̽@K&@ a?x̍4̽@K.ks!yg&A b$B%x2LG? &B {CACFG? 57.G &C {BDABDFfV.G C@G &D {CEACEF@G T &E {DFADFT G?G & F {EGAKG?G BEo &!G {FHAHKo o &"H {GIAGIKo o &#I {HJAHJKo 0 g? &$J {IKAIK y? 2oG &%K {JLAFPV̽oG GJG &&L {KMAMPfVG G &'M {LNALNPgG G &(N {MOAMOPG 4̽ &)O {NPANP̽ !GG &*P {OQAKQGG LOqG &+Q {PRAPRFqG h? &,R {QSAQSFh? %G? &-S gRTARTF%G? 7G &.T gSUASUF7G IG &/U gTVATVIG [G &0V gUWAU[K[G o &1W gVXAX[Ko o &2X gWYAWY[Ko o &3Y gXZAXZ[Ko ? &4Z gY[AY[V? oG &5[ gZ\AV\PoG WZG &6\ g[]A[]PgG G &7] g\^A\^PG G &8^ g]_A]_PG ć &9_ g^`A^`ć qG &:` g_aA_aFqG mL &;a g`bA`bFmL )?) &<b |acAacF)?) >) &=c |bdAbdF>) P) &>d |ceAceP) Go) &?e |dfAdfKGo) Go) &@f |egAeg[KGo) Go) &Ag |fhAfh[KGo) ?) &Bh |giAgi[K?) ) &Ci |hjAhj[) Ǟ) &Dj |ikAikPǞ) Ǟ) &Ek |jlAjlPǞ) ) &Fl |kmAkmP) qG)f &Gm |lnAlnPqG)f dF)! &Hn |moAmtdF)! DN; /&Io }npApDN; / GoN; /&Jp }oqAoqGoN; / GN; /&Kq }prAprGN; / qGN; /&Lr }qsAqsqGN; / o<N; /&Ms }rtAro<N; / 0; &Nt ~suAnu0; B; &Ou ~tvAtv[B; o; &Pv ~uwAuw[o; o; &Qw ~vxAvx[o; ?; &Rx ~wyAwy[?; G?; &Sy ~xzAxzG?; G; &Tz ~y{Ay{G; G; &U{ ~z|Az|G; G; &V| ~{}A{}G; ͇; &W} ~|~A|~͇; qG; &X~ ~}A}qG; /T;1 &Y ~~A~T;1 /qGN;1+ /&Z ~AqGN;1+ /os Ʋ &[ {A Ʋ / &\ gA // &] |A/ A &^ ~AA QƲ &_ }AQƲ  Ʋ R&` }A Ʋ R )4B &a }A  )4B   Row 1 )4B &b }A )4B & & Row 2 &)4B &c }A &U &)4B 8 8 Row 3 8)4B &d }A  8)4B J J Row 4W J)4B &e }A G J)4B \ \ Row 5qG1+Vez&f }AY ~qG1+VezFBy( &g }A Z ~By( By(cnBy(cn sTy( &h }A Ty( Ty((cnTy((cn )y^ &i }A/)y^ HuE@>&j b*:+z ~Q&k mQQ&l mQ@ ?Q&m m)B@ ?Q Q&n i  Q)Q&o j )Q $&$ UUd T XkbGeometryRec WQ&p k WQ4B WcWiQ&q kiQJ)Bici{Q&r k}{QqG{c{Q&s k~y(Qcny(cQ&t ky(Q(cny(cQ&u k/QHc$\XYE' ]&v m $\XYE' ]$\Xa$\Xa T properties$\XkEm4 ]&w m $\XkEm4 ]$\Xs$\Xs Tcolors$\X}E6 ]&x m )$\X}E6 ]$\X$\X Tshapes$\XE 3 ]&y m )$\XE 3 ]$\X$\X Tsections)$\XE!O ]&z m $\XE!O ]$\X$\X Tdoodadsd$\XE. ]&{ m  &p$\XE. ]$\X$\X T key_aliasesc?Q&| j c?Qi UUd XkbColorRec(s) qGUUd (array) ?'Q&} j ?'Q&t kUUd Ty(XkbPropertyRec(s) UUd T&u(array) ? Q&~ m? Q ]?]@ & m]?]@ @ Q& m@ QkECQ& mE6CQG`Q& mXG`QEK "Q& mXEK "Q$\X@ ]@ & m z m@ ]@ /@Q& kd/@Q&{/@c/@A@Q& kkeA@Qc?A@cA@@Q& k@Q@c@$\X XZ, ]& m es)$\X XZ, ]$\X)@$\X)@  label_color$\X2XZ+K ]& m $\X2XZ+K ]$\X;@$\X;@  base_colorD/QX& mortD/QXUUIQX& m~ mIQXN4QZ& m mN4QZ]$Q& j m$QQUUd TXkbSectionRec(s) UUd T(array) X`4Q& k&`4QXE`4a`4r4Q& kzr4Q r4ar44Q& k4Qc@4a44Q& k4Qc@4a4"`m ]& m "`m ]"i4"i4 Trows"r!O ]& m ]\X"r!O ]"{4"{4 Tdoodads ]" ]& m ]" ]"4"4 Tbounds"!܄ ]& m /"!܄ ]"4"4 Toverlaysd F@!H& pd F@!Hd F`F@D/[& mD/[})@QF?& m})@QF?x>@QH& mx>@QHrays$@ QH& ms$@ QHrDj Q& j &rDj Qz$&$UUd T doodads (s) UUd T@(array) s$-@ Q& ks$-@ Qs$-@ Ā$-@ s$?@ Q& k s$?@ Q ]s$?@ Ā$?@ s$Q@ Q& ks$Q@ Q!O]s$Q@ Ā$Q@ $-XU ]& m m$-XU ]$6@ $6@ T 4$?XU ]& m m$?XU ]$H@ $H@ T$QXU ]& m $QXU ]$Z@ $Z@ T?^@ <& m?^@ <$Q& m$QDQ& mDQ@>Q& m@>Q9V@& j 9V@ zUUd TXkbKeyAliasRec(s) UUd T(s(array) /Q& m&/Q$]@ & m $$]@ E4Q8& m]E4Q8s$JQ8& m$JQ8]O9Q6& mmO9Q6$ Q& j U Q ]$UUd T& XkbRowRec(s) UUd T(array) @ a9Q& kma9Q?a9ݿa9s9Q& ks9QDs9ݿs9aQ ]& m aQ ]j9j9 Tkeysve ]& m jve ] TboundsaFi@Y*& paFi@Y*UUaFi@YFi@Y# fQ& m/# fQ m<xQ& j $<xQ ]@ UUd XkbBoundsRec 4# fQ*& j# fQ*rD@[u?& jrD@[u??@4QF?& m?@4QF? ?@NQH& m]$?@NQH?@9QH& m?@9QHray9Q& j m9Q?s9Q kUUd T9 doodads (s) DUUd T(array) ]?@9Q& k]?@9QTke?@9?@9?@9Q& ke?@9Q?@9?@9?@9Q& k@Y?@9QaF@Y?@9?@9?X ]& m f?X ]?@9?@9 T j?X ]& m ?X ]?@9?@9 T?X ]& m R 4?X ]?@9?@9 T@4[u?& m@4[u?aFS(0& naFS(0aFSw,Sw,,`F,aF{s)9& n@NaF{s)9@9aF{s},{s7`Qhn(& n`Qhn(`QhnQhnU)Q8& m9U)Q8 $ZQ8 & m $ZQ8 ray _/Q6& m _/Q6?Q& j &?Q?@9@9UUd T XkbKeyRec(s) UUd T@Y(array) ? q/Q& k  q/Q ]? q/X q/ /Q& k  /Q ]? /X /vs* ]& m Rvs* ]v|9v|9 T shape_ndxv( ]& m v( ]v9v9 T color_ndx z ]& m FS z ] / / TɠQQ& mɠQQ},cQ& j cQ hnUUd XkbBoundsRec ɠQQ*& jɠQQ*`Q}@c(U& p`Q}@c(U6`Q}@cQc@ ^A& m@ ^A $^@ =& m$^@ =c`7V@> & p c`7V@> & kc`7u/`'V@>c`7&@/!&& q58/ c`7&@/!&& kc`7&@/qF&@/qFM@ 7M@c`79!& q47]c`79! c`79o`F9n7S@/ 7S@/ nQX& m m nQX)sQX& m_x)sQXxQZ& m] xQZۿQ& j ۿQUUd TXkbShapeRec(s) hnUUd T(array) Q& kQPQ& kQ}@cPQ& kQ@ PQ& k$QV@>P; ]& m k`7; ] Toutlines;7 ]& m /F;7 ] Tapprox; ]& m ; ] TprimaryX; ]& m ; ]ɿɿ Tbounds"Q& m  "Q})Q& m  })Qy@ Q& m    y@ Qu@ ,Q& m   khau@ ,QO#P%PbpK& p  &O#P%PbpKO#Pu NOf/%&  &Of/%Of/u /Of/%&  &Of/%Of>u /v Q?& j &v Q?$;UUd XkbOutlineRec(s) ;UUd (array) ouw@`"Q& mw@`"Q7u@ "]@ & m]u@ "]@  w@@4Q& j w@@4Q  UUd bo XkbBoundsRec OfN'& p"OfN'QOfNw`^n[& m n[h+ /& p,h+ /   h+u 'h/ O`& pp h/ O`O#Ph/uPw@`"Q*& mw@`"Q*d F & p/d F d Ff fN@ & q36 fN@ jz^ fzn fN`N 7X>02?& q9: 7X>02?UUV@}@}X> 7X>aF@>Ā?& naF@>Ā?d>@>x`F@>x`FXMaFY}c`7@NH& n "c`7@NH@4c`7@Ns 7@Ns 7@Nc`7>x f0nH & j x f0nH  d bo UUd T p(See Figure 13.5) 'H & j 'H [/UUd T(See Figure 13.5) ÀNQF?& m  )ÀNQF?Ȁ9QH& m!!)Ȁ9QH̀SQH&! m  #)̀SQH?@SQ&" j ?@SQ f fUUd T^ overlays (s) NUUd T(array) &߀SQ&# k$!$)UU߀SQ>߀Sa߀SSQ&$ k#%#%)F@>SQd>@>SaSSQ&% k$&$&)SQSaS"ߘ ]'& m%'%') &"ߘ ]"S"S T" ]'' m&(&() " ]"S"S T(S" ]'( m')') j" ]" S" S T?ÀN[u?') m(*/?ÀN[u?(aFn9'* n)aFn9 )aFnr`'nr`'؀aF؀1@H '+ j 91@H  #)UUd T(See Figure 13.6) c`7@>@/z@', n-c`7@>@/z@c`7@>`F@>`F!Nsf!NvaZ F'- i,. ?ayvaZ Fvlvl 4...$)M F'. i-/ SM FXoXo 4...F$U'M! F' / i.0 S$U'M! F$U'X/$U'X/ 4...$5C F' 0 i/1 $5C F$5Mv$5Mv 4..."$2 ? F' 1 i02 $2 ? F$2Y$2Y 4...vx F' 2 i13 ]vx FvO\vO\ 4...@p ' 3 246@p `p@px>S@ O@$'4 357x>S@ O@$P#S@x>S$x>M 0J'5 468'x>M 0J 9 Mx>M@> fpPX'6 i57 fpPX3c`79!'7 i68>@/c`79!4c`7&@/!''8 i797@>c`7&@/!'5P#X /'9 8:: ?P#X / FvP#XX 7X02n': i9 7X02n9K_K@^r@'; b,F,<- SYDQ'< i;>5YDQ' YD?Q'= j; vYD?Q 2022UUd TYXkbGeometryRec xYDN?Q'> k?;<?vYDN?QvO\YDN?DN?YD`?Q'? k>@;>@@YD`?Q`YD`?D`?YDr?Q'@ k?A;?A>YDr?QP#YDr?Dr?YD?Q'A k@B;@B>YD?Q9 YD?D?YD?Q'B kAC;AC fYD?Qc`7YD?D?YD?Q'C kBD;BD4`7YD?Q' iYD?D?kPX ' ]'D mCE;CE 'kPX ' ]kY?kY? T propertieskbX m4 ]'E mDF;DF ikbX m4 ]kk?kk? TcolorsktX 6 ]' F mEG;EG ktX 6 ]k}?k}? TshapeskX 3 ]'!G mFH;FH ' kX 3 ]k?k? TsectionsvkX !O ]'"H mGI;GI kX !O ]k?k? TdoodadsdkX . ]'#I mH;HP 'kX . ]k?k? T key_aliasesYDB: <Q'$J j; @>B: <Q`?YDUUd >XkbColorRec(s) UUd ?(array) P@/Q'%K mL;LOP@/Q?L?NQ'&L mKM;KMOAL?NQQH@IQ''M mLN;LNOH@IQDD"9Q'(N mMO;MOD?D"9QD/]@ ')O mNP;U]D/]@ KNY@&Q'*P kOQ;IQDY@&Qm4]Y@&@&YD8Q'+Q kPR;PRGEYD8QtX 6YD8D8YDQ',R kQS;QSmHYDQkX YDDk!, ]'-S mRT;RT '"k!, ]k k   label_colorkk)!+K ]'.T mSU;SV # mk)!+K ]k2k2  base_colorB/^A'/U mTV;'$B/^AOjy:_ F'0V mUW;TW jy:_ FjyE<jyE< 4...jfy F'1W mVX;V Ujfy Fjf/jf/ 4...K mN F/QX'2X mWY; YdNN F/QXL mI [QX'3Y mXZ;XZd@II [QXM mD A4QZ'4Z mY ;Y\d9D A4QZN mD A4Q'5[ j; /D A4QPY? T UUd TXkbShapeRec(s) QUUd T(array) DD A4Q'6\ k ];Z]dEDD A4Q6DD A4 A4D A4Q'7] k\^;\^dHDD A4QX DD A4 A4D A4Q'8^ k]_;]_d"D A4Q D A4 A4D A4Q'9_ k^`;^`dSD A4Q+K]D A4 A4V A ]':` m_a;_ad mVV A ]V A4V A4 ToutlinesV A7 ]';a m`b;`bd V A7 ]V A4V A4 TapproxV A ]'<b mac;acd yV A ]V A4V A4 TprimaryXV A ]'=c mbd;bd V A ]V A4V A4 TboundsD A/['>d mce;emD A/[ cW5 F'?e mdf;dm W5 FW5W5 4...Y Q6'@f me!;Y Q6Q%f'Ag j; UUQ%f A ];Z! AUUd T4XkbShapeDoodadRec(s) UUd T\ dY Q'Bh k!i;A4Y Q'8Y Y  Q'Ci khj;A4Y  Q'9Y   k H+ ]'Dj mik; A4k H+ ]k k  T color_ndx k H* ]'Ek mjl; nk H* ]k k  T shape_ndxn5~߻ F'Fl mkm; x An5~߻ Fn5~an5~a 4...D A/['Gm mln;rD A/[deYlK_Q$'Hn mm";"p] AYlK_Q$boT\v _'Io j; mT\v _ ce mdf"UUd T5XkbTextDoodadRec(s) UUd T m !Yl]_Q'Jp k"q;nqYl]_QYl]_l]_kl`xX+ ]'Kq mpr;pr ]kl`xX+ ]kli` kli` T color_ndx nJK F'Lr mqs;q \ dnJK FnJVOqnJVOq 4...AZQH'Ms mr#; ZQH'CJ@s'Nt j; '9J@s H;#HUUd TXkbIndicatorDoodadRec(s) ]UUd T ZQ'Ou k#v;shZQFZZQ'Pv kuw;~aZQ/ZZQ'Qw kvx;l_ZQn m"ZlZ-> ]'Rx mwy; I jlZ-> ]ll T shape_ndx lZ7 ]'Sy mxz; lZ7 ]ll T on_color_ndxlZ9- ]'Tz my{; klZ9- ]ll T off_color_ndxnus? F'U{ mz|; pnus? Fnussnuss 4...TY Q6'V| m{$;sqY Q6KP Z?g'W} j; P Z?g H'C$UUd T XkbLogoDoodadRec(s) UUd T Y +Q'X~ k$;UUY +QcatDoY + +Y =Q'Y k~;O kY =QshY = =k .Z+ ]'Z m; P kk .Z+ ]k 7k 7 T color_ndx k @Z* ]'[ m; xk @Z* ]k Ik I T shape_ndxn5~ F'\ m; In5~ Fn5~$sn5~$s 4... shT\K__>@'] m;T\K__>@"rY@Q@%Ҁ*'^ m;ZY@Q@%Ҁ*WVn??'_ ;Vn??or_xVFD`nVn?@'` ;FVn?@4..VD`nV@N?/'a ;V@N?/gV@ND`}V>/0'b ;V>/0H'CV>C#nV&N/?'c ;R(sV&N/?dVe^C&NV*N/?'d ;V*N/?+ VC*NV.@n//'e ;V.@n//= VC.@nV1@N/_'f ;ZV1@N/_7V4C1@NVi/?/'g n; Vi/?/I Vi/h`i/h`"@^V|>^(@O'h n;I5~V|>^(@O$s5~V|>|>` 7X8V ]'i i; @ 7X8V ] 7@} 7@} T doodads arrayZ% FN' @ 'j r;_ % FN' @ V% Fn% F% FNLfN#``'/'k r;#``'/@#``#``H#``lK Ql6 p _'l ;N?6 p _@N`C#Y6 p6& ` _'m ;>/6& ` _>C@}& `6+h:@}*@Y ` 'n ;N/:@}*@Y ` e^C*@Y:@}4h9.Y _ 'o ;N/9.Y _ C@}.Y9:``<}1`` @'p ;n/<}1`` @D1``<}<`:B 1 ` 'q ;N/:B 1 ` 4D0J 1:B 17@>5 'r ;/?7@>5 i/`D0J57@>0&:V 's ;~V:V 5~VD`7:V 7i:1" ]'t i;  7i:1" ] 7P 7P T may contain do 7y}0K ]'u i;  7y}0K ] 7a2 7a2 T any of these 75W ]'v i; r 75W ] 7q 7q T doodad types``uXtK7 ]'w i; l uXtK7 ]u%@)u%@) TXkbGeometryRec,6@7ǃ ]'x i; >@7ǃ ]HH T repeated fromYuK9. ]'y i; }@YuK9. ]uTuT T Figure 16.4u(@J ]'z i; u(@J ]u1(Cu1(C TXkbColorRec, andu4(9- ]'{ i; `}u4(9- ]u=u= T XkbShapeRec/J?Tπ^h'| b.>5(/O?QX'} m%>0&O?QXO?QX'~ m5~O?QX O ?QZ' m% O ?QZ 7 Om?Q' j ] Om?Q 7a2%anUUd T]XkbSectionRec(s) UUd T(array) 7 O?Q' k%] O?Q; O?[O? O1?Q' kc O1?Q'x O1?[O1? OC?Q' kre OC?QK9 OC?[OC? OU?Q' ku OU?Q16. OU?[OU?OX&m ]' m ]OX&m ]O(?O(? TrowsuO1X&!O ]' m }uO1X&!O ]O:?O:? Tdoodads/OCX& ]' m >5OCX& ]OL?OL? TboundsOUX&!܄ ]' m OUX&!܄ ]O^?O^? Toverlays O?[' m O?[%PQ8' m&PQ8OQ8' mOQ8OQ6' m&kecOQ6\Q' j '\Q] O?&?UUd T XkbRowRec(s) UUd T'x(array) OO/Q' k&O/Q9O/O/OAQ' kOAQ6.OAOAO0+Q ]' m O0+Q ]O8O8 TkeysroE  ]' m }E  ]MM Tbounds\@)@WP' p\@)@WP]\@)@^)@P F' m P FP'odP'od 4...^?1  F' m m1  F1on1on 4...O[e' mO[e&`QF?' m'`QF?_7QH' m_7QH\ ` "QH' m' ` "QH `"Q' j `"QUUd'OUUd T kXkbOverlayRec (s) UUd T(array) ` Ġ"Q' k' ` Ġ"QQ ` Ġ"[` Ġ" ` ֠"Q' k ` ֠"QQ] ` ֠"[` ֠" ` "Q' k ` "QE  ` "[` "` Ƹw8 ]' m p` Ƹw8 ]` Ϡ,` Ϡ, T section_under^` ظwm ]' m ` ظwm ]` ,` , Trows..` w ]' m m` w ]` ,` , Tboundse; F' m e; Fe;/e;/ 4... O?[' m O?[ [u?' m [u?'?Q8 ' m?Q8 @Q8 ' m@Q8 ?Q7' m(?Q7Ove?b?' j ` ?b? kĠ"Q(` UUd TXkbOverlayRowRec (s) UUd T(array) ]?Q' k(k?Q ` "???U+K ]' m m?U+K ]? ? T row_under,E F' m mE FEfEf 4...,?;Q' m)) m?;Q m?TQ' j se;?TQ m)e;UUd  XkbBoundsRec m?;Q*' j)*?;Q*)B`[ _@' j B`[ _@Q8 *UUd XkbOverlayKeyRec(s) UUd (array) mV ABQ' m**V ABQ jR [P3Q' mkR [P3QMQ-Q' mUMQ-QowRI<MQ' mI<MQ k\@!' n"?\@!UK\@~~\@[N@NW ' noun[N@NW F[N@Nn@Nn^F' nfn^FQn^J}^[NNW/U' n[NNW/U[NN@}EN?Q' r?Qe;??@Q ]' i '@Q ]  Tkeysn$/@/@O' nn$/@/@On^2^2$$WB@7ǃ ]' i XkWB@7ǃ ]WBIWBI T repeated frommWRL. ]' i WRL. ]WRTWRT T Figure 16.4WR(O|O ]' i -WR(O|O ]WR171WR171 TXkbSectionRec andRWR473 ]' i WR473 ]WR=KWR=K T XkbRowRecnB`[BdA' m@B`[BdA*Q' p++QW Q'  Q fn+NUUd  XkbBoundsRec Q*' +?Q*+HH' nHH@QHHl_2@w' b e=$  n}JF+K ]' b n^}JF+K ]$#4Oi4}JOi4  actual key iNqF(B ]' b BNqF(B ]csONqO  bounding vF ]' b RvF ]IOuvOu detailedg4Q ]' b ]Rg4Q ]IZg4Z outline3UtG3^< ]' b UtG3^< ]sڐPUtP approximating eR ]' b eR ]sڐ[se[s outlineP <gK ' r'P <gK P <gP <p Lpg 2 ]' i Ng 2 ]oxox  outline arrayfgK ' rfgK H0ug0upfpP <g9 ~' iP <g9 ~VZ:$' ieVZ:$EN:$' iEN:$FG ]' i iqG ]ÑPP primaryNqR ]' i vR ]Ñ[ل[ل outlinevUtG3^<i' ig4UtG3^<iGi?' iGi?vF ' i vF Qک ]' i Qک ]$#4ZyZy surface[QB ]' i [QB ]csZ[Z boxgNqF(B ' i NqF(B }JF+K ' ix}JF+K EN:CM' iEN:CM4;@#' i ~4;@#C6p(330(.4.4 ',4/+4/+4p++`,`'+$`'+$/* `7*@ `7*@ 7*@7*@7*@`'*()<)<'(<`7'<`7'<'& 4 $, $, !@, , ,'0 77: $ @>4 @>4,B49`F49`F4:6 $<`'<`'=P#>@>@>'?/`?/`?/,P(?/9@4?/9@4>@6:(=><=><<0:=$:7=`,:7=`, /=`,`'=`,`'=`,p+<4/;</;< ':89@49@46p(`;@#(' i '`;@#( C`70 `4`,`4`,`1 `.`.h-`p,`p,Pl, $@h+4@h+4X+`,@I+$@I+$`+$x+$x+$ @h*  Y* Y* h) @x(` @x(` h& Y%`  Y%`  Y"  Y  Y  hx@$x@$d Q QU*@Y*@Y+`-@h@$-@h@$.0d`$/ `$/ `$/h(/p ,/p ,/p- /p:/p:/ x; .`=`,.`=`,-|=4+x> <+x> <p> <@h> <@h> <Pl=`,`p<`p<h;P`:`:`70 `F9;@#?' i <`F9;@#?`7<V>)V9>9>*`F*`F>)d' a>4,,6 $HH' b 'HHP(--=><,N$-$ 4`'aNote that changes to attributes of controls in the  {XkbControlsRec 4 structure are apparent  4`Yonly when the associated control is enabled, although the corresponding values are still " 4@hfupdated in the X server. For example, the  repeat_delay 4 and  repeat_interval 4 fields are / 4` `ignored unless the  {RepeatKeys 4 control is enabled (that is, the X servers equivalent of `< }@$kxkb->ctrls 4 has  {XkbRepeatKeyMask 4 set in  -enabled_ctrls 4). It is permissible to modify the > <I 4@h]attributes of a control in one call to XkbSetControls and enable the control in a subsequent iVD 4<Rcall. See section 10.1.1 for more information on enabling and disabling controls. k$ 4hNote that the  enabled_ctrls 4 field is itself a control the  {EnabledControls 4 control. As x 4]such, to set a specific configuration of enabled and disabled boolean controls, you must set i in_enabled_ctrls 4 to the appropriate bits to enable only the controls you want and disable all d c 4 a]others, then specify the  {XkbControlsEnabledMask 4 in a call to  XkbSetControls 4. e 4peWBecause this is somewhat awkward if all you want to do is enable and disable controls, the 4 ]and not modify any of their attributes, a convenience function is also provided for this purD 4 i9pose ( XkbChangeEnabledControls 4, section 10.1.1). tl 3(The XkbControlsChangesRec Structure in$ 4tCZThe  {XkbControlsChangesRec 4 structure allows applications to track modifications to  4ataan  {XkbControlsRec 4 structure and thereby reduce the amount of traffic sent to the server. i 4ntXThe same  {XkbControlsChangesRec 4 structure may be used in several successive modifi  4 e_fications to the same  {XkbControlsRec 4 structure, then subsequently used to cause all of e a 4 eRthe changes, and only the changes, to be propagated to the server. The  {XkbCon'D {X5trolsChangesRec 4 structure is defined as follows: l;UTUT$ =%typedef struct _XkbControlsChanges { aHURUT = tLunsigned int changed_ctrls;/* bits indicating changed control data */ nyUUPUT =esYunsigned int enabled_ctrls_changes;/* bits indicating enabled/disabled controls */ CbUNUT =lsVBool num_groups_changed;/*  {True = if number of keyboard groups changed */ oULUTL =tC<}  XkbControlsChangesRec =,*XkbControlsChangesPtr; on$ 4at`The  }changed_ctrls 4 field is a mask specifying which logical sets of data in the controls t 4 sfstructure have been modified. In this context, modified means  set 4, that is, if a value is set  4Wto the same value it previously contained, it has still been modified, and is noted as ly  4ofachanged. Valid values for  changed_ctrls 4 are any combination of the masks listed in Table { 4a10.7 that have ok in the  }changed_ctrls 4 column. Setting a bit implies the corresponding t 4esUdata fields from the Relevant XkbControlsRec Data Fields column in Table 10.6 have o 4UPibeen modified. The  enabled_ctrls_changes 4 field specifies which bits in the  enabled_ctrls 4 C 4lsFfield have changed. If the number of keyboard groups has changed, the D UL5num_groups_changed 4 field is set to  {True 4. X$ 4trWIf you have an Xkb description with controls that have been modified and an  {XkbConcal  {heYtrolsChangesRec 4 that describes the changes that have been made, the  XkbChangeCone ha]trols 4 function provides a flexible method for updating the controls in a server to match &D 4d,+those in the changed keyboard description. nge;UJUTl =r >Bool  tXkbChangeControls =( dpy, xkb, changes =) HUHUTd =6Display * dpy =;/* connection to X server */ UUFUTd = aUXkbDescPtr xkb =;/* keyboard description with changed  xkb->ctrls = */ bbUDUTd =ie^XkbControlsChangesPtr changes =;/* which parts of  xkb->ctrls = have changed */ u$ fi`XkbChangeControls 4 copies any controls fields specified by  }changes 4 from the keyboard r D 4 hddescription controls structure,  }xkb 4-> ctrls 4, to the server specified by  }dpy 4. d' atco--fi aHH' b rsCHHUcr**ve been -OXk*l 3.Tracking Changes to Keyboard Controls $x 4heYWhenever a field in the controls structure changes in the servers keyboard description, t)x 4athe server sends an  {XkbControlsNotify 4 event to all interested clients.To receive  {Xkba6x {/bControlsNotify 4 events under all possible conditions, use  XkbSelectEvents 4 (see section CDx 4kbh4.3) and pass  {XkbControlsNotifyMask 4 in both  }bits_to_change 4 and  }values_for_bits 4. ctX$y 4ed]To receive  {XkbControlsNotify 4 events only under certain conditions, use  XkbSelectney eyfEventDetails 4 using  {XkbControlsNotify 4 as the  }event_type 4 and specifying the desired rDy 4pyestate changes in  }bits_to_change 4 and  }values_for_bits 4 using mask bits from Table 10.7. d 4MThe structure for the  {XkbControlsNotify 4 event is defined as follows: OUTUT$t =typedef struct { rURUTt =Ke1inttype;/* Xkb extension base event code */ aUPUTt =ro@unsigned longserial;/* X server serial number for event */ UNUTt =seBBoolsend_event;/*  {True = => synthetically generated */ ULUTt =XLDisplay *display;/*  1server connection where event generated = */ onUJUTt =ct=Timetime;/*  1server time when event generated = */ UHUTt =as2intxkb_type;/*  pXkbCompatMapNotify = */ UFUTt =Nintdevice;/* Xkb device  1ID =, will not be  pXkbUseCoreKbd = */ UDUTt = Uunsigned intchanged_ctrls;/* bits indicating which controls data have changed*/ hUBUTt =4Junsigned intenabled_ctrls;/* controls currently enabled in server */ U@UTt = Wunsigned intenabled_ctrl_changes;/* bits indicating enabled/disabled controls */ re *U>UTt =tr;intnum_groups;/* current number of keyboard groups */ =7U<UTt = r@KeyCodekeycode;/* != 0 => keycode of key causing change */ e DU:UTt =t7charevent_type;/* Type of event causing change */ forQU8UTt =UTBcharreq_major;/* major event code of event causing change */ ^U6UTt =UTBcharreq_minor;/* minor event code of event causing change */ kU4UTLt = *&}  XkbControlsNotifyEvent =; ~$ 4 waThe  changed_ctrls 4 field specifies the controls components that have changed and consists D 4bof bits taken from the masks defined in Table 10.7 with ok in the  }changed_ctrls 4 column. $ 4haeThe controls currently enabled in the server are reported in the  enabled_ctrls 4 field. If any  4* acontrols were just enabled or disabled (that is, the contents of the  enabled_ctrls 4 field  4g _changed), they are flagged in the  enabled_ctrl_changes 4 field. The valid bits for these boa 4U<]fields are the masks listed in Table 10.7 with ok in the  }enabled_ctrls 4 column. The  veYnum_groups 4 field reports the number of groups bound to the key belonging to the most D 4f Qnumber of groups and is automatically updated when the keyboard mapping changes. e$ 4chkIf the change was caused by a request from a client, the  keycode 4 and  }event_type 4 fields are ls 4s wset to  {zero  4and the  req_major 4 and  req_minor 4 fields identify the request. The  req_major 4 le  4 imvalue is the same as the  =major extension opcode 4. Otherwise,  event_type 4 is set to the type of  4_ccevent that caused the change (one of  {KeyPress 4,  {KeyRelease 4,  {DeviceKeyPress 4, nte* {bl_DeviceKeyRelease 4,  {ButtonPress 4 or  {ButtonRelease 4), and  req_major 4 and ges7 litreq_minor 4 are undefined. If  }event_type 4 is  {KeyPress 4,  {KeyRelease 4,  {DeviceKeyPress 4,  D 4dor  {DeviceKeyRelease 4, the  keycode 4 field is set to the key that caused the change. If moQD }mevent_type 4 is  {ButtonPress 4 or  {ButtonRelease 4,  }keycode 4 contains the button number. fd' acen.. eHH' b s HHAan&&and  .Pfi&$? 4 TXWhen a client receives an  {XkbControlsNotify 4 event, it can note the changes in a oD? 4se8changes structure using  XkbNoteControlsChanges 4.  )UTUTl@ =auVvoid  tXkbNoteControlsChanges =( changes =,  new =,  wanted =) 6URUTdA =blPXkbControlsChangesPtr changes =;/* records changes indicated by new */ _mCUPUTdB =NXkbControlsNotifyEvent * new =;/* tells which things have changed */ PUNUTdC =elSunsigned int wanted =;/* tells which parts of new to record in changes */ , tc$D 4 faThe  }wanted 4 parameter is a bitwise inclusive OR of bits taken from the set of masks specitpD 4Befied in Table 10.7 with ok in the  }changed_ctrls 4 column.  XkbNoteControlsChanges 4 cop}D 4.jies any changes reported in  }new 4 and specified in  }wanted 4 into the changes record specified DD 4by  }old 4. &$E 4 T\Use  XkbGetControlsChanges 4 to update a local copy of a keyboard description with the DE 4chMchanges previously noted by one or more calls to  XkbNoteControlsChanges. oULUTlF =CoTStatus  tXkbGetControlsChanges =( dpy =,  xkb =,  changes =) XkUJUTdG =r6Display * dpy =;/* connection to X server */ UHUTdH =BCXkbDescPtr xkb =;/*  }xkb->ctrls = will be updated */ aveUFUTdI =UTaXkbNameChangesPtr changes =;/* indicates which parts of  }xkb->ctrls = to update */ t$J faXkbGetControlsChanges 4 examines the  }changes 4 parameter, queries the server for the nectJ 4Blessary information, and copies the results into the  }xkb 4-> }ctrls 4 keyboard description. If the J anxctrls 4 field of  }xkb 4 is  {NULL 4,  XkbGetControlsChanges 4 allocates and initializes it. To free the by"DJ Bctrls 4 field, use  XkbFreeControls 4 (see section 10.12). 7$K rdcXkbGetControlsChanges 4 returns  {Success 4 if successful and can generate  {BadAlloc 4, bNoDDK { o4BadImplementation, 4 and  {BadMatch 4 errors. ng]lL 3,1Allocating and Freeing an XkbControlsRec q$M 4py]The need to allocate an  qXkbControlsRec 4 structure seldom arises; Xkb creates one when >~M 4updan application calls  XkbGetControls 4 or a related function. For those situations where there xM 4pdeis not an  qXkbControlsRec 4 structure allocated in the  qXkbDescRec 4, allocate one by call DM 4 ning  XkbAllocControls 4. UDUTlN =co8Status  tXkbAllocControls =( xkb, which =) arUBUTdO =thPXkbDescPtr  xkb =;/* Xkb description in which to allocate ctrls rec */ etU@UTdP = Tunsigned int which =;/* mask of components of  ctrls = to allocate */ $Q  uXkbAllocControls 4 allocates the  ctrls 4 field of the  }xkb 4 parameter, initializes all fields to zero, eQ 4c}and returns  {Success 4. If the  ctrls 4 field is not  {NULL 4,  XkbAllocControls 4 simply returns  {SuceQ {sRcess 4. If  }xkb 4 is  {NULL 4,  XkbAllocControls 4 reports a  {BadMatch 4 error. If the  ctrls 4 field could DQ 4ca7not be allocated, it reports a  {BadAlloc 4 error. For$R 4whnThe  which 4 mask specifies the individual fields of the  }ctrls 4 structure to be allocated and can #R 4caZcontain any of the valid masks defined in Table 10.7. Because none of the currently exist0R 4 =^ing controls have any structures associated with them, which is currently of little practical =DR 4trvalue in this call. d' amk // tHH' b lCoHH'he$$the  }/Qte$$S 4todTo free memory used by the  ctrls 4 member of an  qXkbDescRec  4structure, use  XkbFree 4DS tr Controls: )UTUTlT =e?void  tXkbFreeControls =( xkb, which, free_all =) 6URUTdU =4TXkbDescPtr xkb =;/* Xkb description in which to free controls components */ caCUPUTdV =, Ounsigned int which =;/* mask of components of  ctrls = to free */ askPUNUTdW =ivMBool free_all =;/*  {True = => free everything + ctrls itself */ c$X anjXkbFreeControls 4 frees the specified components of the  ctrls 4 field in the  xkb 4 keyboard pX 4rugdescription and sets the corresponding structure component values to  {NULL 4 or  {zero 4. The all}X }ewhich 4 mask specifies the fields of  ctrls 4 to be freed and can contain any of the controls DX 4$components specified in Table 10.7. e $Y 4teuIf  }free_all 4 is  {True 4,  ,XkbFreeControls 4 frees every non- {NULL 4 structure component in the Y 4pcontrols, frees the  {XkbControlsRec 4 structure referenced by the  -ctrls 4 member of  }xkb 4, and URDY 4Xk sets  -ctrls 4 to  {NULL. ril& 3fr.The  pMiscellaneous Per-client Controls t $( 4wdYou can configure the boolean per-client controls which affect the  state 4 reported in button l( 4 =Zand key events. See section 12.1.1, 12.3, 12.5, and 16.3.11 of the XKB Protocol specificaD( 4tstion for more details. ld d* 4 kcTo get the current values of the  {per-client 4 controls, use  ,XkbGetPerClientControls 4. {N*ULUTl+ 1oEBool  q tXkbGetPerClientControls 1( dpy 1,  ctrls 1) f7UJUTd3 1be6Display * dpy 1;/* connection to X server */ DUHUTd4 1tsKunsigned int * ctrls 1;/* 1 bit => corresponding control is on */ TruW$6 ,ColXkbGetPerClientControls 4 backfills  }ctrls 4 with the  {per-client  4control attributes for this  dD6 44Wparticular client. It returns  {True 4 if successful, and  {False 4 otherwise. 4Xky$7 44cTo change the current values of the  {per-client 4 control attributes, use  ,XkbSetPerClient4wD7 ,e Controls. UFUTl8 1s EBool  w tXkbSetPerClientControls 1( dpy 1,  ctrls 1) =UDUTd; 1Se6Display * dpy 1;/* connection to X server */ UBUTd% 1=unsigned int change 1;/* 1 bit => change control */ kU@UTd) 1nt:unsigned int * value 1;/* 1 bit => control on */ $5 ,.bXkbSetPerClientControls  changes the per-client values for the controls selected by  }change 5 \Didto the corresponding value in  }value.  \Legal values for } change  \and } value \ are: ;5 }es@XkbPCF_GrabsUseXKBStateMask, XkbPCF_LookupStateWhenGrabbed, and on5 }s VXkbPCF_SendEventUsesXKBState.  \More than one control may be changed at one time by  5 \liiOR-ing the values together.  }XkbSetPerClientControls \ backfills  }value \ with the  {per-cli 5 { otent  \control attributes for this particular client.  4It returns  {True 4 if successful, and  {False 4 8#D5 4X otherwise. tCod' aDUT00 pyHH' b THH))t => cha0R k) UT UTl 2gnxX Library Controls 1 b$ 4/ TThe Xkb extension is composed of two parts: a server extension, and a client-side X e , 4byXlibrary extension. Chapter 10 discusses functions used to modify controls affecting the s 9 4a[behavior of the server portion of the Xkb extension. This chapter discusses functions used WheF 4_to modify controls that affect only the behavior of the client portion of the extension; these imeSD 45(controls are known as Library Controls. eth, 4 \\All of the Library Controls are boolean flags that may be enabled and disabled. The conesuD 4ar/trols can be divided into several categories: l, URUTd 18.C =ontrols affecting general string lookups UPUTd 1*C =ontrols affecting compose processing UNUTd 1&C =ontrols affecting event delivery , 4)aThere are two types of string lookups performed by  XLookupString 4. The first type  4_involves translating a single keycode into a string; the controls in the first category affect  4ar]this type of lookup. The second type involves translating a series of keysyms into a string; D 4 o@the controls in the second category affect this type of lookup. fu$ 4VAn Xkb implementation is required to support the programming interface for all of the  4 tXcontrols. However, an implementation may choose not to support the semantics associated \  4ry[with the controls that deal with compose processing. In this case, a program that accesses 4ar 4idYthese controls should still function normally; however, the feedback that would normally $D 40occur with the controls enabled may be missing. g =l 39Controls Affecting Keycode-to-String Translation )Q$ 4o `The first type of string lookups, which are here called  fsimple string lookups 4, involves ^ 4tiXtranslating a single keycode into a string. Because these simple lookups involve only a k 4e \single keycode, all of the information needed to do the translation is contained in the keyxD 4roQboard state in a single event. The controls affecting simple string lookups are: bd { rForceLatin1Lookup d {erConsumeLookupMods d { tLevelOneUsesShiftAndLock ll 3osForceLatin1Lookup $ 4fIf the  {ForceLatin1Lookup 4 control is enabled,  XLookupString 4 only returns strings using  4athe Latin1 character set. If  {ForceLatin1Lookup 4 is not enabled,  XLookupString 4 can  4^return characters that are not in the Latin1 set. By default, this control is disabled, allowD 4 T9ing characters outside of the Latin1 set to be returned. il 3arConsumeLookupMods +$ 4nvcSimple string lookups in  XLookupString 4 involve two different translation phases. The first s i8 4Yphase translates raw device keycodes to individual keysyms. The second phase attempts to nE 4[map the resulting keysym into a string of one or more characters. In the first phase, some kupRD 4Wof the modifiers are normally used to determine the appropriate shift level for a key. Leg$ 4LogThe  {ConsumeLookupMods 4 control determines whether or not  XLookupString 4  fconsumes 4  ct 4 Wthe modifiers it uses during the first phase of processing (mapping a keycode to a keyr s 4tiVsym). When a modifier is consumed, it is effectively removed from the working copy of d' adau11edalHH' b tdeHHbe''l 3ar$$1Sum' 4^the keyboard state information  XLookupString 4 is using and appears to be unset for the D 4remainder of the processing. r*$ 4 tcIf the  {ConsumeLookupMods 4 control is enabled,  XLookupString 4 does not use the modifito 7 4 m]ers used to translate the keycode of the event to a keysym when it is determining the string D 4thWassociated with a keysym. For example, assume the keymap for the A key only contains 4 Q 4 w_the shift modifier and the  {ConsumeLookupMods 4 control is enabled. If a user presses the es ^ ha{Shift 4 key and the  A 4 key while the  Num_Lock 4 key is locked,  XLookupString 4 uses the  {Shift 4 movk 4g Zmodifier when mapping the keycode for the a key to the keysym for A; subsequently, it x 4'^only uses the  {NumLock 4 modifier when determining the string associated with the keysym D 4A. $ 4teeIf the  {ConsumeLookupMods 4 control is not enabled,  XLookupString 4 uses all of the event n 4inVmodifiers to determine the string associated with a keysym. This behavior mirrors the D 4no?behavior of  XLookupString 4 in the core implementation. he $ 4nt\The  {ConsumeLookupMods 4 control is unset by default. For more information on modifier . D 4e "consumption, refer to Chapter 12. l 3"AlwaysConsumeShiftAndLock $ 4Mo_The  {AlwaysConsumeShiftAndLock 4 control, if enabled, forces  XLookupString 4 to con  4e gsume the  {Shift 4 and  {Lock 4 modifiers when processing all keys, even if the definition for ifi 4e Ythe key type does not specify these modifiers. The  {AlwaysConsumeShiftAndLock 4 conu*D 4kJtrol is unset by default. See section 15.2 for a discussion of key types. Cl 3 *Controls Affecting Compose Processing W$ 4 i[The second type of string lookup performed by  XLookupString 4 involves translating a o dd 4g Useries of keysyms into a string. Because these lookups can involve more than one key q 4 ^event, they require  XLookupString 4 to retain some state information between successive ~ 4orZcalls. The process of mapping a series of keysyms to a string is known as  fcompose proD f=cessing 4. The controls affecting compose processing are: ld {dLConsumeKeysOnComposeFail ,d {pS ComposeLED cond {BeepOnComposeFail $ 4ocWBecause different vendors have historically used different algorithms to implement com4e  4s Vpose processing, and these algorithms may be incompatible with the semantics required  4t Uby the Xkb compose processing controls, implementation of the compose processing conoD 4se-trols is optional in an Xkb implementation. dl 3okConsumeKeysOnComposeFail n$$ 4nsSSome compose processing algorithms signal the start of a compose sequence by a key ups1  4thXevent meaning start compose.The subsequent key events should normally result in a s> 4et\valid composition yielding a valid translation to a string. If the subsequent key events do trK 4fWnot have a valid translation, some decision must be made about what to do with the key areX 4 Revents that were processed while attempting the compose. The  {ConsumeKeysOnComd' acBe22veisHH' b entHHz))nd these2Ty ) {em]poseFail 4 control allows a client to specify what happens with the key events  XLookup D siRString 4 has been considering when it reaches a dead end in a compose sequence. *$ 4CoZIf the  {ConsumeKeysOnComposeFail 4 control is set, all keys associated with a failed 7 4Qcompose sequence should be consumed (discarded). If the  {ConsumeKeysOnComposesD {sh]Fail 4 control is not set, the key events associated with a failed compose sequence should nQD 4he1be processed as a normal sequence of key events. ofd 4nsEThe  {ConsumeKeysOnComposeFail 4 control is disabled by default. l 3evComposeLED oce$ 4in`The  {ComposeLED 4 control allows a client to specify whether or not an indicator should be 2 4isXset and cleared to provide feedback when compose processing is in progress. The control  4[does not specify which indicator should be used; the mapping for this is up to the individppe 4enaual implementation. If the  {ComposeLED 4 control is enabled, it specifies that an indicator  4. Tshould be set when a compose sequence is in progress and cleared when one is not in aD 4aiAprogress. The  {ComposeLED 4 control is disabled by default. a$ 4Co[While the Xkb extension does not specify the type of type of indicator to be used when the ted {poWComposeLED 4 control is implemented, a consistent convention between implementations . o 4nsYis to everyones benefit. If a named indicator is used for this purpose, the recommended v 4ceZname is  {Compose 4. Note that some implementations may use an unnamed, custom hardD 4ouware LED for this purpose. se6l 3roBeepOnComposeFail J$ 4n ^The  {BeepOnComposeFail 4 control allows a client to specify whether or not a bell should W 4s Ube activated to provide feedback when a compose sequence fails. The control does not d 4bl[specify the type of bell that should be used; the mapping for this is up to the individual ce q 4 c^implementation. If the  {BeepOnComposeFail 4 control is enabled, it specifies that a bell ~ 4 a\should be activated when a compose sequence fails. The  {BeepOnComposeFail 4 control is o  4ededisabled by default. If implemented, the bell should be activated using  XkbBell 4 or  XkbDetD viceBell 4. $ 4. YWhile the Xkb extension does not specify the type of bell to be used when the  {BeepOni {.XComposeFail 4 control is implemented, a consistent convention between implementations L 4e.\is to everyones benefit. If a named bell is used for this purpose, the recommended name is lD 4 a {ComposeFail 4. r ol 3d &Controls Effecting Event Delivery lP 3n IgnoreNewKeyboards co,/ 4aWhen Xkb is initialized, it implicitly forces requests for  {NewKeyboardNotify 4 events. n(/ 4ZThese events may be used by the Xkb library extension internally; they are normally trans5 / 4clated into core protocol  Y {MappingNotify 4 events before being passed to the client. While ntrB/ 4`delivering the event to the client is appropriate in most cases, it is not appropriate for some orO/ 4Zclients that maintain per-key data structures. This is because once the server has sent a \/ { bZNewKeyboardNotify 4 event, it is free to send the client events for all keys in the new i/ 4ioZrange and that range may be outside of the per-key data structures the client is maintainvD/ 4uring. hd' aa33HH' b vyHHrn ards co t 3U/$ 4zeYThe  {IgnoreNewKeyboards 4 control, if enabled, prevents Xkb from mapping  {NewKey/ { m`boardNotify 4 events to core  {MappingNotify 4 events and passing them to the client. The la"D 4occontrol is initially disabled. ts ;l: 3d &Manipulating the Library Controls O$ 4heYThe Library Controls are manipulated using functions that deal with bitmasks to indicate \ 4ntXwhich controls to manipulate. The controls are identified by the masks defined in Table iBL 4ey 11.1.  l 3re7Determining Which Library Controls are Implemented .$ 4e XTo determine which Library Controls are actually implemented, use  XkbXlibControlsIm;D hplemented 4. PUDUTl =Eunsigned int  tXkbXlibControlsImplemented =( display =) ]UBUTd =;Display * display =;/* connection to X server */ 3Up$ XXkbXlibControlsImplemented 4 returns a bitmask indicating the controls actually impleg }D 4Vmented in the Xkb library and is composed of an inclusive OR of bits from Table 11.1. l 3Th2Determining the State of the Library Controls d 4XTo determine the current state of the Library Controls, use  XkbGetXlibControls 4. aU@UTl =ng=unsigned int  tXkbGetXlibControls =( display =) U>UTd =ls;Display * display =;/* connection to X server */ ned$ _XkbGetXlibControls 4 returns the current state of the Library Controls as a bit mask that is  4\an inclusive OR of the control masks from Table 11.1 for the controls that are enabled. For  4 h\the optional compose processing controls, the fact that a control is enabled does not imply  D 4UB"that it is actually implemented. l 3ne/Changing the State of the Library Controls Xli3d 4edMTo change the state of the Library Controls, use  XkbSetXlibControls 4. HU<UTl =e VBool  tXkbSetXlibControls =( display, bits_to_change, values_for_bits =) UU:UTd =th;Display * display =;/* connection to X server */ detbU8UTd = sOunsigned long bits_to_change =;/* selects controls to be modified */ =ngoU6UTd =Zunsigned long values_for_bits =;/* turns selected controls on (1) or off (0) */ d' a44ls4HH' b oroHH@is\an inc4Vhe$ 11gXkbSetXlibControls 4 modifies the state of the controls selected by  }bits_to_change 4; only the s,  4ntccontrols selected by  }bits_to_change 4 are modified. If the bit corresponding to a control is l" 4 Snon in  }bits_to_change 4 and also on in  values_for_bits 4, the control is enabled. If the bit corre/ 4 4msponding to a control is on in  }bits_to_change 4 but off in  }values_for_bits 4, the control is dis <D 4thQabled.  }bits_to_change 4 should be an inclusive OR of bits from Table 11.1. sd' a/se55ie*/HH' b alHH t++n (1) or5W+ UT UTl 2  XInterpreting Key Events $ 4ZXkb provides functions to help developers interpret key events without having to directly , 4heXinterpret Xkb data structures. Xkb also modifies the behavior of several core X library le9D 4o_ functions. nlyRd 3%Effects of Xkb on the Core X Library _f$ 4mo`When support for Xkb is built into the X library, the  XOpenDisplay 4 function looks for a  s 4 ^compatible version of Xkb on the server. If it finds a compatible version, it initializes the   4indextension and enables  implicit support 4 for Xkb in a number of X library functions. This ab 4ha]makes it possible for clients to take advantage of nearly all Xkb features without having to  4\be rewritten or even recompiled, if they are built with shared libraries. This implicit sup t 4`port is invisible to most clients, but it can have side effects, so the extension includes ways D 4prto control or disable it. d 3keEffects of Xkb on Event State $ 4\Because  XOpenDisplay 4 initializes Xkb, some events contain an Xkb description of the le 4o_Zkeyboard state instead of that normally used by the core protocol. See section 17.1.1 for  4 fWmore information about the differences between Xkb keyboard state and that reported by D 4atthe core protocol. n t!l 3in+Effects of Xkb on MappingNotify Events 5$ 4exVWhen Xkb is missing or disabled, the X library tracks changes to the keyboard mapping B 4Yusing  {MappingNotify 4 events. Whenever the keyboard mapping is changed, the server tO 4_sends all clients a  {MappingNotify 4 event to report the change. When a client receives a imp\ {^MappingNotify 4 event, it is supposed to call  XRefreshKeyboardMapping 4 to update the iD 47keyboard description used internally by the X library. d~, 4kbcThe X Keyboard Extension uses  {XkbMapNotify 4 and  {XkbNewKeyboardNotify 4 events in  4 oSto track changes to the keyboard mapping. When an Xkb-aware client receives either e p 4on[event, it should call  XkbRefreshKeyboardMapping 4 to update the keyboard description st 4te]used internally by the X library. To avoid duplicate events, the X server does not send core D 4tseprotocol  {MappingNotify 4 events to a client that has selected for  {XkbMapNotify 4 events. $' 4^The implicit support for Xkb selects for  {XkbMapNotify 4 events. This means that clients ' 4_that do not explicitly use Xkb but that are using a version of the X library that has implicit s a' 4]support for Xkb do not receive  {MappingNotify 4 events over the wire. Clients that were ' 4Xnot written with Xkb in mind do not recognize or properly handle the new Xkb events, so X ' 4 u]the implicit support converts them to  {MappingNotify 4 events that report approximately o' 4 t[the same information, unless the client has explicitly selected for the Xkb version of the nt,D' 4event. hKe*$? 4toYAn Xkb-capable X server does not send events from keys that fall outside the legal range 7? 4 eZof keycodes expected by that client. Once the server sends a client an  {XkbNewKeyboardD? {t ^Notify 4 event, it reports events from all keys because it assumes that any client that has Q? 4 Yreceieved an  {XkbNewKeyboardNotify 4 event expects key events from the new range of c^? 4ha\keycodes. The implicit support for Xkb asks for  {XkbNewKeyboardNotify 4 events, so the Xkk? 4 {Yrange of keycodes reported to the client might vary without the clients knowledge. Most ex? 4 dWclients dont really care about the range of legal keycodes, but some clients maintain lic? 4s Sinformation about each key and might have problems with events that come from unex[thd' axic66veioHH' b eHHkb--ot send 6Xys-? 4al\pected keys. Such clients can set the  {XkbLC_IgnoreNewKeyboards 4 library control (see en? 4bo[section 11.3.1) to prevent the implicit support from requesting notification of changes to s t"D? 4t the legal range of keycodes. e;l@ 3ey,X Library Functions Affected by Xkb thOdA 48The following X library functions are modified by Xkb: skcUTUTdM ybXKeycodeToKeysym tpURUTd XKeysymToKeycode }UPUTd edXLookupKeysym UNUTd thXLookupString ULUTd XRefreshKeyboardMapping t UJUTd thXRebindKeysym $B 4e YThe implicit support for Xkb replaces a number of X library functions with versions that sB 4coUunderstand and use the X Keyboard Extension. In most cases, the semantics of the new B 4_versions are identical to those of the old, but there are occasional visible differences. This B 4^section lists all of the functions that are affected and the differences in behavior, if any, DB 4that are visible to clients. 1,C 4`The  XKeycodeToKeysym 4 function reports the keysym associated with a particular index of C 4Wfor a single key. The index specifies a column of symbols in the core keyboard mapping lowC 4tia(that is, as reported by the core protocol  GetKeyboardMapping 4 request). The order of the K'C 4Xsymbols in the core mapping does not necessarily correspond to the order of the symbols Ke4DC 4UJ7used by Xkb; section 17.1.3 describes the differences. imI,D 4 X\The  XKeysymToKeycode 4 function reports a keycode to which a particular keysym is ndVD 4boWbound. When Xkb is missing or disabled, this function looks in each column of the core e icD 4ofXkeyboard mapping in turn and returns the lowest numbered key that matches in the lowest iopD 4 fUnumbered group. When Xkb is present, this function uses the Xkb ordering for symbols }DD 4 t instead. 1,E 4aThe  XLookupKeysym 4 function reports the symbol in a specific column of the key associfE 4Zated with an event. Whether or not Xkb is present, the column specifies an index into the DE 4ticore symbol mapping. ,F 4olbThe  XLookupString 4 function reports the symbol and string associated with a key event, F 4esYtaking into account the keycode and keyboard state as reported in the event. When Xkb is 1F 4e ]disabled or missing,  XLookupString 4 uses the rules specified by the core protocol and dF 4cuYreports only ISO Latin-1 characters. When Xkb is present,  XLookupString 4 uses the F 4mnUexplicit keyboard group, key types, and rules specified by Xkb. When Xkb is present, uF tc_XLookupString 4 is allowed, but not required, to return strings in character sets other than thF 4 s[ISO Latin-1, depending on the current locale. If any key bindings are defined,  XLookupuncF ym[String 4 does not use any consumed modifiers (see sections 11.1.2 and 15.2) to determine or)DF 4t,matching bindings. an>,G 4dThe  XRefreshKeyboardMapping 4 function updates the X librarys internal representation of epK G 4d `the keyboard to reflect changes reported via  {MappingNotify 4 events. When Xkb is missoaXG 4edYing or disabled, this function reloads the entire modifier map or keyboard mapping. When eG 4ecXXkb is present, the implicit Xkb support keeps track of the changed components reported Wr G 4, aby each  {XkbMapNotify 4 event and updates only those pieces of the keyboard description G 4WhWthat have changed. If the implicit support has not noted any keyboard mapping changes, toDG cEXRefreshKeyboardMapping 4 updates the entire keyboard description. gd' ae 77HH' b oumHHSio((etermine7Y(,H 4s.aThe  XRebindKeysym 4 function associates a string with a keysym and a set of modifiers. iH 4tiVXkb does not directly change this function, but it does affect the way that the state "H 4s._reported in the event is compared to the state specified to  XRebindKeysym 4. When Xkb is ier/H 4ap`missing or disabled,  XLookupString 4 returns the specified string if the modifiers in the ge<H 4teZevent exactly match the modifiers from this call. When Xkb is present, any modifiers used IDH 4 dMto determine the keysym are consumed and are not used to look up the string. sbl 3bo#Xkb Event and Keymap Functions DGv$ 4oaWTo find the keysym bound to a particular key at a specified group and shift level, use D XkbKeycodeToKeysym 4. UTUTl 1'IKeySym  tXkbKeycodeToKeysym 1( dpy, kc, group, level 1) rURUTd 1.Display *dpy;/* connection to X server */ UPUTd 1on$KeyCodekc;/* key of interest */ aUNUTd 1 i.unsigned intgroup;/* group of interest */ ULUTd 1bu4unsigned intlevel;/* shift level of interest */ H$ th\XkbKeycodeToKeysym 4 returns the keysym bound to a particular group and shift level for a  4orgparticular key on the core keyboard. If  kc 4 is not a legal keycode for the core keyboard, or if 4te tcpgroup 4 or  level 4 are out of range for the specified key,  XkbKeycodeToKeysym 4 returns  {NoSymsyD { a bol 4. $ 4inTTo find the set of modifiers bound to a particular keysym on the core keyboard, use To'D ouXkbKeysymToModifiers 4. UTd =ieLunsigned int  state =;/* state for which symbol should be found */ thU<UTd =Punsigned int *  mods_rtrn =;/* backfilled with unconsumed modifiers */ ymU:UTd = VKeySym * sym_rtrn =;/* backfilled with symbol associated with key + state */ $ is_XkbLookupKeySym 4 is the equivalent of the core  XLookupKeySym 4 function. For the core tMa( 4lMnkeyboard, given a keycode  }key 4 and an Xkb state  }state 4,  XkbLookupKeySym 4 returns the sym5 4d5`bol associated with the key in  }sym_rtrn 4 and the list of modifiers that should still be kB 4r uapplied in  }mods_rtrn 4. The  }state 4 parameter is the state from a  {KeyPress 4 or  {KeyRelease 4 rOD 4nDevent.  XkbLookupKeySym 4 returns  {True 4 if it succeeds. tod' ad 88hi sHH' b ieHHota++ich symb8Zou+$ 4\Use  XkbLookupKeyBinding 4 to find the string bound to a key by  XRebindKeySym 4. L  ZXkbLookupKeyBinding 4 is the equivalent of the core  XLookupString 4 function. )UTUTl =Sy =int  tXkbLookupKeyBinding =( dpy =,  sym =,  state =,  buf =,  nbytes =,  extra_rtrn =) 6URUTd = X5Display *  dpy =;/* connection to server */ CUPUTd =3KeySym sym =;/* symbol to be looked up */ n PUNUTd = mNunsigned int state =;/* state for which string is to be looked up */ ]ULUTd = 4Jchar *  buf =;/* buffer into which returned string is written */ jUJUTd =ev5int  nbytes =;/* size of buffer in bytes */ wUHUTd =Iint *  extra_rtrn =;/* backfilled with number bytes overflow */ $ 'ZXRebindKeysym 4 binds an ASCII string to a specified keysym, so that the string and key 4Zsym are returned when the key is pressed and a specified list of modifiers are also being  4dheld down.  XkbLookupKeyBinding 4 returns in  }buf 4 the string associated with the keysym ti }tsym 4 and modifier state  }state 4.  }buf 4 is  {NULL 4 terminated unless theres an overflow. If the   4URestring returned is larger than  }nbytes 4, a count of bytes that does not fit into the buffer is  4bofreturned in  extra_rtrn 4.  XkbTranslateKeySym 4 returns the number of bytes that it placed D 4/ into  }buf 4. $ 4 WTo find the string and symbol associated with a keysym for a given keyboard state, use bytD f XkbTranslateKeySym 4. UTUFUTl =* int  tXkbTranslateKeySym =( dpy =,  sym_inout =,  mods =,  buf =,  nbytes =,  extra_rtrn =) UDUTd =m,7Display *  dpy =;/* connection to X server */ re)UBUTd =y TKeySym *  sym_inout =;/* symbol to be translated; result of translation */ d6U@UTd =KeLunsigned int  mods =;/* modifiers to apply to  sym_inout = */ CU>UTd =syJchar *  buf =;/* buffer into which returned string is written */ PU<UTd =an5int  nbytes =;/* size of buffer in bytes */ e]U:UTdx = }:int * extra_rtrn =;/* number of bytes overflow*/ p$ aXkbTranslateKeySym 4 applies the transformations specified in  }mods 4 to the symbol specia} 4lfied by  }sym_inout 4. It returns in  }buf 4 the string, if any, associated with the keysym for the or 4sthcurrent locale. If the transformations in  }mods 4 changes the keysym,  }sym_inout 4 is updated Ke 4=faccordingly. If the string returned is larger than  }nbytes 4, a count of bytes that does not fit  4dpjinto the buffer is returned in  extra_rtrn 4.  XkbTranslateKeySym 4 returns the number of bytes D 4t it placed into  }buf 4. $ 4 i\To update the keyboard description that is internal to the X library, use  XkbRefreshKey *D * boardMapping 4. U8UTl =ri<Status  tXkbRefreshKeyboardMapping =( event) f U6UTd = eGXkbMapNotifyEvent *  event =;/* event initiating remapping */ flo, \XkbRefreshKeyboardMapping 4 is the Xkb equivalent of the core  XRefreshKeyboardMapol aping   4function. It requests that the X server send the current key mapping information to t" 4or[this client. A client usually invokes  XkbRefreshKeyboardMapping 4 after receiving an ym,/ { ieXkbMapNotify 4 event.  XkbRefreshKeyboardMapping 4 returns  {Success 4 if it succeeds and c<D { d/BadMatch 4 if the event is not an Xkb event. isQ$ 4xtZThe  {XkbMapNotify 4 event can be generated when some client calls  XkbSetMap 4, ^ uf`XkbChangeMap 4,  XkbGetKeyboardByName 4, or any of the standard X library functions that , kD 4Ke1change the keyboard mapping or modifier mapping. Td' aKbo99f U6HH' b enHHat  9[ef d 4 tWTo translate a keycode to a key symbol and modifiers, use  XkbTranslateKeyCode 4.  UTUTl =quVBooll  tXkbTranslateKeyCode =( xkb, key, mods, mods_rtrn, keysym_rtrn) )URUTd =liLXkbDescPtr xkb =;/* keyboard description to use for translation */ 6UPUTd =Xk2KeyCode key =;/* keycode to translate */ CUNUTd =ccSunsigned int mods =;/* modifiers to apply when translating  key = */ XkPULUTd =Ounsigned int * mods_rtrn =;/* backfilled with unconsumed modifiers */ lls]UJUTd =, HKeySym * keysym_rtrn =;/* keysym resulting from translation */ nyp$ } lnmods_rtrn = is backfilled with the modifiers consumed by the translation process. 4  mods 4 is a bit} 4iwise inclusive OR of the legal modifier masks:  {ShiftMask 4,  {LockMask 4,  {ControlMask 4,  {kMod1Mask 4,  {Mod2Mask 4,  {Mod3Mask 4,  {Mod4Mask 4,  {Mod5Mask .The  qAlwaysConsumemod qbTfShiftAndLock  library control (see section 11.1.3), if enabled, causes  XkbTranslateKeyCode   sykto consume shift and lock.  XkbTranslateKeyCode 4 returns  qTrue 4 if the translation resulted in 6UPD 4Ke@a keysym, and  qFalse 4 if it resulted in  {NoSymbol 4. ccd' a a::ke =HH' b * HHpacmodifier  :\UT UT UTl_ 2"hKeyboard Geometry = 2 $` 4 *`The Xkb description of a keyboard includes an optional  keyboard geometry  4that describes on,` 4moUthe physical appearance of the keyboard. Keyboard geometry describes the shape, loca{9` 4{Ytion, and color of all keyboard keys or other visible keyboard components such as indica F` 4{Wtors. The information contained in a keyboard geometry is sufficient to allow a client k SD` 4 (Cprogram to draw an accurate two-dimensional image of the keyboard. h$a 4toTYou can retrieve a keyboard geometry from an X server that supports Xkb, or you can laua 4UP[allocate it from scratch and initialize it in a client program. The keyboard geometry need Da 4 aZnot have any correspondence with the physical keyboard that is connected to the X server. ,b 4p cGeometry measurements are specified in  mm 4/ 10 4 units. The origin (0,0) is in the top left corb 4[ner of the keyboard image. A components own origin is also its upper left corner. In some at b 4Xcases a component needs to be drawn rotated. For example, a special keyboard may have a peb 4\section of keys arranged in rows in a rectangular area, but the entire rectangle may not be dib 4`Zin alignment with the rest of the keyboard, and instead, it is rotated from horizontal by b 4`{30 o 4. Rotation for a geometry object is specified in  1 4/ 10  o   4increments about its origin. An ge"Lb 4erIexample of a keyboard with rotated sections is shown in Figure 13.1. d slc miz" eRotated Keyboard Sections f ,d 4a lSome geometry components include a  fpriority 4, which indicates the order in which overhd 4Xlapping objects should be drawn. Objects should be drawn in order from highest priority orDd 4he(0) to lowest (255). ,e 4ofkThe keyboard geometrys top-level = description is stored in a  {XkbGeometryRec = structure. 4 XcaDe 4ed5This structure contains three types of information: m$f 4QLists of items, not used to draw the basic keyboard, but indexed by the geometry ef 4 bQdescriptions that comprise the entire keyboard geometry (colors, geometry properi Df 4hoties, key aliases, shapes) 4`$g 4atLA number of singleton items that describe the keyboard as a whole (keyboard me(g 4inQname, width and height, a color for the keyboard as a whole, and a color for keyi5Dg 4 sboard key labels) Ddh 4oa5A list of the keyboards sections and nonkey doodads Wdi 4 aEThe top-level geometry is described in more detail in the following. ldj 4obZThe lists of items used by components of the keyboard geometry description is as follows: d' ae;; meyHH'! b XHHct22De 4ed;]re2UTUT,k =nf`The top-level keyboard geometry description includes a list of up to  {MaxColors = (32) bURUTk Xcolor names =. A color name is a string whose interpretation is not specified by Xkb. y UPUTk =_The  {XkbColorRec = structure provides a field for this name as well as a pixel field 1. scr+UNUTk =s YThe pixel field is a convenient place for an application to store a pixel value or color a7ULUTk =ol[definition, if it needs to. All other geometry data structures refer to colors using their ardCUJUTDk =nkindices in this global list. aOUHUT,l =om`The top-level keyboard geometry description includes a list of  fgeometry properties =. by[UFUTl = kSA geometry property associates an arbitrary string with an equally arbitrary name. gUDUTl =TGeometry properties can be used to provide hints to programs that display images of ctsUBUTl =Vkeyboards, but they are not interpreted by Xkb. No other geometry structures refer to U@UTl =inYgeometry properties. As an example of a possible use of  properties =, consider the lU>UTl =g Tpause/break key on most PC keyboards: the break symbol is usually on the front of ReU<UTDl =ovKthe key and is often a different color. A program might set a property to: =s U:UTdm =is/LBL_PAUS = {Pause/top/black,Break/front/red} piU8UT$n = aUand use the property information to draw the key with a front label as well as a top fU6UTDn = tlabel. CUJU4UT,o =indmThe top-level keyboard geometry description includes a list of  key aliases = (see Chapter udU2UTo =eoV18). Key aliases allow the keyboard layout designer to assign multiple key names to a U0UTDo =qu single key. nU.UT$p =SKey aliases defined in the geometry component of a keyboard mapping override those magU,UTp =Rdefined in the keycodes component of the server database, which are stored in the  U*UTp {UTYXkbNamesRec = ( }xkb->names =). Therefore, consider the key aliases defined by the oU(UTDp =UTBgeometry before considering key aliases supplied by the keycodes. ,U&UT,q =hebThe top-level keyboard geometry description includes a list of  fshapes =; other keyboard 8U$UTq =UTYcomponents refer to shapes by their index in this list. A shape consists of an arbitrary sDU"UTq =or\name of type Atom and one or more closed-polygon  outlines =. All points in an outline U4PU UTq =[are specified relative to the origin of its enclosing shape, that is, whichever shape that pte\UUTq =o[contains this outline in its list of outlines. One outline is the primary outline. The priU0hUUTq =si_mary outline is by default the first outline, or it can be optionally specified by the  pripintUUTq agXmary = field in the  {XkbShapeRec = structure. A keyboard display application can stUUTq =UTTgenerate a simpler but still accurate keyboard image by displaying only the primary s UUTq =U(Voutlines for each shape. Nonrectangular keys must include a rectangular  approximaUUTq Xtion = as one of the outlines associated with the shape. The approximation is not norboUUTq =qPmally displayed but can be used by very simple keyboard display applications to anUUTDq =UT> A w HH(' b& e HHgi&& >`os&l 3ti Doodads r$ 4r XDoodads can be global to the keyboard or part of a section. Doodads have symbolic names A ) 4 {Vof arbitrary length. The only doodad name whose interpretation is specified by Xkb is 6D 4naJEdges, which, if present, describes the outline of the entire keyboard. K$ 4injEach doodads origin is stored in fields named  left 4 and  top 4, which are the coordinates of X 4(n_the doodads origin relative to its enclosing object, whether it be a section or the top-level e 4al\keyboard. The priority for doodads that are listed in the top-level geometry is relative to r 4a \the other doodads listed in the top-level geometry and the sections listed in the top-level   4`geometry. The priority for doodads listed in a section are relative to the other components  4&dof the section. Each doodad is stored in a structure with a  type 4 field, which specifies the D 4betype of doodad. bol 4ec(Xkb supports five types of doodads: UTUT, =rb]An  indicator doodad = describes one of the physical keyboard indicators. Indicator URUT  =chfdoodads specify the shape of the indicator, the indicator color when it is lit ( on_color =) UPUTD = n=and the indicator color when it is dark ( off_color =). UNUT, =(n_An  outline doodad = describes some aspect of the keyboard to be drawn as one or more ULUT =alUhollow, closed polygons. Outline doodads specify the shape, color, and angle of rotaiUJUTD =UTD = t%tion of the doodad about its origin. iRU<UT, =ol`A  logo doodad  =is a catch-all, which describes some other visible element of the keyUN^U:UT =AnRboard. A logo doodad is essentially an outline doodad with an additional symbolic jU8UT =UTVname that describes the element to be drawn. If a keyboard display program recognizes vU6UT =UTSthe symbolic name, it can draw something appropriate within the bounding region of U4UT =Uthe shape specified in the doodad. If the symbolic name does not describe a recognizFU2UT =fiWable image, it should draw an outline using the specified shape, outline, and angle of t tU0UTD =Orotation. The Xkb extension does not specify the interpretation of logo names. $ 4scbThe structures these doodads are stored in and the values of the  type 4 fields are shown in BL 4ndTable 13.1. dAl 3an&Overlay Rows and Overlay Keys U$ 4adgAn  overlay row 4 ( {XkbOverlayRowRec 4) contains a pointer to the row it overlays and a list othbD 4 oof  overlay keys 4. w$ 4o _Each overlay key definition ( {XkbOverlayKeyRec 4) indicates a key that can yield multiple at  4en^keycodes and consists of a field named  under 4, which specifies the primary name of the d(( ahbo?? UTHH() b( .f HH n  U2UT?aab  4n ^key and a field named  over 4, which specifies the name for the key when the overlay key 4 nccode is selected. The key specified in  under 4 must be a member of the section that contains e s"D 4alQthe overlay key definition, while the key specified in  over 4 must not be. d;l 3an&Drawing a Keyboard Representation Od 4adGTo draw a representation of the keyboard, draw in the following order: thcUTUTd ) =anHDraw the top-level keyboard as a rectangle, using its width and height. pURUTd = kUFor each component (section or doodad) of the top-level geometry, in priority order: }UPUTd =keIf component is a section d nUNUTdx =, 7For each row, in the order it appears in the section ULUTd =1Draw keys in the order they appear in the row UJUTd =5Draw doodads within the section in priority order. UHUTd =Else draw doodad d(* a @@ thnaHH(+ b* HH@>ct  und@b al 3t Geometry Data Structures l$ 4de]In the following figures, a solid arrow denotes a pointer to an array of structures or a sinn)"L 4seTgleton structure. A dotted arrow denotes an index or a pointer into the array.z ll@>l UT%Xkb Geometry Data Structures yd(, aehtAA FoeaHH(- b, -veHH@y  =keI;;Ac aUU"l x @l he+Xkb Geometry Data Structures (Doodads) d(. apr BB HH( / b. ry HHBd("l 4 @l na,Xkb Geometry Data Structures (Overlays) 4UT$ =@>Mtypedef struct _XkbGeometry {/* top-level keyboard geometry structure */ 2UT =a !Atomname;/* keyboard name */ n0UT =urIunsigned shortwidth_mm;/* keyboard width in  mm =/ 10 = */ .UT =glKunsigned shortheight_mm;/* keyboard height in  mm =/ 10 = */ z,UT =/char *label_font;/* font for key labels */ *UT = aRXkbColorPtrlabel_color;/* color for key labels - pointer into colors array */ (UT =UXkbColorPtrbase_color;/* color for basic keyboard - pointer into colors array */ U&UT =@?unsigned shortsz_properties;/* size of properties array */  $UT =(7unsigned shortsz_colors;/* size of colors array */ H"UT =( 7unsigned shortsz_shapes;/* size of shapes array */ ' UT =;unsigned shortsz_sections;/* size of sections array */ 4UT =Ge9unsigned shortsz_doodads;/* size of doodads array */ yAUT =eoAunsigned shortsz_key_aliases;/* size of key aliases array */ NUT =meTunsigned shortnum_properties;/* number of properties in the properties array */ id[UT = Hunsigned shortnum_colors;/* number of colors in the colors array */ hehUT =/Hunsigned shortnum_shapes;/* number of shapes in the shapes array */ luUT =UTNunsigned shortnum_sections;/* number of sections in the sections array */ UT =(Kunsigned shortnum_doodads;/* number of doodads in the doodads array */ nteO( 0 n1~uOprortOc,w9( 1 k02~~uc,w9col[2;7( 2 n13~T[2;7ed or[272O( 3 n24~OszecOO(4 n35~euOdoodsO|oL:(5 r46~ Tgd |oL:ses7l7(6 a57~T7l7 l6(7 k6C~C9i il6arr87e-(8 ~ rnu87e-'f ay */ heCUUd| T Xkb-capable erUUd} TshClient y *UUd~ TXkb-aware Xlib hor$UUd T* Xkb-unaware App il6(9 aC:~(ul6C7gl6(: k9D~D< ragl6j87e-(; ~ j87e-'( 1 kDUUd T Xkb-aware UUd TClient UUd Td Xkb-aware Xlib 2$UUd TXkb-aware App gl6(< aD=~gl6D:r0.c  (= <>~>`r0.c  xp/|Y@ (> n=?~=@`Tgxp/|Y@ :esxp/c07|YKdj U (? n>@~LyKdj U 6eb@cKdj Ug)ث5 ](@ n?A~>` g)ث5 ]g)`g)` Tconfig0un  (A @B~BQe0un  0rj@@(B nAC~ACQUU0rj@@y *pvn0rjpqX5 ](C nBD~BQ kunpqX5 ]pq@lpq@l Tconfig2h  (D CE~E_2h  mP,h`(E nDF~DF_mP,h`03hmP,`n/ظQ ]( F nEG~E_ ( /ظQ ]/m/m Tstater;?  (!G FH~ Utr;?  Nl  ("H GI~IKkawNl  O@e$(#I nHJ~HJKO@e$ O@lO@eN5 ]($J nIK~IK YN5 ]NjNj TconfigN@e%5* (%K aJL~ N@e%5* HJ_amآ5 ](&L nKM~?xy cd_amآ5 ]_avW_avW TconfigMSÜ`('M nLN~NlcoMSÜ` Nb85 ]((N nMO~Ml Nb85 ]WU mNb m TXkbCQah@q@()O nNP~Pmrjah@q@(ah@qyorO0YQ ](*P nOQ~Olm coO0YQ ]O0YoO0Yo Tstate_0rj)4 (+Q aPR~0rj)4 AC@@(,R nQS~S},`n@@( @@@@@*Q ](-S nRT~R|} st@*Q ]@<@< TstateU|oL:(.T aSU~|oL: 5r;?O@ ((/U aTE~r;?O@ ( GTB %(0V ~ O@eTB % ($NEjUUd T@eXkb protocol '[  (1W EX~XjJa'[   .(ab0Z(2X nWY~W^jaW .(ab0ZfigS .(a"XyX$lN ](3Y nXZ~]^ $lN ]$u$u Tkbo  (4Z Y[~[\Xko  .u^(5[ nZ\~Z\.u^yor.u.@_o %^(6\ a[]~]o %^Z[!t" ](7] n\^~Y^ !t" ]!}f!}f Tmapping!lN"(8^ a]_~Xj!lN"Y]mP,h%"(9_ a^`~stmP,h%"DFg)|Y.# (:` a_a~(.g)|Y.# =@o  (;a `b~bf(/o  p;u@`\(<b nac~aef(0p;u@`\ O@e.u@p;_nS ](=c nbd~de nS ]nn Tkb" ](>d nce~ce X" ]kk TmappingZS"(?e adf~bf0ZS"cdp;o08$0(@f aeg~^ p;o08$0ae'N*W ](Ag nfh~hi (4'N*W ]'N* 'N* Tkb'" ](Bh ngi~gi \'" ]'go'go Tmapping'W"(Ci ahj~kq]'W"gh![*7$0(Dj aik~!![*7$0W^4[@c `(Ek njl~ipq(84[@c `4[@cKPdeMSÜ`(Fl akm~PmMSÜ`MNMSÜ+E)<(Gm aln~MSÜ+E)<Ol!P`(Hn nmo~opf!P` "u5 ](Io nnp~np f"u5 ]+"u TXkb_!P`(Jp aoq~kq!P`no'0=)l(Kq apr~> n'0=)liplP!P`(Lr nqs~stnZlP!P`mu0S5 ](Ms nrt~rt dmu0S5 ]v#\lmu0\l TXkb^lP!P`(Nt asu~Eu(AlP!P`rslP!PU`(Ou atv~b'lP!PU`Ete`(Pv nuw~wx'goe`pinf-5 ](Qw nvx~vx q]f-5 ]oP f- TXkbe`(Rx awy~Ly^e`vwKdj U-2,Ϩ(Sy axz~Kdj U-2,Ϩ?xO`(Tz ny{~{|O`MNu e5 ](U{ nz|~z| u e5 ]Lu L TXkb(HO`(V| a{}~S}uO`z{@!-O(W} a|~~@!-OR|(/'h ](X~ k}~1 (/'h ] ](Y k~~ !b"#> ]tdl+Bb+B yKeycodePc,w9(Z a~trc,w91~FoZ([ n  6FoZsuE]oFofK*2b ](\ k 6 AvfK*2b ]f yXkb State z X F(] k 6 `X FcXIcXI .v<*$Ȕ F(^ k 6 <*$Ȕ F<*/x:<*/x: .yB)@ F(_ k 6 U2B)@ FB)K?B)K? .d@ &J F(` k 6 n{@ &J F@ &T?@ &T? .  F(a k 6 u  F ڸ_ ڸ_ .H@h F(b k 6 u@h F@\@\ . M( F(c k 6 | M( F W: W: .@ F(d k 6 Ke@ FJ4J4 .& F(e k 6 B& F1616 .ZXDw3 ](f k 6 ~FXDw3 ]XM,XM, y LookupStateoYQ8y*ww ](g k 6 b]YQ8y*ww ]YZ .YZ . y Grab State:4fJ`* (h r 6:4fJ`* :4fJ`*ChJ`*ChJ`*_%(i r 6ChJ`*_%ChJ`*Ch`OFD"(j r 6FD"ChDFD:fS- (k r 6:fS- :fS-AhS-ATgS-R!(l r 6ATgS-R!ATgS-ATg`NTFC!(m r 6TFC!ATgCTFCGC (n r 6GC GC>TgC=g.@#u+(o r 6=g.@#u+=gN=g.@#<,TgL[ ](p k 6 <,TgL[ ]b<<,< yCompatibility Map-s=j ](q k 6 f k-s=j ]b-s yExplicit Override ControlsKR' ](r k 6 ; KR' ]E yCore Keyboard Mapea &O ](s k 6 : a &O ]a yXkb Keyboard Map%Th/(t a 6%Th/ :S %Y(u a 6S %Y ;-sTgjW3(v a 6 9(k-sTgjW3 (w a 6-Tg  9G@P(x r 6G@PTFCG@PݔO@PtH`P( (y r 6tH`P( GCtH`PtHZG@P5@ (z r 6G@P5@ =g@#G@PT@PTN`Q*` ({ r 6TN`Q*` <,TgTN`QTN[ Ȯ F(| k 6 < Ȯ F xT xT .=GS(} r 6=GS-sGS4NSl (~ bkl KEh K-Symbol Interpretation Match Criteria : ( b UTUTd< 8  ( b(u YUTUTd= 8W3 l}( b3l}(w6 `@ 7Match Criteria *( bP*O`P `A 7Value  ( bHZ (z6 `B 7@ Effect @#l#}( brl#} `Q<,Tg UTUThD p  XkbSI_NoneOf |#*( b xT#* S(} UTUT`E =(0) G# ( b#  UTUT F KENone of the bits  )that  are on in  mods  can be set, but rURUT@F other bits can be. l<}( bl<} < UTUThG p b XkbSI_AnyOfOrNone ?_@en( bT  /b`NQk( iFF`NQk`NQ( j `NQ *FUUd TXkbServerMapRec `N^Q( kF `N^Q`N^h`N^`NpQ( k b`NpQ`Nph`Np`NQ( kXk`NQ#`Nh`N`NQ( kS`NQUT`Nh`N(b" ]( m (b" ](j(j Tkey_actsUT(s ]( m Qe (s ]({({ Texplicit(+Nc ]( m (+Nc ](( T vmods[16]('` ]( m b('` ](( Tvmodmap b *:+Q( k *:+Qk *:+h *:+`L+Q( k`L+Q`L+h`L+`(+Q( k`(+Q`(+h`(+(+D.$ ]( m ((+D.$ ](4+(4+  size_acts(=D. ]( m k(=D. ](F+(F+ acts`NiBk ( piBk iBkUBk(TMӕ& ]( i (TMӕ& ](TVJ(TVJ  behaviorsN(qx&O ]( i (qx&O ](q"-(q"- num_actsac`H+Q( m Q`H+Q ]`3Q( mc]`3Q )kQ( mG )kQ > V@( j  > V@QGUUd Tunsigned char(s) UUd T(array) ( C+Q( mG C+Q` C+]@ ( mG` C+]@  >+^@ =( mm >+^@ =Gh]z@<H~( nh]z@<H~( mh]z@<fz@<f@[o@[i`[h@9F9UQ( ni`[h@9F9UQi`[h@9 ih@9 im%2% ]( o i%2% ]% % TKeyCodeVJx``@X?( q * ,ix``@X?(qxx``@X`o@Xw^O2?F( q & .(w^O2?F Qw^Dw^O2`nO2@Q( m]`3@Q )2Q( m )2Q >,Q( mH >,Q'V@( j 'V@H(aUUd Tunsigned short(s) UUd T(array) C@Q( mH C@Q >@]@ ( mH >@]@  6-Qf( q ) /] 6-Qf m] G6G66-_`6-@^@ =( a`[@^@ =H?HQ( m]?HQ?L@Q( m?L@Q@XOQ( mI`@XOQx``n@ b@( j n@ b@O2`nIUUd TXkbBehaviors(s) UUd T(array) (SQ( mI>SQ(H]@ ( mIH]@ Hb@=( aHb@=I *Q@$k( aUU *Q@$kFiV+J( p@iV+J miV+`oV+G1Q( m mG1Q >25Q( m q25Q]`(9,Q( mJ-`(9,Q^@ `=W V@( j @ `=W V@]JUUd T(unsigned short(s) UUd T(array) `B<Q( mJ`B<Qn@ `B1]@ ( mJ@ `B1]@ `=1^@ =( m`=1^@ =Jgq0Q( m(agq0QQc\4kQ( mc\4kQ]@_R7Q( mK@_R7Qb@ZgVkV@( j @ZgVkV@kUUKkUUd T(XkbActions(s) UUd T(array) [l;Q( mKm[l;QG[l0]@ ( mKm[l0]@ Zg0^@ =( mmJZg0^@ =KRTB`r( q ( -jRTB`r`= RT @`w_aw_B`mBi [@CH*( ni [@CH*ign si [@C c@C cE@m mE@mw`\^?1 ( q & + 'w`\^?1 Qw`\^w`\:k l:k ( b (^ UTUT` p@ XkbISOAction = J@ ( bJ@ ^ m UTUT` =\iso P1 ( bP1 ^Vk@ UTUT`I =16.1.8 i0- ( bi0- _ UTUThJ pXkXkbSA_SwitchScreen d- ( bm- _Gl UTUT`( p(XkbSwitchScreenAction = 0-J@ ( b-J@ @ _RTB UTUT`) = qscreen ( -P-1 ( b_aP-1 @C_( UTUT`* =16.1.9 @Ci0;( bm@mi0;( ' UTUT(+ pXkbSA_SetControls URUTH+ pXkbSA_LockControls ;( b^; @ cti UTUT`, pXkbCtrlsAction = ;J@( bm;J@ is UTUT`- =ctrls P;1( b@P;1 16i0 UTUT`. = b16.1.10 i0T ( bi0T witSc UTUTh/ pXkbSA_ActionMessage T ( bGlT Xkreect UTUT`0 pXkbMessgeAction = TJ@ ( b_TJ@ )een - UTUT`1 =msg bPT1 ( bCPT1 16.9 UTUT`2 =16.1.11 bi0b ( bi0b Xk UTUTh3 pURXkbSA_RedirectKey b ( b bb  UTUT`4 p XkbRedirectKeyAction = bJ@ ( bbbJ@  is UTUT`5 =UT redirect -Pb1 ( bPb1 16 UTUT`6 =UT16.1.12 bi0p( bi0p UTUT(7 pUTXkbSA_DeviceBtn A_URUTH7 pXKbSA_LockDeviceBtn p( bp 0MeseA UTUT`8 pXkbDeviceBtnAction = pJ@( benpJ@ P UTUT`9 = bdevbtn Pp1( b6.9Pp1 16i0 UTUT`: = b16.1.13 i0 ( bXki0 edict UTUTh; pXkbSA_DeviceValuator  ( bUT edcti UTUT`< pXkbDeviceValuatorAction = J@ ( b TUTJ@  -1 UTUT`= =devval P1 ( bTUTP1  b UTUT`> =16.1.14 Zi ( b TUTZi A_  A_URhB Modifier Action FlagsF i ( bi   UTUTdC 4ev Bly( b  bly   `D UTFlag y( b  byP  `E Meaning l.( b  bl. 0   UTUThF pctXkbSA_UseModMapMods Xk.( b b..   UTUT G = =If set, the action modifiers are determined by the modifiers URUTG = 9bound by the modifier mapping of the key. Otherwise, the TUPUTG =de;action modifiers are set to the modifiers specified by the *UNUT@G Fmask =,  real_mods =,  vmod1 =, and  vmod2 = fields. l( b_l  Mo UTUThH psXkbSA_ClearLocks ( b dCev UTUT I =>If set and no keys  1are physically depressed when this key URUT@I 1@transition occurs =, the server unlocks any action modifiers. l( bl  . UTUThJ pXkbSA_LatchToLock ( bt(  UTUT K =CIf set, and the action type is  pXkbSA_LatchMods =, the server = URUT@K =on8locks the action modifiers if they are already latched. Gl( bk. l UT =deac UTUThL p sXkbSA_LockNoLock c( b , v  an UTUT M =. BIf set, and the action type is  pXkbSA_LockMods =, the server URUT@M =Mo$only unlocks the action modifiers. ocl( bl  C UTUThN pIXkbSA_LockNoUnlock  1( bRUTon =,he UTUT O =y BIf set, and the action is  pXkbSA_LockMods =, the server only URUT@O =locks the action modifiers. j ( bxj y#hQ /!Device Valuator v_what High Bits Values ac ( bxeer ony#he tidV 4ey ed( a bLL rHH( b L sHHc c(( bL, (l ~Keyboard Geometry $ 4anSKeyboard geometry describes the physical appearance of the keyboard, including the loc$ 4fiZshape, location, and color of all keyboard keys or other visible keyboard components such 1 4N`as indicators and is stored in a  {XkbGeometryRec 4 structure. The information contained in > 4hePa keyboard geometry is sufficient to allow a client program to draw an accurate oKD 4O'two-dimensional image of the keyboard. `l bKeyboard Geometry Name o$ 4SThe keyboard geometry name describes the physical location, size, and shape of the |D 4 bOvarious keys on the keyboard and is part of the  {XkbNamesRec 4 structure.  el Keyboard State $ 4YKeyboard state encompasses all of the transitory information necessary to map a physical (D 4(/key press or release to an appropriate event. l me Keycode $ 4 gZA numeric value returned to the X server when a key on a keyboard is pressed or released,  4ioWindicating which key is being modulated. Keycode numbers are in the range 1 <= keycode D 4s @<= max, where max is the number of physical keys on the device. onl Keycode Name $ 4isQThe keycode name describes the range and meaning of the keycodes returned by the wD 4e ;keyboard and is part of the  {XkbNamesRec 4 structure. ry 1l" Latched Group @$# 4esYA latched group is a group index that is combined with the base and locked group to form oM# 4 i]the effective group. It applies only to the next key event that does not change the keyboard Z# 4KeZstate. The latched group can be changed by keyboard activity or via Xkb extension library gD# 4ke functions. lea|l& teLatched Modifier $' 4odYLatched modifiers are the set of modifiers that are combined with the base modifiers and ' 4as\the locked modifiers to form the effective modifiers. It applies only to the next key event raD' 4)that does not change the keyboard state. tl( caLED th$[ 4NA light emitting diode. However, for the purposes of the X keyboard extension D[ 4niYspecification, a LED is any form of visual two-state indicator that is either on or off. kl* ctLocked Group $+ 4heYA locked group is a group index that is combined with the base and latched group to form s+ 4 tYthe effective group. When a group is locked, it supersedes any previous locked group and a+ 4th\remains the locked group for all future key events, until a new group is locked. The locked o!D+ 4n Rgroup can be changed by keyboard activity or via Xkb extension library functions. 6l 'Locked Modifiers E$/ 4ifXLocked modifiers are the set of modifiers that are combined with the base modifiers and ieR/ 4ecXthe latched modifiers to form the effective modifiers. A locked modifier applies to all t _D/ 4d 3future key events until it is explicitly unlocked. $[d( at pMM wexnsHH( b L iHHwo** either M*l ed^Compat Name $ 4`The  compat 4 name is a string that provides some information about the rules used to bind t$D 4ou?actions to keys that are changed using core protocol requests. p a9l +_Compatibility State roH$g 4keSWhen an Xkb-extended X server connects to an Xkb-unaware client, the compatibility e cUDg 4 aHstate remaps the keyboard group into a core modifier whenever possible. Lojl `Compatibility Grab State eyd 4moWThe grab state that results from applying the compatibility map to the Xkb grab state. mol e aCompatibility Map d 4liQThe definition of how to map core protocol keyboard state to Xkb keyboard state. .lv bComponent Expression t$ 4TAn expression used to describe server keyboard database components to be loaded. It wo 4Tdescribes the order in which the components should be loaded and the rules by which D 4co)duplicate attributes should be resolved. el_ tCompose Processing $d 4acWThe process of mapping a series of keysyms to a string is known as compose processing. Col rocConsumed Modifier #$ 4 XTXkb normally consumes modifiers in determining the appropriate symbol for an event, st0 4bo^that is, the modifiers are not considered during any of the later stages of event processing. = 4_For those rare occasions when a modifier  should 4 be considered despite having been used moJD 4e Kto look up a symbol, key types include an optional  preserve 4 field. re _l stdCore Event rd nd 4)An event created from the core X server. l xpeDetectable Auto-Repeat r $ 4co]Detectable auto-repeat allows a client to detect an auto-repeating key. If a client requests h 4 t]and the server supports detectable auto-repeat, Xkb generates  {KeyRelease 4 events only  4os[when the key is physically released. Thus the client receives a number of  {KeyPress 4 is  4ro[events for that key without intervening  {KeyRelease 4 events until the key is finally nsuD 4et7released, when a  {KeyRelease 4 event is received. l tfEffective Group n$ 4 oWThe effective group is the arithmetic sum of the locked, latched, and base groups. The en  4ulYeffective keyboard group is always brought back into range depending on the value of the k {n \GroupsWrap 4 control for the keyboard. If an event occurs with an effective group that is  4 falegal for the keyboard as a whole, but not for the key in question, the group  for that event e ataonly 4 is normalized using the algorithm specified by the  group_info 4 member of the key h+D 4$symbol map ( {XkbSymMapRec 4). {@l ntgEffective Mask O$ 4 iZAn Xkb modifier definition consists of a set of bit masks corresponding to the eight real \ 4orZmodifiers; a similar set of bitmasks corresponding to the 16 named virtual modifiers; and i 4asXan effective mask. The effective mask represents the set of all real modifiers that can ouv 4^logically be set either by setting any of the real modifiers or by setting any of the virtual D 4ulmodifiers in the definition. ll( bxhvaly#\Grps `W orValue of high bits eve ( b x l y#eybrd `X otEffect keyl ( b!xel  y#maled UTUThY phm"XkbSA_IgnoreVal gr (! b "x Xky#c ). UTUT`Z = No action l (" b!#xbodl sty#t obi UTUTh[ pin$XkbSA_SetValMin  (# b"&xobi o y#medir UTUT`c d 2v_value = is set to its minimum legal value. H($ a frsH ^locaUU$] byqAnother possibility is to have the compose processing simply be the result of a finite state acceptor; a compose oUUD] Hsequence would never fail for a properly written finite state acceptor. d(% aNN vl )& b#'xbrdl Efy#l UTUThd p b%XkbSA_SetValCenter  )' b&(xY Vay# UTUT`e "-v_value = is centered (to (max-min)/2). l )( b')xl #y#bod UTUThf p&XkbSA_SetValMax UT  )) b(*x  &y#obi UTUT`z 2v_value = is set to its maximum legal value. l )* b)5xl y#frs UTUTh{ p'XkbSA_SetValRelative Z )+ b-eheZ mp$ relthi aModifier Action TypesE  ), brer e $ dj 4( al"l)- b+.l"l%#' `k Type "2). b-/b"2%  `l Effect Yl3l^) / b.0TUTl3l^ &ented UTUThm p XkbSA_SetMods 32^) 0 b/132^^UT&hf UTUT n 1MaBA key press adds any action modifiers to the keyboards base modiURUT@n 1ofiers. UT#UPUT o 1_vAA key release clears any action modifiers in the keyboards base .UNUTo 1Amodifiers, provided no other key affecting the same modifiers is 9ULUT@o 1tilogically down. DUJUT p 1EIf no other keys are physically depressed when this key is released, aOUHUTp 1ioPand  pXkbSA_ClearLocks 1 is set in the  flags 1 field, the key release e ZUFUT@p 1unlocks any action modifiers. ll) 1 b02ll '' UTUThq pXkbSA_LatchMods b2) 2 b132'Ef ct UTUT r 1=Key press and key release events have the same effect as for &URUTr pAXkbSA_SetMods 1; if no keys are physically depressed when this #UPUTr 1Bkey is released, key release events have the following additional .UNUT@r 1s effects: o9ULUT s 1URCModifiers unlocked due to  pXkbSA_ClearLocks 1 have no further s aDUJUT@s 1s effect. boOUHUT t 1UTNIf  pXkbSA_LatchToLock 1 is set in the  flags 1 field, a key release ZUFUTt 1tiAlocks and then unlatches any remaining action modifiers that are ieUDUT@t 1enalready latched. epUBUT u 1p;A key release latches any action modifiers not used by the  f{U@UT@u pas:XkbSA_ClearLocks 1 and  pXkbSA_LatchToLock 1 flags. ll^) 3 b24ll^ (UT UTUThv pXkbSA_LockMods 2^)4 b32^^( ctUT UTUT ) 1Ke_value = * (2 valScale =) is added to  v_value =. l) )6 b57xkA_l) y#) b UTUTh~ p2XkbSA_SetValAbsolute ) )7 b6xsse) nyy#er UTUT` 9v_value = is set to (2 valScale =) 1. = fHH)8 b% )seHHfan))UTNy )l0 moLookup State $1 4UTYThe lookup state is composed of the lookup group and the lookup modifiers, and it is the T$D1 4. Rstate an Xkb-capable or Xkb-aware client should use to map a keycode to a keysym. 9l2 of Modifier iH$3 4be_A modifier is a logical condition that is either set or unset. The modifiers control the Shift U3 4)WLevel selected when a key event occurs. Xkb supports the core protocol eight modifiers >_vb3 4al( {Shift 4,  {Lock 4,  {Control 4, and  {Mod1 4 through  {Mod5 4), called the  real 4 modifiers. In addition, UTo3 4XXkb extends modifier flexibility by providing a set of sixteen named virtual modifiers, |D3 4Ceach of which can be bound to any set of the eight real modifiers.  1l4 Modifier Key $5 4]A modifier key is a key whose operation has no immediate effect, but that, for as long as it o5 4 Wis held down, modifies the effect of other keys. A modifier key may be, for example, a ifiD5 4 Tshift key or a control key. Xl6 awModifier Definition ap$ 4ysbAn Xkb modifier definition, held in an  {XkbModsRec 4, consists of a set of real modifiers, a  4un]set of virtual modifiers, and an effective mask. The mask is the union of the real modifiers c 4 tUand the set of real modifiers to which the virtual modifiers map; the mask cannot be D 4ndexplicitly changed.  l d "Nonkeyboard Extension Device )$; 4ZAn input extension device that is not a keyboard. Other types of devices supported by the 6; 4Vinput extension include, but are not limited to: mice, tablets, touchscreens, barcode CD; 4MoWreaders, button boxes, trackballs, identifier devices, data gloves, and eye trackers. e eXl< or Outlines og$= 4 _An outline is a list of one or more points that describes a single closed polygon, used in the tD= 4t 'geometry specification for a keyboard. awlD inPhysical Indicator Mask An$E 4ni[The physical indicator mask is a field in the  {XkbIndicatorRec 4 that indicates which 4unE 4odcindicators are bound to physical LEDs on the keyboard; if a bit is set in  phys_indicators 4, thE 4fi]then the associated indicator has a physical LED associated with it. This field is necessary aDE 4Rbecause some indicators may not have corresponding physical LEDs on the keyboard. lF t "Physical Symbol Keyboard Name $G 4ZThe  symbols 4 keyboard name identifies the symbols logically bound to the keys. The G 4Vsymbols name is a human or application-readable description of the intended locale or G 4_usage of the keyboard with these symbols. The  phys_symbols 4 keyboard name, on the other tha DG 4leAhand, identifies the symbols actually engraved on the keyboard. ilH boPreserved Modifier in.$I 4icTXkb normally consumes modifiers in determining the appropriate symbol for an event, bI;I 4at^that is, the modifiers are not considered during any of the later stages of event processing. HI 4n _For those rare occasions when a modifier  should 4 be considered despite having been used D aUI 4 Tdto look up a symbol, key types include an optional  preserve 4 field. If a modifier is present cabDI 4oa:in the  preserve 4 list, it is a preserved modifier. d)9 aoaOO xbo lHH): b9 GHHOa ((dable deOhe(l hEffective Modifier e kd 4 sYThe effective modifiers are the bitwise union of the base, latched and locked modifiers. ,l boiExtension Device ;d 4HAny keyboard or other input device recognized by the X input extension. alPlL erjGlobal Keyboard Controls _$ 4ntXControls that affect the way Xkb generates key events. The controls affect all keys, as r lD 4ocPopposed to per-key controls that are for a single key. Global controls include 4zUTUTd 1spRepeatKeys Control D aURUTd 1 TDetectableAuto-repeat y tUPUTd 1ti SlowKeys eUNUTd 1f BounceKeys prULUTd 1 StickyKeys theUJUTd 1li MouseKeys UHUTd 1. MouseKeysAccel UFUTd 1 AccessXKeys UDUTd 1boAccessXTimeout UBUTd 1AccessXFeedback U@UTd 1( Overlay1 U>UTd 1 Overlay2 e U<UTd 1EnabledControls ctl kGrab State YTh-$ 4er[The grab state is the state used when matching events to passive grabs. It consists of the Ex:D 4#grab group and the grab modifiers. er Ol ni lGroup ^d 4alSee Keysym Group rsl armGroup Index $ 4roVA number used as the internal representation for a group number. Group1 through Group D 4op4 have indices of 0 through 3. e fl lonGroups Wrap Control UT$ 4ReRIf a group index exceeds the maximum number of groups permitted for the specified  4UNPkeyboard, it is wrapped or truncated back into range as specified by the global D {UHNGroupsWrap   4control.  {GroupsWrap 4 can have the following values: U:UTd ssWrapIntoRange U8UTd AcClampIntoRange U@U6UTd OvRedirectIntoRange 1 1 l UT oKey Type n$ 4^An attribute of a key that identifies which modifiers affect the shift level of a key and the 'D 4 pnumber of groups on the key. e<l pKey Width Kd 4fiXThe maximum number of shift levels in any group for the key type associated with a key. d); aroPP yerl HH)< b; hugHHt,,0 througP,l raqKeysym Group $ 4 gVA keysym group is a logical state of the keyboard providing access to a collection of $ 4, \characters. A group usually contains a set of characters that logically belong together and Gr1 4onZthat may be arranged on several shift levels within that group. For example, Group1 could > 4AcVbe the English alphabet, and Group2 could be Greek. Xkb supports up to four different K 4Wgroups for an input device or keyboard. Groups are in the range 1-4 (Group1 - Group4), levXD 4e ;and are often referred to as G1 - G4 and indexed as 0 - 3. ml WirIndicator |$ 4muUAn indicator is a feedback mechanism such as an LED on an input device. Using Xkb, a  4 a\client application can determine the names of the various indicators, determine and control h 4Zthe way that the individual indicators should be updated to reflect keyboard changes, and  4Tdetermine which of the 32 keyboard indicators reported by the protocol are actually coD 4present on the keyboard. l aisIndicator Feedback at $ 4og\An indicator feedback describes the state of a bank of up to 32 lights. It has a mask where up 4up]each bit corresponds to a light and an associated value mask that specifies which lights are uD 4t on or off. l n tIndicator Map $ 4n _An indicator has its own set of attributes that specify whether clients can explicitly set its d i 4]state and whether it tracks the keyboard state. The indicator map is the collection of these s, 4n Zattributes for each indicator and is held in the  maps 4 array, which is an array of 9D {di$XkbIndicatorRec 4 structures 4. Nl wauInput Extension in]$ 4 u[An extension to the core X protocol that allows an X server to support multiple keyboards, ardj 4ed\as well as other input devices, in addition to the core X keyboard and pointer. Other types w 4r \of devices supported by the input extension include, but are not limited to: mice, tablets, 3 4 mZtouchscreens, barcode readers, button boxes, trackballs, identifier devices, data gloves, D 4whand eye trackers. l r vKey Action $ 4caYA key action consists of an operator and some optional data. Once the server has applied e 4ic\the global controls and per-key behavior and has decided to process a key event, it applies ca 4leYkey actions to determine the effects of the key on the internal state of the server. Xkb mD 4ch(supports actions that do the following: ndUTUTd 1ct3Change base, latched, or locked modifiers or group inURUTd 1 u=Move the core pointer or simulate core pointer button events oUPUTd 1ke)Change most aspects of keyboard behavior sUNUTd 1es Terminate or suspend the server rdULUTd 1r %Send a message to interested clients s&UJUTd 1inSimulate events on other keys :l e,wKey Alias I$ 4to[A key alias is a symbolic name for a specific physical key. Key aliases allow the keyboard V 4eyWlayout designer to assign multiple key names to a single key. This allows the keyboard n cc 4at^layout designer to refer to keys using either their position or their function. Key aliases p 4viTcan be specified both in the symbolic names component and in the keyboard geometry. ond)= aentQQ z X mHH)> b= tHHUT++e, latchQmo+ 4UTZBoth sets of aliases are always valid, but key alias definitions in the keyboard geometry  4asXhave priority; if both symbolic names and geometry include aliases, you should consider UT" 4 aWthe definitions from the geometry before considering the definitions from the symbolic /D 4Kenames section. Dl iaxKey Behavior eS$ 4ysj 4The  behaviors 4 field of the server map is an array of  {XkbBehavior 4, indexed by keycode, ` 4. Tand contains the behavior for each key. The X server uses key behavior to determine ngm 4tiUwhether to process or filter out any given key event; key behavior is independent of szD 4onEkeyboard modifier or group state. Each key has exactly one behavior. d 4Key behaviors include: HUTUTd 1)XkbKB_Default URUTd 1 XkbKB_Lock +UPUTd 1+XkbKB_RadioGroup UNUTd 1XkbKB_Overlay1 h sULUTd 1 aXkbKB_Overlay2 keyl iyKey Symbol Map y $ 4asRA key symbol map describes the symbols bound to a key and the rules to be used to D 4_interpret those symbols. It is an array of  {XkbSymMapRec 4 structures indexed by keycode.  l Ke zKey Type .$ 4XKey types are used to determine the shift level of a key given the current state of the r ( 4 Zkeyboard. There is one key type for each group for a key. Key types are defined using the 5 {rvLXkbKeyTypeRec 4 and  {XkbKTMapEntryRec 4 structures. Xkb allows up to r B {enHXkbMaxKeyTypes 4 (255) key types to be defined, but requires at least mOD {taAXkbNumRequiredTypes 4 (4) predefined types to be in a key map. edl {Keyboard Bells Xks$ 4UTVThe sound the default bell makes when rung is the system bell or the default keyboard  4 s[bell. Some input devices may have more than one bell, identified by  bell_class 4 and D mb bell_id 4. sl t|Keyboard Components e $ 4OThere are five types of components stored in the X server database of keyboard res 4e.jcomponents. They correspond to the  symbols, geometry, keycodes, compa }t,   4and  types 4 D 4he+symbolic names associated with a keyboard. Zkel ne}Keyboard Feedback d 4pe,A keyboard feedback includes the following: Xkd 4d Keyclick volume  d% 4kb Bell volume d 4en Bell pitch es+d 4esBell duration ut :d 4 mGlobal auto-repeat XkId 4 4Per key auto-repeat tXdQ 4 e 32 LEDs ml oa/Key Width, Key Type Width |d 4faYThe maximum number of shift levels for a type is referred to as the width of a key type. eHH3? b 6nbeHHl  7 7 mbHH3@ b /eoaHHl  9 9  cod,^A a ybRR |e.coHH,_B bA bgeHHda''pes 4 R'lJ iaRadio Group d.$K 4[A radio group is a set of keys whose behavior simulates a set of radio buttons. Once a key Xk(K 4d \in a radio group is pressed, it stays logically depressed until another key in the group is 5K 4BZpressed, at which point the previously depressed key is logically released. Consequently, BDK 4Jat most one key in a radio group can be logically depressed at one time. WlL faReal Modifier f$M 4oroXkb supports the eight core protocol modifiers ( {Shift 4,  {Lock 4,  {Control 4, and  {Mod1 4 sM 4kthrough  {Mod5 4); these are called the  real 4 modifiers, as opposed to the set of sixteen named DM 4 9Lvirtual modifiers that can be bound to any set of the eight real modifiers. lN Server Internal Modifiers $O 4ZModifiers that the server uses to determine the appropriate symbol for an event; internal DO 4/modifiers are normally consumed by the server. e blP a Shift Level ns$Q =aOne of several states (normally 2 or 3) governing which graphic character is produced when a key eDQ =is actuated. 4 elT thSymbol Keyboard Name i$ 4edZThe  symbols 4 keyboard name identifies the symbols logically bound to the keys. The  4 Vsymbols name is a human or application-readable description of the intended locale or   4rs_usage of the keyboard with these symbols. The  phys_symbols 4 keyboard name, on the other  -D 4 aAhand, identifies the symbols actually engraved on the keyboard. eBlV Symbolic Name Q$W 4anSXkb supports symbolic names for most components of the keyboard extension. Most of Int^DW 4_these symbolic names are grouped into the  names 4 component of the keyboard description. ; isl State Field s $ 6medThe portion of a client-side core protocol event  4that 6 holds the modifier, group, and button s D 6go+state information pertaining to the event. hendX Types Name act$Y 4XThe  types 4 name provides some information about the set of key types that can be nY 4 sYassociated with the keyboard. In addition, each key type can have a name, and each shift pDY 4de!level of a type can have a name. lR rs Valuator kdS 4 s^A valuator reports a range of values for some entity, like a mouse axis, a slider, or a dial. l\ aVirtual Modifier $] 4ZXkb provides a set of sixteen named virtual modifiers that can be bound to any set of the "] 4eyZeight real modifiers. Each virtual modifier can be bound to any set of the real modifiers /D] 4onP( {Shift 4,  {Lock 4,  {Control, 4 and  {Mod1 4- {Mod5 4). Dl^ poVirtual Modifier Mapping S$_ 4tWXkb maintains a virtual modifier mapping, which lists the virtual modifiers associated ini`D_ 4enwith each key. l{ )C bE! tyl{ so"0ati ah y Group Action TypesI { )D b! a{  c"0 na, d 4 lp)E bCF!m lp"1r k ` A Type r?)F bEG! ke?r,"1l.  ` Effect Molp)G bFH!aetlp ua"2rs at UTUTh pnyXkbSA_SetGroup ?)H bGI!od?an"2the ea UTUT  1TIf the  pXkbSA_GroupAbsolute 1 bit is set in the  flags 1 field, key press  URUT 1Devents change the base keyboard group to the group specified by the ta#UPUT fiEgroup_XXX 1 field. Otherwise, key press events change the base key.UNUT 1h Gboard group by adding the  group_XXX 1 field to the base keyboard 9ULUT 1 aIgroup. In either case, the resulting effective keyboard group is brought bDUJUT 1 aOback into range depending on the value of the  groups_wrap 1 field of the OUHUT@ 1*controls structure (see section 10.7.1). ZUFUT  1FIf a key with an  pXkbSA_ISOLock 1 action (see section 16.1.8) is eUDUT 11Cpressed while this key is down, the key release of this key has no FHpUBUT@ 1Ieffect. Otherwise, the key release cancels the effects of the key press. p{U@UT  1KIf the  pXkbSA_ClearLocks 1 bit is set in the flags field, and no keys UTU>UT 1heIare physically depressed when this key is released, the key release also sU<UT@ 12sets the locked keyboard group to  pGroup1 1. l2p)I bHJ!igrl2p er"3 prs UTUTh pbaXkbSA_LatchGroup 2?) J bIK!X 12?yb"39UL UT UTUT  1p.=Key press and key release events have the same effect as for gURUT pFXkbSA_SetGroup 1; if no keys are physically depressed when this key #UPUT@ 1UHGis released, key release events have the following additional effects. .UNUT  1h OIf the  pXkbSA_LatchToLock 1 bit is set in the  flags 1 field and the sse9ULUT 1s Blatched keyboard group index is nonzero, the key release adds the DUJUT 1heDdelta applied by the corresponding key press to the locked keyboard OUHUT 1Cgroup and subtracts it from the latched keyboard group. The locked ZUFUT 1icFand effective keyboard group are brought back into range according to eUDUT@ 1 tFthe value of the  groups_wrap 1 field of the controls structure. pUBUT  1grEOtherwise, the key press adds the key press delta to the latched key_{U@UT@ 1 board group. lp^)!K bJL!yblp^ UT"41p.Ke UTUTh pleJXkbSA_LockGroup me?^)"L bKM!_tG?^^re"4ly pr UTUT  1y PIf the  pXkbSA_GroupAbsolute 1 is set in the  flags 1 field, key press l URUT 1UTCevents set the locked keyboard group to the group specified by the fla#UPUT heIgroup_XXX 1 field. Otherwise, key press events add the group specified r.UNUT 1UJMby the  group_XXX 1 field to the locked keyboard group. In either case, y9ULUT 1Dthe resulting locked and effective keyboard groups are brought back loDUJUT 1Ninto range depending on the value of the  groups_wrap 1 field of the conOUHUT@ 1 ttrols structure. ZUFUT` 1 fA key release has no effect. Z? )#M bLO!e aZ? a "5tch kh Group Action Flags p? )$N b!? p."5UTd 4A_ klO)%O bMP!lO"6"4 ` Flag O)&P bOQ! tO, "6 l UR ` evMeaning hel`#)'Q bPR!ebyl`# "7up_X UTUTh pseXkbSA_ClearLocks t`#)(R bQS!yhe`##ld"7ock k UTUT  =ei>If set and no keys  1are physically depressed when this key URUT 1psAtransition occurs =, the server sets the locked keyboard group hUPUT@ =g$to  pGroup1 = on a key release. UTl))S bRT!l s "8.  UTUTh p)#XkbSA_LatchToLock )*T bSU!p "8ags UTUT  =AIf set, and the action type is  pSA_LatchGroup =, the server TURUT@ =1locks the action group if it is already latched. l#)+U bTV!4l#  "9 UTUTh pXkbSA_GroupAbsolute #),V bU!vMe##"9Q bR UTUT  =AIf set, the  group_XXX = field represents an absolute group _URUT =>number. Otherwise, it represents a group delta to be added to UPUT@ =UT5the current group to determine the new group number. Z; )-W bY#strZ; he$:etsheh roPointer Action TypesM p; ).X b#; $:ld 4 8lK)/Y bWZ#coLlK$;SU ` Action Type p K)0Z bY[#tanK p$;Gro ` URMeaning l\#)1[ bZ\#dlal\# $<U bV UTUTh pXkbSA_NoAcceleration 9\#)2\ b[]#ubs\##$<V b UTUT  =CIf not set, and the  pMouseKeysAccel = control is enabled (see  URUT =elCsection 10.5.2), the  pKeyPress = initiates a mouse keys timer se,UPUT@ =ro>for this key; every time the timer expires, the cursor moves. l.)3] b\^#l. $=tr UTUTh pheXkbSA_MoveAbsoluteX .)4^ b]#..$= UTUT  =AIf set, the X portion of the structure specifies the new pointer /URUT =c;X coordinate. Otherwise, the X portion is added to the curUPUT =9rent pointer X coordinate to determine the new pointer X *UNUT@ =ro coordinate. li.)5_ b`%1 bli. &># UTUTh pVXkbSA_MoveAbsoluteY Xki.)6` b_%2 bi..&># UTUT  =:If set, the Y portion of the structure specifies the new URUT =ab9pointer Y coordinate. Otherwise, the Y portion is added KUPUT =te9to the current pointer Y coordinate to determine the new *UNUT@ =erpointer Y coordinate. l\ )7a bcdl\ e?=trh $Pointer Button Action TypesP \ )8b bd\ =e? UTUTd 4et hlll)9c baddn pllle@oorna ` XType nlD):d bcedrelDe e@inehe ` UNEffect @l}l);e bdfd5 bl}l eA. UTUTh pXkbSA_PtrBtn V}D)<f begd}D2eAi UTUT  1>SIf p XkbSA_UseDfltButton 1 is set in the  flags 1 field, the event is genw URUT 1abPerated for the pointer button specified by the  mk_dflt_btn 1 attribute of to#UPUT 1erTthe  {MouseKeys 1 control (see  4section 10.5.1 1). Otherwise, the event is .UNUT@ 1 b@generated for the button specified by the  button 1 field. 9ULUT  1PoIIf the mouse button specified for this action is logically down, the key DUJUT 1Dpress and corresponding key release are ignored and have no effect. )9OUHUT 1nEOtherwise, a key press causes one or more core pointer button events nZUFUT 1[instead of the usual  pKeyPress 1 event. If  count 1 is  pzero 1, a key press ecteUDUT 1]generates a single  pButtonPress 1 event; if  count 1 is greater than  pzero 1, pUBUT 1Ra key press generates  count 1 pairs of  pButtonPress 1 and  pButtonRe{U@UT@ p>lease 1 events. U>UT  1t VIf  count 1 is  {zero 1, a key release generates a core pointer  pButtonReU<UT pieHlease 1 that matches the event generated by the corresponding  pKeyMoU:UT pl GPress 1; if  count 1 is nonzero, a key release does not cause a 1 bU8UT pGButtonRelease 1 event. A key release never generates a key  pKeyRetheU6UT@ piflease 1 event. l3lt)=g bfhdl3lt ineBeasar UTUTh p nXkbSA_LockPtrBtn 3Dt)>h bgid m3Dttn eBZUF UT UTUT  1ea]If the button specified by the  pMouseKeys 1 default button   1or  button 1 is TURUT 1raHnot locked, a key press causes a  pButtonPress 1 event instead of a p#UPUT pUTIKeyPress 1 event and locks the button. If the button is already locked .UNUT 1eSor if  pXkbSA_LockNoUnlock 1 is set in the  flags 1 field, a key press is ze9ULUT@ 1asignored and has no effect. pBDUJUT  13If the corresponding key press was ignored, and if by OUHUT p PXkbSA_LockNoLock 1 is not set in the  flags 1 field, a key release genere ZUFUT 1 bMates a  pButtonRelease 1 event instead of a  pKeyRelease 1 event and keUDUT 1U6Funlocks the specified button. If the corresponding key press locked a pUBUT@ 16button, the key release is ignored and has no effect. c )?i bhkd> bc eCth UT$Pointer Button Action FlagsR ec )@j bdo   eCUTd 4ed l)Ak bildtnsleDIKere ` ocFlag b )Bl bkmdNUT peDkNolo ` heMeaning  l.)Cm blndasl. ffeEDUJUT UTUTh pheXkbSA_UseDfltButton as .)Dn bmodkA_ ..seeE la UTUT  =y number. Otherwise, it represents a group delta to be added to UPUT@ =e 5the current group to determine the new group number. el%#)W bhrntl%# epiOons u UTUTh pUPXkbSA_ISONoAffectMods %#)X bh)O%##aniOXkA_ UTUT  =biAIf not set, any  pXkbSA_SetMods = or  pXkbSA_LatchMods = NURUT =acAactions that occur simultaneously with the  pXkbSA_ISOLock = kUPUT@ = r=action are treated as  pXkbSA_LockMod = actions instead. lI#)Y bhselI# iP# UTUTh pXkbSA_ISONoAffectGroup I#)Z bhkA_I##iP)V UTUT  =CIf not set, any  pXkbSA_SetGroup = or  pXkbSA_LatchGroup = setURUT =XAactions that occur simultaneously with the  pXkbSA_ISOLock = rUPUT@ =pr?action are treated as  pXkbSA_LockGroup = actions instead. renlm#)[ bhelm#  biQr UTUTh pXkbSA_ISONoAffectPtr Tm#)\ bh m## biQ UTUT  =@If not set, any  pXkbSA_PtrBtn = actions that occur simultaXkURUT = =neously with the  pXkbSA_ISOLock = action are treated as rUPUT@ pth&XkbSA_LockPtrBtn = actions instead. l#)] bhoMol#  iR UTUTh pXkbSA_ISONoAffectCtrls #)^ bhXk##iR UTUT  ==If not set, any  pXkbSA_SetControls = actions that occur URUT =etAsimultaneously with the  pXkbSA_ISOLock = action are treated TUPUT@ =on/as  pXkbSA_LockControls = actions instead. OLoav )_ bjeedav pkSns sth :ISO Action Flags when XkbSA_ISODfltIsGroup is Not Set v )` bjkA_v kS)\d! 4  l)a bjTUTletkTXkA_ `" tFlag u)b bj t=kTre ea `# Meaning Xkli)c bjli kUMo UTUTh$ p XkbSA_ISODfltIsGroup i)d bjiikU Xk UTUT % =>If not set, action is used to change the base modifier state. URUT% = >Must not be set for the remaining bits in this table to carry UPUT@% =ktheir interpretations. UP.UNUT & =as=A key press sets the action modifiers in the keyboards base 9ULUT& =Mmodifiers using  4the  mask 4,  real_mods 4,  vmods1 4, and SDUJUT& n Hvmods2  4fields = (see section 16.1.3). If  4no other actions are kOUHUT& 4=transformed by the  pXkbISO_Lock 4 action, a key release ZUFUT& 45locks the action modifiers. Otherwise, a key release eUDUT@& 4Fl0clears the base modifiers set by the key press. tl.)e bjl. XkkV UTUTh' pXkbSA_UseModMapMods .)f bj .. kV UTUT ( ==If set, the action modifiers are determined by the modifiers URUT( =et9bound by the modifier mapping of the key. Otherwise, the TUPUT( = n;action modifiers are set to the modifiers specified by the UT*UNUT@( r Fmask =,  real_mods =,  vmod1 =, and  vmod2 = fields. l/ )g bj&l/  kWma UTUTh) p 4XkbSA_LockNoLock S/ )h bj ee/  4kW acon UTUT`* =7If set, the server only unlocks the action modifiers. a kl= )i bj til= e,kXlea UTUTh+ pFlXkbSA_LockNoUnlock rs = )j bj)e= kX UTUT`, =5If set, the server only locks the action modifiers. lK#)k bjlK# kYUT UTUTh- pIfXkbSA_ISONoAffectMods K#)l bj(K##ifkYng  t UTUT . = tAIf not set, any  pXkbSA_SetMods = or  pXkbSA_LatchMods = URUT. =UTAactions that occur simultaneously with the  pXkbSA_ISOLock = nUPUT@. =el=action are treated as  pXkbSA_LockMod = actions instead. lo#)m bj) 4lo#  SkZ UTUTh/ pXkbSA_ISONoAffectGroup o#)n bjfeto##ckkZionod UTUT 0 =CIf not set, any  pXkbSA_SetGroup = or  pXkbSA_LatchGroup = XURUT0 =Aactions that occur simultaneously with the  pXkbSA_ISOLock = UPUT@0 =?action are treated as  pXkbSA_LockGroup = actions instead. thl#)o bjl#  bk[ UTUTh1 pXkbSA_ISONoAffectPtr T#)p bj ## bk[ UTUT 2 =@If not set, any  pXkbSA_PtrBtn = actions that occur simultaXkURUT2 = =neously with the  pXkbSA_ISOLock = action are treated as rUPUT@2 pth&XkbSA_LockPtrBtn = actions instead. l#)q bjoMol#  k\ UTUTh3 pXkbSA_ISONoAffectCtrls #)r b HjXk##k\ UTUT 4 ==If not set, any  pXkbSA_SetControls = actions that occur URUT4 =etAsimultaneously with the  pXkbSA_ISOLock = action are treated TUPUT@4 =on/as  pXkbSA_LockControls = actions instead. OLoU )s bleedU pm]ns sth: #Switch Screen Action FlagsY l )t blT ONm]r Td; 4)p bl)u blblm^@Ifot `< A_Flag  )v bl2  m^ISOck `= eaMeaning UPl#)w blo il# m_ b UTUTh> pXkbSA_SwitchAbsolute \ #)x blNff ##m_)r b UTUT ? =Xk@If set, the  screenXXX = field represents the index of the otURUT? =A_8new screen. Otherwise, it represents an offset from the siUPUT@? =th"current screen to the new screen. l3.)y blkCl3. stm`U UTUTh@ p bXkbSA_SwitchApplication  3.)z bl: 3..tim`Y UTUT A =:If not set, the action should switch to another screen on URUTA =:the same server. Otherwise, it should switch to another X UPUTA =8server or application that shares the same physical dis*UNUT@A =play. dE ){ bnOckdE MeoalhO bControls Action Types\ E )| bn> E luoadP 4 lU)} bn_)rlUXkob th `Q elType sU )~ bn_neU t obs aof `R UPEffect @?lf=) bnlf= ockC UTUThS pXkbSA_SetControls f =) bnof ==)zocl UTUT T 1HA key press enables any boolean controls specified in the  ctrls 1 hoURUT@T 1heCfields that were not already enabled at the time of the key press. ld #UPUT`U 1X >A key release disables any controls enabled by the key press. .UNUT V 1UN@This action can cause  pXkbControlsNotify 1 events (see secO9ULUT@V 1 tion 10.1). al^) bnAiol^ od)| b UTUThW pXkbSA_LockControls o ^) bn ^^od)r UTUT X 1XkMIf the  pXkbSA_LockNoLock 1 bit is not set in the  flags 1 field, a URUTX 1Jkey press enables any controls specified in the  ctrls 1 fields that #UPUT@X 17were not already enabled at the time of the key press. UT.UNUT Y 1OIf the  pXkbSA_LockNoUnlock 1 bit is not set in the  flags 1 field, a =9ULUTY 1Hkey release disables any controls specified in the  ctrls 1 fields edDUJUT@Y 1 1=that were not already disabled at the time of the key press. aOUHUT Z 1ke@This action can cause  pXkbControlsNotify 1 events (see secolZUFUT@Z 1ey tion 10.1). UTZ1 ) bnCtrZ1 seoe9ULUTh\ 1Control Action Flags 1 ) bn1 UToehWd] 4nt slA) bnlAofd)r `^ XFlag fA) bntn Ad,ofUT `_ s Meaning y lR) bnl tlR ogt aea UTUTh` ptiXkbSA_LockNoLock TR) bnNnlR iogfls UTUT a =UL?If set, and the action type is  pXkbSA_LockControls =, the theURUT@a =ld server only disables controls. e lk) bn eslk keohtioca UTUThb ptrXkbSA_LockNoUnlock sek) bnkohCtr UTUT c =?If set, and the action type is  pXkbSA_LockControls =, the s URUT@c =server only enables controls. 1] ) bp]] qi bhs Message Action Flags_ d ) bp qidt 4 fl) bplqjl t `u Flag ) bpckqj b `v Meaning l#) bpLIfl# ypqkXkb_L UTUThw pheXkbSA_MessageOnPress e#) bp##qkl UTUT x =6If set, key press events generate an  pXkbActionMesURUTx pAsage = event  1that = reports the keycode, event type, and CUPUT@x =c'contents of the  message = field. Xkbl #) bpcl # coql1 UTUThy p)XkbSA_MessageOnRelease  #) bps ##onql d UTUT z =)8If set, key release events generate an  pXkbActionMesURUTz ptAsage = event  1that = reports the keycode, event type, and UPUT@z =j'contents of the  message = field. l.#) bpl.# jqm  UTUTh{ pinXkbSA_MessageGenKeyEvent b.#) bpp.##qmXk UTUT | = e:If set, key press and key release events generate  pKeyURUT| pk?Press = and  pKeyRelease = events, regardless of whether n UPUT@| =UR/they generate  pXkbActionMessage = events. ort.) b Rlx.. m =fi UTUT C =2If  pXkbSA_ISONoAffectCtrls = is not set, any URUTC p9SA_SetControls = actions occurring simultaneously with UPUTC =)@the  pXkbISOAction = are treated as  pSA_LockControls = UT*UNUT@C =If instead. e<*) bUR<*   1ha UTUT`H =ke(1) e< ) bn o< fil UTUT I 4 bAZero or more of the bits that are on in  mods 4 can be set, TURUT@I 4Xkas well as others =. lU}) blU} XkUT UTUThJ pIf XkbSI_AnyOf d U*) bTU* d lea UTUT`K =es(2) heU ) b' pU ve UTUT  = bKOne or more of the bits  1that = are on in  mods = can be set, as =URUT@ =Nowell as any others. sj ) bvs=j ulwq wi h )#Device Button Action Typesg d a ) bvCIf wq) bd 4UR l) bvTlwr) ` nType  ) bvT wrs tt `  Effect sel ) bv.l ws UTUTh pXkbSA_DeviceBtn   ) bvOd   )ws UTUT  1BIf the button specified by this action is logically down, the key URUT 1'@press and corresponding release are ignored and have no effect. #UPUT 1orCIf the device or button specified by this action are illegal, this UR.UNUT@ 1we,action behaves like  pXkbSA_NoAction 1. b9ULUT  1=9Otherwise, key presses cause one or more input extension DUJUT 1n Idevice events instead of the usual key press event. If the  count 1 OUHUT 1?field is zero, a key press generates a single  pDeviceButtonZUFUT pBPress 1 event. If count is greater than zero, a key press event eUDUT 1)Jgenerates  count 1 pairs of  pDeviceButtonPress 1 and  pDevicepUBUT@ pseButtonRelease 1 events. {U@UT  1.EIf  count 1 is zero, a key release generates an input extension _U>UT p;DeviceButtonRelease 1 event that matches the event gener)U<UT 1UTHated by the corresponding key press. If  count 1 is nonzero, a key , U:UT 1@release does not cause a  pDeviceButtonRelease 1 event. Key efU8UT@ 10releases never cause  pKeyRelease 1 events. s l) bvwel  wtoAcon UTUTh pXkbSA_LockDeviceBtn re ) bvJUT vewtad  t UTUT  1 eCIf the device or button specified by this action are illegal, this y pURUT@ 1in,action behaves like  pXkbSA_NoAction 1. Pr#UPUT  1co9Otherwise, if the specified button is not locked and the .UNUT pFXkbSA_LockNoLock 1 bit is not set in the  flags 1 field, a key 9ULUT 1le=press generates an input extension  pDeviceButtonPress 1 DUJUT 1raGevent instead of a  pKeyPress 1 event and locks the button. If the nt OUHUT 1veFbutton is already locked or if  pXkbSA_LockNoLock 1 bit is set in ZUFUT@ 1 nEthe  flags 1 field, the key press is ignored and has no effect. ceUDUT  1 e7If the corresponding key press was ignored, and if the pKpUBUT ptsHXkbSA_LockNoUnlock 1 bit is not set in the  flags 1 field, a key  {U@UT 1UT8release generates an input extension  pDeviceButtonReU>UT pFlease 1 event instead of a  pKeyRelease 1 event and unlocks the U<UT 1 b@button. If the corresponding key press locked a button, the key U:UT@ 1es&release is ignored and has no effect. Z ) bvuonZ  wuh LoDevice Button Action Flags fla ) bvrs  enwuDeveBd 4UJ Tl) bvs 1lbuwvthet ` veFlag n) bvc 1UTwv1 nth ` elMeaning pl) bvTl spwwy pss UTUTh pifXkbSA_LockNoLock ) bv t, ww{U@UT UTUT  =as@If set, and the action type is  pXkbSA_LockDeviceBtn =, the URUT@ =en!server only unlocks the button. vli) bxuonli  kyxlocd UTUTh pXkbSA_LockNoUnlock easi) bxiyxZ UTUT  =@If set, and the action type is  pXkbSA_LockDeviceBtn =, the laURUT@ =server only locks the button. l ) bl y bh Key Behaviorsq  ) b yc 1d 4 Tll) bn pll)zv ` Type D) bXkDz) ` Effect ll ) bll ac{ is p UTUTh ptnXkbKB_Default D ) bn vD ){x UTUT` =SPress and release events are processed normally. The  data = field is unused. lil9) blil9 |UT UTUTh panXkbKB_Lock = piD9) biD99s |n.  UTUT  =MIf a key is logically up (that is, the corresponding bit of the core key map URUT =BeLis cleared) when it is pressed, the key press is processed normally and the UPUT = 1Dcorresponding release is ignored. If the key is logically down when p*UNUT =Gpressed, the key press is ignored but the corresponding release is pro b5ULUT@ =Xk3cessed normally. The  data = field is unused. `llm) bbllm } ac UTUTh pUTXkbKB_RadioGroup kDm) bDmm})  UTUT  =UTGIf another member of the radio group is logically down (all members of taURUT =d.Nthe radio group have the same index, specified in  data =) when a key is UPUT =UTJpressed, the server synthesizes a key release for the member that is logi*UNUT@ =Acally down and then processes the new key press event normally. a9ULUT K =heIIf the key itself is logically down when pressed, the key press event is hDUJUTK =thHignored, but the processing of the corresponding key release depends on ndOUHUTK =orYthe value of the n pXkb_RGAllowNone = bit in  flags =. If it is set, the key oZUFUT@K =poSrelease is processed normally; otherwise 1, = the key release is also ignored. isiUDUT` =*All other key release events are ignored. ll.) bTll. di~ UTUTh p b XkbKB_Overlay1 D.) bTD..em~e rio UTUT  =y [If the  pOverlay1 = control is enabled (see section 10.4),  data = is interpreted in URUT = aIas a keycode, and events from this key are reported as if they came from UPUT t Jdata =s keycode. Otherwise, press and release events are processed nor*UNUT@ = amally. l?l.) bwwhl?l. ess hUJ UTUTh pig XkbKB_Overlay2 sin?D.) bond?D..thf t  UTUT  =No[If the  pOverlay2 = control is enabled (see section 10.4),  data = is interpreted d nURUT = Ias a keycode, and events from this key are reported as if they came from UPUT aJdata =s keycode. Otherwise, press and release events are processed nor*UNUT@ =mally. UTc ) bc h em!Explicit Component Masksu  ) bdse atintprd 4 lu) byreluUPUT `  Bit in Explicit Mask ,) bUNy.? ` Protects Against l#u) bTl#u er UTUTh p bvExplicitKeyType1 #) bT#ve coro UTUT  =se8Automatic determination of the key type associated with URUT@ p, Group1. fl;u) br l;u dakeyde UTUTh p awExplicitKeyType2 r;) bT; b UTUT  =8Automatic determination of the key type associated with CURUT@ p Group2. lTu) blTu nt UTUTh pxExplicitKeyType3 T) bT inxp UTUT  =8Automatic determination of the key type associated with URUT@ pGroup3. lmu) blmu T# UTUTh pyExplicitKeyType4 m) bmT# UTUT  =8Automatic determination of the key type associated with heURUT@ pedGroup4. URlu) blu r; UTUTh pzExplicitInterpret ) bT; UTUT  = free all server map components and server itself */ s $ 4urZThe  XkbFreeServerMap 4 function frees the specified components of server map in the  { aXkbDescRec 4 structure specified by the  xkb 4 parameter and sets the corresponding struc 4Ifbture component values to  {NULL 4. The  which 4 parameter specifies a combination of the   4Userver map masks and is a bitwise inclusive OR of the masks listed in Table 14.4. If M {free_all 4 is  {True 4,  which 4 is ignored and  XkbFreeServerMap 4 frees every non- {NULL 4 structure p. ' 4[component in the server map, frees the  {XkbServerMapRec 4 structure referenced by the Des4D `server 4 member of the  xkb 4 parameter, and sets the  server 4 member to  {NULL. wd) afapTT !HH) b =frHHvon/ s Y YT~ur UT UTl 2 $Xkb Client Keyboard Mapping en$ 4n [The Xkb client map for a keyboard is the collection of information a client needs to inter se, 4ng^pret key events from the keyboard. It contains a global list of key types and an array of key 9 4naYsymbol maps, each of which describes the symbols bound to a key and the rules to be used kFD 414to interpret those symbols. fr["l 4TrLFigure 15.1 shows the relationships between elements in the client map:  rl reXkb Client Map [cod) abrvUU "erceHH) b emHH p-- serveUo -d 3The XkbClientMapRec Structure $ 4aThe  map  4field of the complete Xkb keyboard description (see section 6.1) is a pointer to )D 4 Y?the Xkb client map, which is of type  {XkbClientMapRec 4: Ma=UTUT$p ='typedef struct {/* Client Map */ yboJURUTp =ioHunsigned charsize_types;/* # occupied entries in  types = */ eWUPUTp =bo>unsigned charnum_types;/* # entries in  types = */ dUNUTp =naGXkbKeyTypePtrtypes;/* vector of key types used by this keymap */ ruqULUTp =Eunsigned shortsize_syms;/* length of the  syms = array */ i~UJUTp =e =unsigned shortnum_syms;/* # entries in  syms = */ UHUTp =Xk@KeySym *syms;/* linear 2d tables of keysyms, 1 per key */ rvUFUTp =PXkbSymMapPtrkey_sym_map;/* 1 per keycode, maps keycode to  syms = */ pUDUTp =Hunsigned char *modmap;/* 1 per keycode, real mods bound to key */ ReUBUTLp =1}  XkbClientMapRec =, *XkbClientMapPtr; $ 4ip^The following sections describe each of the elements of the  {XkbClientMapRec 4 structure D 4pRin more detail. UTl 3deKey Types $ 4UR\Key types are used to determine the shift level of a key given the current state of the keyUP  4uZboard. The set of all possible key types for the Xkb keyboard description are held in the  veitypes 4 field of the client map, whose total size is stored in  size_types 4, and whose total numf& 4ar_ber of valid entries is stored in  num_types 4. Key types are defined using the following UT3D 4Sy structures: * HU@UT$ =f %typedef struct {/* Key Type */ pUU>UT =rAXkbModsRecmods;/* modifiers used to compute shift level */ pbU<UT =Qunsigned charnum_levels;/* total # shift levels, do not modify directly */ ToU:UT =dunsigned charmap_count;/* # entries in  map, =  preserve = (if non- {NULL =) */ o|U8UT =thIXkbKTMapEntryPtrmap;/* vector of modifiers for each shift level */ TU6UT =deTXkbModsPtrpreserve;/* mods to preserve for corresponding  map = entry */ veU4UT =he&Atomname;/* name of key type */ U2UT =heAAtom *level_names;/* array of names of each shift level */ U0UTL =-}  XkbKeyTypeRec =, *XkbKeyTypePtr; ,U.UT$ =is5typedef struct {/* Modifiers for a key type */ U,UT =beQBoolactive;/*  pTrue = => entry active when determining shift level */ fU*UT =Kunsigned charlevel;/* shift level if modifiers match  mods = */ y TU(UT =EXkbModsRecmods;/* mods needed for this level to be selected */ U&UTL =2}  XkbKTMapEntryRec =,*XkbKTMapEntryPtr;  , 4dimThe  mods 4 field of a key type is an  {XkbModsRec 4 (see section 7.2) specifying the modifiers  4 =Ythe key type uses when calculating the shift level, and can be composed of both the core f% 4UTYmodifiers and virtual modifiers. To set the modifiers associated with a key type, modify t2 4}the  real_mods 4 and  vmods 4 fields of the  mods 4  {XkbModsRec 4 accordingly. The  mask 4 field of e? 4cthe  {XkbModsRec 4 is reserved for use by Xkb and is calculated from the  real_mods 4 and * MLD tvmods 4 fields. a$ 4ac_The  num_levels 4 field holds the total number of shift levels for the key type. Xkb uses sign /\num_levels 4 to ensure the array of symbols bound to a key is large enough. Do not modify /{ thdnum_levels 4 directly to change the number if shift levels for a key type. Instead, use  XkbReD &sizeKeyType 4 (see section 15.2.3). d) apifVV #HH) b gheHHbere f% $VUT$ 4dioThe  map 4 field is a vector of  {XkbKTMapEntryRec 4 structures, with  map_count 4 entries, that  4f Yspecify the modifier combinations for each possible shift level. Each map entry contains " 4odzan  active 4 field, a  mods 4 field, and a  level 4 field. The  active 4 field determines whether the / 4bmodifier combination listed in the  mods 4 field should be considered when determining shift < 4level. If  active 4 is  {False 4, this  map 4 entry is ignored. If  active 4 is  {True 4, the  level 4 field of the toI i]map  4entry specifies the shift level to use when the current modifier combination matches sVD 4. Nthe combination specified in the  mods 4 field of the  map 4 entry. k$ 4cAny combination of modifiers not explicitly listed somewhere in the  map 4 yields shift level xD 4`one. In addition,  map 4 entries specifying unbound virtual modifiers are not considered.  , 4nAny modifiers specified in  mods 4 are normally  consumed 4 by  XkbTranslateKeyCode 4 (see  4odasection 12.1.3). For those rare occasions a modifier  should 4 be considered despite having d 4r kbeen used to look up a symbol, key types include an optional  preserve 4 field. If a  preserve 4 erm 4cmember of a key type is not  {NULL 4, it represents a list of modifiers where each entry corretiv 4 4msponds directly to one of the key types  map 4. Each entry lists the modifiers that should  not 4 hD 4 cHbe consumed if the matching map entry is used to determine shift level. , 4ofaEach shift level has a name and these names are held in the  level_names 4 array, whose mD 4mahlength is  num_levels 4. The type itself also has a name, which is held in the  name 4 field. v$ 4reYFor example, consider how the server handles the following possible symbolic description o 4dVof a possible key type (note that the format used to specify keyboard mappings in the  4\server database is not specified by the Xkb extension, although this format is one possible a,BL 4 iexample): ^$ 4 ZThe  name 4 of the example key type is ALPHATHREE, and the modifiers it pays attenk 4a ption to are  {Shift 4,  {Lock 4, and the virtual modifier  {LevelThree 4. There are three shift lev x 4ts[els. The name of shift level one is Base, the name of shift level two is Caps, and the enD 4er'name of shift level three is Level3. ad) aearWW $me 4HH) b hs HHe ++ame, whiWth+$ 4rGiven the combination of the  map 4 and  preserve 4 specifications, there are five  map 4 entries.  4 p^The first map entry specifies that shift level one is to be used if no modifiers are set. The " 4asdsecond entry specifies the  {Lock 4 modifier alone also yields shift level one. The third entry ex/ 4`specifies the  {Shift 4 modifier alone yields shift level two. The fourth and fifth entries at< 4especify that the virtual  {LevelThree 4 modifier alone, or in combination with the  {Shift 4 hID 4$modifier, yields shift level three. ft]UTUT$ =e,eShift level three can be reached  1only  =if the virtual modifier  {LevelThree = is bound to iURUT =_a real modifier (see section 16.4). If  {LevelThree = is not bound to a real modifier, the buUPUTD s 0map = entries associated with it are ignored. e,$ 4thhBecause the  {Lock 4 modifier is to be preserved for further event processing, the  preserve 4 ,  4mtlist is not  {NULL 4 and parallels the  map 4 list. All  preserve 4 entries, except for the one corre a 4ksponding to the  map 4 entry that specifies the  {Lock  4modifier, do not list any modifiers. For ntr 4tthe  map 4 entry that specifies the  {Lock 4 modifier, the corresponding  preserve 4 list entry lists  4 tjthe  {Lock 4 modifier, meaning do not consume the  {Lock 4 modifier. In this particular case, the  4 sZpreserved modifier is passed to Xlib translation functions and causes them to notice that  4r bthe  {Lock 4 modifier is set; consequently, the Xlib functions apply the appropriate capitali 4 b_zation rules to the symbol. Because this preserve entry is set only for a modifier that yields redD 4Gshift level one, the capitalization occurs only for level-one symbols. ent l 3 The Canonical Key Types m$ 4NU]Xkb allows up to  {XkbMaxKeyTypes 4 (255) key types to be defined, but requires at least r+ {VXkbNumRequiredTypes 4 (4) predefined types to be in a key map. These predefined key 8 4s.]types are referred to as the canonical key types and describe the types of keys available on hE 4]most keyboards. The definitions for the canonical key types are held in the first  {XkbNum R {ckeRequiredTypes 4 entries of the  types 4 field of the client map and are indexed using the folt_D 4nslowing constants: otitl {XkbOneLevelIndex l {; XkbTwoLevelIndex fl& { a XkbAlphabeticIndex l' {on!XkbKeypadIndex BeUNUTl e "ONE_LEVEL $ 4haOThe ONE_LEVEL key type describes groups that have only one symbol. The default fo 4s.UONE_LEVEL key type has no map entries and does not pay attention to any modifiers. A lD 4MaHsymbolic representation of this key type could look like the following: ULUT$ =type ONE_LEVEL { prUJUT =bemodifiers = None; preUHUT =map[None]= Level1; e UFUT = clevel_name[Level1]= Any; e 'UDUTD =av}; le 9$ 4[The description of the ONE_LEVEL key type is stored in the  types 4[ {XkbOneLevelInkbNFD {&dex 4] entry of the client key map. ]UBUTl o#TWO_LEVEL o$ 4siTThe TWO_LEVEL key type describes groups that consist of two symbols but are neither ne| 4[alphabetic nor numeric keypad keys. The default TWO_LEVEL type uses only the  {Shift 4 d) aXX %HH) b gupHHLym))XLE) 4tremodifier. It returns shift level two if  {Shift 4 is set, and level one if it is not. A symbolic iD 4oo?representation of this key type could look like the following: pr)UTUT$ =betype TWO_LEVEL { pre5URUT =modifiers = Shift; e AUPUT = cmap[Shift]= Level2; MUNUT =level_name[Level1]= Base; YULUT =iolevel_name[Level2]= Shift; eUJUTD =yp}; [w$ 4bN[The description of the TWO_LEVEL key type is stored in the  types 4[ {XkbTwoLevelInEL D {si&dex 4] entry of the client key map. UHUTl tw$ALPHABETIC ne$ 4RThe ALPHABETIC key type describes groups consisting of two symbols: the lowercase  4Pform of a symbol followed by the uppercase form of the same symbol. The default  4)NALPHABETIC type implements locale-sensitive Shift cancels CapsLock behavior D 4Dusing both the  {Shift 4 and  {Lock 4 modifiers as follows: ShUFUTd =d ^If  {Shift = and  {Lock = are both set, the default ALPHABETIC type yields level one. UDUTd =ow4If  {Shift = alone is set, it yields level two. URUBUT$ =mcIf  {Lock = alone is set, it yields level one, but preserves the  {Lock = modifier so Xlib el1 U@UT =UTUnotices and applies the appropriate capitalization rules.  4The Xlib functions are U>UTD 4ioUlocale-sensitive and apply different capitalization rules for different locales. = %U<UTd = 4GIf neither  {Shift = nor  {Lock = is set, it yields level one. 7d 4ThJA symbolic representation of this key type could look like the following: LU:UT$ =type ALPHABETIC { fXU8UT =ermodifiers = Shift+Lock; ldU6UT =map[Shift]= Level2; BpU4UT =tspreserve[Lock]= Lock; can|U2UT =avlevel_name[Level1]= Base; U0UT = level_name[Level2]= Caps; sU.UTD =UT}; d$ 4 YThe description of the ALPHABETIC key type is stored in the  types 4[ {XkbAlphabeD {hi+ticIndex 4] entry of the client key map. UBU,UTl If %KEYPAD al$ 4ldRThe KEYPAD key type describes groups that consist of two symbols, at least one of  4ieTwhich is a numeric keypad symbol. The numeric keypad symbol is assumed to reside at io 4 aSlevel two. The default KEYPAD key type implements Shift cancels NumLock behavior = 4 4hiXusing the Shift modifier and the real modifier bound to the virtual modifier named NumepD 4s :Lock, known as the  {NumLock 4 modifier, as follows: %U*UTd = ]If  {Shift = and  {NumLock = are both set, the default KEYPAD type yields level one. B1U(UTd =ts4If  {Shift = alone is set, it yields level two. el=U&UTd =se6If  {NumLock = alone is set, it yields level two. IU$UTd =UTJIf neither  {Shift = nor  {NumLock = is set, it yields level one. d) abYY & ] HH) b HHp**YPAD keyYs *d 4 sJA symbolic representation of this key type could look like the following: UTUT$ =yptype KEYPAD { ed(URUT =modifiers = Shift+NumLock; he4UPUT =y map[None]= Level1; c@UNUT =hamap[Shift]= Level2; LULUT =ifmap[NumLock]= Level2; odiXUJUT =vimap[Shift+NumLock]= Level1; dUHUT =Lolevel_name[Level1]= Base; 4pUFUT =lolevel_name[Level2]= Caps; {|UDUTD =N}; k $ 4hedThe description of the KEYPAD key type is stored in the  types 4[ {XkbKeypadIndex 4] entry lD 4UTof the client key map. ockUBUTl i=Initializing the Canonical Key Types in a New Client Map& $ 4 _To set the definitions of the canonical key types in a client map to their default values, use D XkbInitCanonicalKeyTypes. U@UTl =LStatus  tXkbInitCanonicalKeyTypes =( xkb, which, keypadVMod =) U>UTd =mbYXkbDescPtr xkb =;/* keyboard description containing client map to initialize */ yU<UTd =UR@unsigned int which =;/* mask of types to initialize */ y  U:UTd+ =l1Bint keypadVMod =;/* index of NumLock virtual modifier */  $ ev`XkbInitCanonicalKeyTypes 4 initializes the first  {XkbNumRequiredTypes 4 key types of the l1- 4UTekeyboard specified by the  xkb 4 parameter to their default values. The  which 4 parameter i: 4D ]specifies what canonical key types to initialize and is a bitwise inclusive OR of the followfG 4p.\ing masks:  {XkbOneLevelMask 4,  {XkbTwoLevelMask 4,  {XkbAlphabeticMask 4, and TD {etcXkbKeypadMask 4. Only those canonical types specified by the  which 4 mask are initialized. i$ 4annIf  {XkbKeypadMask 4 is set in the  which 4 parameter,  XkbInitCanonicalKeyTypes 4 looks up the v {[NumLock 4 named virtual modifier to determine which virtual modifier to use when initial/ y 4URaizing the KEYPAD key type. If the  {NumLock 4 virtual modifier does not exist,  XkbInitCakD i nonicalKeyTypes 4 creates it. / $ ev_XkbInitCanonicalKeyTypes 4 normally returns Success. It returns  {BadAccess 4 if the Xkb l1 4UTgextension has not been properly initialized, and  {BadAccess 4 if the  xkb 4 parameter is not :D 4spvalid. hatl 3es*Getting Key Types from the Server' $ 4[To obtain the list of available key types in the servers keyboard mapping, use  XkbGetticD KeyTypes 4. U8UTl =.XStatus  tXkbGetKeyTypes =( dpy =,  first =,  num =,  xkb =) U6UTd = {6Display * dpy =;/* connection to X server */ (U4UTd =icNunsigned int first =;/* index to first type to get, 0 => 1st type */ 5U2UTd =whEunsigned int num =;/* number of key types to be returned */ BU0UTd =e.VXkbDescPtr  xkb =;/* keyboard description containing client map to update */ UU.UT$ peWXkbGetKeyTypes = is used to obtain descriptions of the key types themselves, not the uccaU,UT ={Skey types bound to individual keys. To obtain the key types bound to an individual tiamU*UTD =AcTkey, refer to the  key_sym_map = field of the client map (see section 15.3.1). d) aeerZZ 'ToHH) b t sHHng**Zyp*$! .`XkbGetKeyTypes 4 queries the server for the desired types, waits for a reply, and returns the UTD! 4laQdesired types in the  }xkb->map->types 4. If successful, it returns Success. *$" i`XkbGetKeyTypes 4 returns  {BadAccess 4 if the Xkb extension has not been properly initialum7" 4o nized and  {BadValue 4 if the combination of  }first 4 and  }num 4 results in numbers out of valid DD" 4UTrange. pe]l# 3=4Changing the Number of Levels in a Key Type( elqd$ 4U,LTo change the number of levels in a key type, use  XkbResizeKeyType 4. boUTUTl% =alStatus  tXkbResizeKeyType =( xkb =,  type_ndx =,  map_count =,  want_preserve =,  new_num_lvls =) )URUTd& =eUXkbDescPtr xkb =;/* keyboard description containing client map to update */ UPUTd' =ngJint  type_ndx =;/* index in xkb->map->types of type to change */ UNUTd( =4Kint  map_count =;/* total # of map entries needed for the type */ UTULUTd) =la^Bool  want_preserve =;/*  pTrue = => list of preserved modifiers is necessary */ UJUTd* =yT@int  new_num_lvls =;/* new max # of levels for type */ en$+ umqXkbResizeKeyType 4 changes the type specified by  xkb 4-> map->types 4[ type_ndx 4], and realloe+ 4[cates the symbols and actions bound to all keys that use the type, if necessary.  XkbReTyp+ isizeKeyType 4 updates only the local copy of the types in  }xkb 4; to update the servers copy for lD+ 4kbkthe physical device, use  XkbSetMap 4 or  XkbChangeMap 4 after calling  XkbResizeKeyType 4. =)"$, 4&_The  map_count 4 parameter specifies the total number of map entries needed for the type, UT/, 4 rand can be zero or greater. If  map_count 4 is zero,  XkbResizeKeyType 4 frees the existing  map 4 <D, 4enWand  preserve 4 entries for the type if they exist and sets them to  {NULL 4. pQ$- 4f hThe  want_preserve 4 parameter specifies whether a  preserve 4 list for the key should be creel^- 4yated. If  want_preserve 4 is  {True 4, the  preserve 4 list with  map_count 4 entries is allocated or k- 4vreallocated if it already exists. Otherwise, if  want_preserve 4 is  {False 4, the  preserve 4 field is xD- 4 4,freed if necessary and set to  {NULL 4.  $. 4te\The  new_num_lvls 4 parameter specifies the new maximum number of shift levels for the . 4ft\type and is used to calculate and resize the symbols and actions bound to all keys that use spD. 4nu the type. $/ 4 ttIf  type_ndx 4 does not specify a legal type,  new_num_lvls 4 is less than 1, or the  map_count 4 is re/ 4jless than zero,  XkbResizeKeyType 4 returns  {BadValue 4. If  XkbResizeKeyType 4 encounters D/ 4bany problems with allocation, it returns  {BadAlloc 4. Otherwise, it returns  {Success 4. l0 3elCopying Key Types) $1 4veaUse  XkbCopyKeyType 4 and  XkbCopyKeyTypes 4 to copy one or more  {XkbKeyTypeRec 4 D1 4re structures. t %UHUTl2 =he>Status  tXkbCopyKeyType =( from =,  into =) 2UFUTd3 =KXkbKeyTypePtr  from =;/* pointer to XkbKeyTypeRec to be copied */ $.?UDUTd4 =nuLXkbKeyTypePtr  into =;/* pointer to XkbKeyTypeRec to be changed */ R$5 ftp XkbCopyKeyType 4 copies the key type specified by  from 4 to the key type specified by  into 4. nu_5 4rBoth must point to legal  {XkbKeyTypeRec  structures 4. Xkb assumes  from 4 and  into 4 point to l5 4`different places. As a result, overlaps can be fatal.  XkbCopyKeyType 4 frees any existing izy5 4ntx map 4,  preserve 4, and  level_names 4 in  into 4 prior to copying. If any allocation errors occur . 5 4eltwhile copying  from 4 to  into 4,  XkbCopyKeyType 4 returns  {BadAlloc 4. Otherwise,  XkbCopyr D5 eRNKeyType 4 copies  from 4 to  into 4 and returns  {Success 4. d) a ) [[ (eypeHH) b pecHHUD,,TypePtr [;,)UTUTl6 =ecRStatus  tXkbCopyKeyTypes =( from =,  into =,  num_types =) 6URUTd7 =frPXkbKeyTypePtr  from =;/* pointer to array of XkbKeyTypeRecs to copy */ t CUPUTd8 =XRXkbKeyTypePtr  into =;/* pointer to array of XkbKeyTypeRecs to change */ PUNUTd9 =8int  num_types =;/* number of types to copy */ c$: fgXkbCopyKeyTypes 4 copies  num_types 4  {XkbKeyTypeRec 4 structures from the array specified ntop: 4injby  from 4 into the array specified by  into 4. It is intended for copying between, rather than }: 4et[within, keyboard descriptions, so it doesnt check for overlaps. The same rules that apply fro: 4 4vto the  from 4 and  into 4 parameters in  XkbCopyKeyType 4 apply to each entry of the  from 4 and : bwinto 4 arrays of  XkbCopyKeyTypes 4. If any allocation errors occur while copying  from 4 to  into 4, RSt: pyuXkbCopyKeyTypes 4 returns  {BadAlloc 4. Otherwise,  XkbCopyKeyTypes 4 copies  from 4 to  into 4 nD: 4bKand returns  {Success 4. l; 3eyKey Symbol Map* /* $< 4f eThe entire list of key symbols for the keyboard mapping is held in the  syms 4 field of the cli*< 4:Yent map. Whereas the core keyboard mapping is a two-dimensional array of  {KeySyms 4 e< 4tojwhose rows are indexed by keycode, the  syms 4 field of Xkb is a linear list of  {KeySyms 4 that < 4n Yneeds to be indexed uniquely for each key. This section describes the key symbol map and sD< 4ly8the methods for determining the symbols bound to a key.  '$= 4 jThe reason the  syms 4 field is a linear list of  {KeySyms 4 is to reduce the memory consumption 4= 44Xassociated with a keymap; because Xkb allows individual keys to have multiple shift levA= 4ey`els and a different number of groups per key, a single two-dimensional array of  {KeySyms 4 inN= 4Twould potentially be very large and sparse. Instead, Xkb provides a small two-dimen* [= 4f bsional array of  {KeySyms 4 for each key. To store all of these individual arrays, Xkb concathD= 4<Henates each array together in the  syms 4 field of the client map. y }$> 4 ehIn order to determine which  {KeySyms 4 in the  syms 4 field are associated with each keycode, > 4t `the client map contains an array of key symbol mappings, held in the  key_sym_map 4 field. mb> 4eThe  key_sym_map 4 field is an array of  {XkbSymMapRec 4 structures indexed by keycode. The n> fidkey_sym_map 4 array has  min_key_code 4 unused entries at the start to allow direct indexing ci> 4; Pusing a keycode. All keycodes falling between the minimum and maximum legal keyey> 4en_codes, inclusive, have  key_sym_map 4 arrays, whether or not any key actually yields that 4D> 4y @code. The  {KeySymMapRec 4 structure is defined as follows: * ULUT$? =f #define XkbNumKbdGroups4  4UJUTD? =,#define XkbMaxKbdGroup(XkbNumKbdGroups-1) tUHUT$@ =<?typedef struct {/* map to keysyms for a single keycode */ entUFUT@ =Runsigned charkt_index[XkbNumKbdGroups];/* key type index for each group */  UDUT@ =chOunsigned chargroup_info;/* # of groups and out of range group handling */ map-UBUT@ = <unsigned charwidth;/* max # of shift levels for key */ sy:U@UT@ = aLunsigned shortoffset;/* index to keysym table in  syms = array */ GU>UTL@ =ma+} + XkbSymMapRec =, *XkbSymMapPtr; ntrZdA 4o @These fields are described in detail in the following sections. klB 3tw!Per-Key Key Type Indices, e$C 4>gThe  kt_index 4 array of the  {XkbSymMapRec 4 structure contains the indices of the key types )C 4coY(see section 15.2) for each possible group of symbols associated with the key. To obtain n6C 44\the index of a key type or the pointer to a key type, Xkb provides the following macros, to tyCDC 4/access the key types: d) auig\\ )bdouHH) b UDHH{ig&* # of g%.\of&WUTUT$D =apWThe array of key types is of fixed width and is large enough to hold key types for the UTcURUTD =igWmaximum legal number of groups ( {XkbNumKbdGroups =, currently four); if a key has =maoUPUTDD =MaYfewer than  {XkbNumKbdGroups = groups, the extra key types are reported but ignored. hULUTlE =nsLint  tXkbKeyTypeIndex =( xkb, keycode, group =)/* macro*/ >UJUTdF = =XkbDescPtr xkb =;/* Xkb description of interest */ iUHUTdG =es6KeyCode keycode =;/* keycode of interest */ UFUTdH =mb(int group =;/* group index */ $I thjXkbKeyTypeIndex 4 computes an index into the  types 4 vector of the client map in  }xkb 4 from DI 4ey4the given  }keycode 4 and  }group 4 index. igUDUTlJ =RXkbKeyTypePtr  tXkbKeyType =( xkb, keycode, group =)/* macro */ UBUTdK ==XkbDescPtr xkb =;/* Xkb description of interest */ rU@UTdL =s 6KeyCode keycode =;/* keycode of interest */ U>UTdM =(int group =;/* group index */  %$N =nXkbKeyType 4 returns a pointer to the key type in the  types 4 vector of the client map in  }xkb 4 2DN 4teDcorresponding to the given  }keycode 4 and  }group 4 index.  KlO 3ou"Per-Key Group Information- _$i 4treThe  group_info 4 field of an  {XkbSymMapRec 4 is an encoded value containing the number of *li 4stTgroups of symbols bound to the key as well as the specification of the treatment of thyi 4_out-of-range groups. It is legal for a key to have zero groups, in which case it also has zero i 4n _symbols and all events from that key yield  {NoSymbol 4. To obtain the number of groups of e i 4e,Vsymbols bound to the key, use  XkbKeyNumGroups 4. To change the number of groups i 4t \bound to a key, use  XkbChangeTypesOfKey 4 (see section 15.3.6). To obtain a mask that Mi 4up^determines the treatment of out-of-range groups, use  XkbKeyGroupInfo 4 and  XkbOutOfDi sRangeGroupInfo 4. nt, u 4 b The keyboard controls (see Chapter 10) contain a  -groups_wrap 4 field specifying the han u 4Pe]dling of illegal groups on a global basis. That is, when the user performs an action causing M u 4coathe effective group to go out of the legal range, the  -groups_wrap 4 field specifies how to l u 4ioVnormalize the effective keyboard group to a group that is legal for the keyboard as a  u 4ps]whole, but there is no guarantee that the normalized group will be within the range of legal y u 4 4agroups for any individual key. The per-key  -group_info 4 field specifies how a key treats a K u 4o Zlegal effective group if the key does not have a type specified for the group of concern. * u 4 1_For example, the  {Enter 4 key usually has just one group defined. If the user performs an oup7 u 4rogaction causing the global keyboard group to change to  {Group2 4, the  -group_info 4 field for boaDD u 4ha>the  {Enter 4 key describes how to handle this situation. Y$R 4PeSOut-of-range groups for individual keys are mapped to a legal group using the same n cfR 4[options as are used for the overall keyboard group. The particular type of mapping used is cifR 4fcontrolled by the bits set in the  group_info 4 flag, as shown in Table 15.2. See section 10.7.1 BLR 4whAfor more details on the normalization methods in this table. td) a4gr]] *y.heHH) b w HHv''ctive gr] d'd] 4ie?Xkb provides the following macros to access group information: e UNUTl^ =suFint   tXkbKeyNumGroups =( xkb, keycode =)/* macro */ ULUTd_ =au=XkbDescPtr xkb =;/* Xkb description of interest */ UJUTd` = f6KeyCode keycode =;/* keycode of interest */ $a anSXkbKeyNumGroups 4 returns the number of groups of symbols bound to the key corre maDa 4ousponding to  }keycode 4. UHUTlb =asOunsigned char   tXkbKeyGroupInfo =( xkb, keycode =)/*macro */ cifUFUTdc ==XkbDescPtr xkb =;/* Xkb description of interest */ UDUTdd =2.6KeyCode keycode =;/* keycode of interest */ $e athXkbKeyGroupInfo 4 returns the  group_info 4 field from the  {XkbSymMapRec 4 structure associy.De 44ated with the key corresponding to  }keycode 4. 3UBUTlf =Runsigned char   tXkbOutOfRangeGroupInfo =( grp_inf =)/* macro */ @U@UTdg =grQunsigned char grp_inf =;/* group_info field of  wXkbSymMapRec = */ kS$ mYXkbOutOfRangeGroupInfo 4 returns only the out-of-range processing information from the `D f;group_info 4 field of an  {XkbSymMapRec 4 structure. uU>UTl =eyTunsigned char   tXkbOutOfRangeGroupNumber =( grp_inf =)/* macro */ U<UTdj =diQunsigned char grp_inf =;/* group_info field of  {XkbSymMapRec = */ $k deUXkbOutOfRangeGroupNumber 4 returns the out-of-range group number, represented as a tDk 4/Ugroup index, from the  group_info 4 field of an  {XkbSymMapRec 4 structure. ll 3ouKey Width0 $m 44XThe maximum number of shift levels for a type is also referred to as the width of a key e m 4tojtype. The  width 4 field of the  key_sym_map 4 entry for a key contains the width of the widest m 4U@btype associated with the key. The  width  4field cannot be explicitly changed; it is updated Dm 4 mOautomatically whenever the symbols or set of types bound to a key are changed. frln 3$Offset in to the Symbol Map1 {#$o 4stRThe key width and number of groups associated with a key are used to form a small 0o 4atwo-dimensional array of  {KeySyms 4 for a key. This array may be different sizes for differX=o 4 `ent keys. The array for a single key is stored as a linear list, in row-major order. The arrays teJo 4ffor all of the keys are stored in the  syms 4 field of the client map. There is one row for each Wo 4KeXgroup associated with a key and one column for each level. The index corresponding to a fedDo 4th,given group and shift level is computed as: ydp 4 t,idx = group_index * key_width + shift_level s $q 4idkThe  offset 4 field of the  key_sym_map 4 entry for a key is used to access the beginning of the itDq 4array. 4 m*$r 4enjXkb provides the following macros for accessing the  width 4 and  offset 4 for individual keys, 7Dr 4Was well as macros for accessing the two-dimensional array of symbols bound to the key: rm KUTUTls =Hint   tXkbKeyGroupsWidth =( xkb, keycode =)/* macro */ ayXURUTdt =s =XkbDescPtr xkb =;/* Xkb description of interest */ geUPUTdu =s 6KeyCode keycode =;/* keycode of interest */ d) an ^^ +thclHH) b HHat**lumn for^he*x$v feTXkbKeyGroupsWidth 4 computes the maximum width associated with the key correspond tDv 4x ing to  }keycode 4. s UNUTlw =idLint  tXkbKeyGroupWidth =( xkb, keycode, grp =)/* macro */ toULUTdx =in=XkbDescPtr xkb =;/* Xkb description of interest */ nUJUTdy = f6KeyCode keycode =;/* keycode of interest */ UHUTdz =iv,int grp =;/* group of interest */ ac${ thbXkbKeyGroupWidth 4 computes the width of the type associated with the group  }grp 4 for the D{ 4b,&key corresponding to  }keycode 4. UFUTl| =esGint  tXkbKeySymsOffset =( xkb, keycode =)/* macro */ =s UDUTd} =co=XkbDescPtr xkb =;/* Xkb description of interest */ aUBUTd~ =n 6KeyCode keycode =;/* keycode of interest */ #$ \XkbKeySymsOffset 4 returns the offset of the two-dimensional array of keysyms for the key 0D 4ou"corresponding to  }keycode 4. EU@UTl = tDint  tXkbKeyNumSyms =( xkb, keycode =)/* macro */ UNRU>UTd =in=XkbDescPtr xkb =;/* Xkb description of interest */ *_U<UTd =UT6KeyCode keycode =;/* keycode of interest */ r$ n[XkbKeyNumSyms 4 returns the total number of keysyms for the key corresponding to  }key=ivD }; code 4. U:UTl =IKeySym *  tXkbKeySymsPtr =( xkb, keycode =)/* macro */ iU8UTd =p =XkbDescPtr xkb =;/* Xkb description of interest */ U6UTd =UF6KeyCode keycode =;/* keycode of interest */ $ ZXkbKeySymsPtr 4 returns the pointer to the two-dimensional array of keysyms for the key D 4"corresponding to  }keycode 4. U4UTl =teTKeySym  tXkbKeySymEntry =( xkb, keycode, shift, grp =)/* macro */ siU2UTd =ym=XkbDescPtr xkb =;/* Xkb description of interest */ oU0UTd =6KeyCode keycode =;/* keycode of interest */  U.UTd = *4int shift =;/* shift level of interest */ * U,UTd = i,int grp =;/* group of interest */ k*$ eytXkbKeySymEntry 4 returns the  {keysym 4 corresponding to shift level  }shift 4 and group  }grp 4 from in7D 4Nthe two-dimensional array of keysyms for the key corresponding to  }keycode l 3od8Getting the Symbol Map for Keys from the Server2  $ 4b \To obtain the symbols for a subset of the keys in a keyboard description, use  XkbGetKeyte)D Syms 4: =UTUTl =tuWStatus  tXkbGetKeySyms =( dpy =,  first =,  num =,  xkb =) "coJURUTd =k6Display * dpy =;/* connection to X server */ WUPUTd =b,@unsigned int first =;/* keycode of first key to get */ XkdUNUTd = =Lunsigned int num =;/* number of keycodes for which syms desired */ coqULUTd =de?XkbDescPtr  xkb =;/* Xkb description to be updated */ ift$ *bXkbGetKeySyms 4 sends a request to the server to obtain the set of keysyms bound to  }num 4  4nsdkeys starting with the key whose keycode is  first 4. It waits for a reply and returns the key 4diusyms in the  map.syms 4 field of  xkb 4. If successful,  XkbGetKeySyms 4 returns  {Success 4. The rD veIxkb 4 parameter must be a pointer to a valid Xkb keyboard description. sd) aete__ , : HH) b KSyHH $  xkb/:_UT$$ 4oIf the client  map 4 in the  xkb 4 parameter has not been allocated,  XkbGetKeySyms 4 allocates ey D 4UT2and initializes it before obtaining the symbols. $ 4ic[If a compatible version of Xkb is not available in the server or the Xkb extension has not up 4mbeen properly initialized,  XkbGetKeySyms 4 returns  {BadAccess 4. If  num 4 is less than 1 or  4nsggreater than  {XkbMaxKeyCount 4,  XkbGetKeySyms 4 returns  {BadValue 4. If any allocation  D 4sy>errors occur,  XkbGetKeySyms 4 returns  {BadAlloc 4. "l 3 4?Changing the Number of Groups and Types Bound to a Key3 ame6$ 4teSTo change the number of groups and the types bound to a key, use  XkbChangeTypeteCD sOfKey 4. Xl 4)Status 4 tXkbChangeTypesOfKey 4( xkb 4,  key 4,  n_groups 4,  groups 4,  new_types_in 4,  p_changes 4) mUJUTd =xDXkbDescPtr  xkb =;/* keyboard description to be changed */ eszUHUTd =6int  key =;/* keycode for key of interest */ UFUTd =ic 4esXwise inclusive OR of the following masks:  {XkbGroup1Mask 4,  {XkbGroup2Mask 4, KD {ia.XkbGroup3Mask 4, and  {XkbGroup4Mask 4. `$ 4oniThe  new_types_in 4 parameter is an integer array of length  n_groups 4. Each entry represents Xm 4 cthe type to use for the associated group and is an index into  xkb 4-> map->types 4. The gesz }thjnew_types_in 4 array is indexed by group index; if  }n_groups 4 is four and  }groups 4 only has D { wQGroup1Mask 4 and  {Group3Mask 4 set,  }new_types_in 4 looks like this: $ 4 "new_types_in[0] = type for Group1  4new_types_in[1] = ignored " 44"new_types_in[2] = type for Group3 /D 4ernew_types_in[3] = ignored DBl 4y.[For convenience, Xkb provides the following constants to use as indices to the groups: ned) a`` -R tHH) b XHHy**up3Mask`kb*$ 4\If the Xkb extension has not been properly initialized,  XkbChangeTypesOfKey 4 returns ac { XoBadAccess 4. If the  xkb 4 parameter it not valid (that is, it is  {NULL 4 or it does not contain a 4. 4ovalid client map),  XkbChangeTypesOfKey 4 returns  {Bad 4Match. If the  key 4 is not a valid keyas  4 wlcode,  n_groups 4 is greater than  {XkbNumKbdGroups 4, or the  groups 4 mask does not contain ty 4organy of the valid group mask bits,  XkbChangeTypesOfKey 4 returns  {BadValue 4. If it is necesGro 4Vsary to resize the key symbols or key actions arrays and any allocation errors occur,  D s 2XkbChangeTypesOfKey 4 returns  {BadAlloc 4. $l 36Changing the Number of Symbols Bound to a Key6 8d 4 bNTo change the number of symbols bound to a key, use  XkbResizeKeySyms 4. MULUTl =*OKeySym * tXkbResizeKeySyms =( xkb =,  key =,  needed =) XkZUJUTd = 4EXkbDescRec * xkb =;/* keyboard description to be changed */ agUHUTd =4int  key =;/* keycode for key to modify */ .tUFUTd =Dint  needed =;/* new number of keysyms required for key */ tc$ 4cXkbResizeKeySyms 4 reserves the space needed for  }needed 4 keysyms and returns a pointer to ups 4robthe beginning of the new array that holds the keysyms. It adjusts the  offset 4 field of the  tukkey_sym_map 4 entry for the key if necessary and can also change the  syms 4,  num_syms 4, and rra io{size_syms 4 fields of  xkb 4- }>map 4 if it is necessary to reallocate the  syms 4 array.  XkbResizeKeye ND ouWSyms 4 does not modify either the width or number of groups associated with the key.  $ 4 fIf  needed 4 is greater than the current number of keysyms for the key,  XkbResizeKeySyms 4 D 4>initializes all new keysyms in the array to  {NoSymbol 4. $ 4UTUBecause the number of symbols needed by a key is normally computed as width * number  4 ]of groups, and  XkbResizeKeySyms 4 does not modify either the width or number of groups r  4ne^for the key, a discrepancy exists upon return from  XkbResizeKeySyms 4 between the space  4haYallocated for the keysyms and the number required. The unused entries in the list of symy& 4r bbols returned by  XkbResizeKeySyms 4 are not preserved across future calls to any of the map 3 4 Vediting functions, so you must update the key symbol mapping (which updates the width @ 4eyWand number of groups for the key) before calling another allocator function. A call to ssoMD y.1XkbChangeTypesOfKey 4 will update the mapping. tb$ 4t VIf any allocation errors occur while resizing the number of symbols bound to the key, oD in+XkbResizeKeySyms 4 returns  {NULL 4. $UTUT$ =LA change to the number of symbols bound to a key should be accompanied by a URUT =roRchange in the number of actions bound to a key. Refer to section 16.1.16 for more UPUTD =>information on changing the number of actions bound to a key. 7l 3be!The Per-Key Modifier Map7 aK$ 4e `The  modmap 4 entry of the client map is an array, indexed by keycode, specifying the real rX 4ReYmodifiers bound to a key. Each entry is a mask composed of a bitwise inclusive OR of the e 4s,tlegal real modifiers:  {ShiftMask 4,  {LockMask 4,  {ControlMask 4,  {Mod1Mask 4,  {Mod2Mask 4, kr { apMod3Mask 4,  {Mod4Mask 4, and  {Mod5Mask 4. If a bit is set in a  modmap 4 entry, the correspondD 4If#ing key is bound to that modifier. siz$ 4sy\Pressing or releasing the key bound to a modifier changes the modifier set and unset state. UT 4)YThe particular manner in which the modifier set and unset state changes is determined by D 4e ?the behavior and actions assigned to the key (see Chapter 16). re d) anthaa .to kHH) b ofiHH 4 entantl 3by9Getting the Per-Key Modifier Map from the Server8 i$ 4. VTo update the modifier map for one or more of the keys in a keyboard description, use D : XkbGetKeyModifierMap 4. UNUTl =ol^Status  tXkbGetKeyModifierMap =( dpy =,  first =,  num =,  xkb =)  ULUTd =Ma6Display * dpy =;/* connection to X server */ UJUTd =@unsigned int first =;/* keycode of first key to get */ $UHUTd =reRunsigned int num =;/* number of keys for which information is desired */ 1UFUTd =Th@XkbDescPtr  xkb =;/* keyboard description to update */ geD$ aXkbGetKeyModifierMap 4 sends a request to the server for the modifier mappings for  }num 4 Q 4gkeys starting with the key whose keycode is  }first 4. It waits for a reply and places the results ^D 4iin the  xkb 4->map->modmap array. If successful,  XkbGetKeyModifier 4 returns  {Success 4. fs$ 4 i`If the map component of the  xkb 4 parameter has not been allocated,  XkbGetKeyModifiertiD 'Map 4 allocates and initializes it. UT$ 4us[If a compatible version of Xkb is not available in the server or the Xkb extension has not UT 4laebeen properly initialized,  XkbGetKeySyms 4 returns  {BadAccess 4. If any allocation errors kD 4y _occur while obtaining the modifier map,  XkbGetKeyModifierMap 4 returns  {BadAlloc 4. tiod) atrbb /rdesHH) b XkHH} srver forbma UT UTl 2$WXkb Server Keyboard Mapping9 he$ 4 idThe  server 4 field of the complete Xkb keyboard description (see section 6.1) is a pointer to 4,D 4y.the Xkb server map. GA"l 4reLFigure 16.1 shows the relationships between elements in the server map:b xkl s !Server Map Relationships d$ 4YThe Xkb server map contains the information the server needs to interpret key events and eD 4t $is of type  {XkbServerMapRec 4: en URUTd =#define XkbNumVirtualMods16 UPUT$ =kb&typedef struct {/* Server Map */ ,UNUT =n Hunsigned shortnum_acts;/* # of occupied entries in  acts = */ Xk9ULUT = @unsigned shortsize_acts;/* # of entries in  acts = */ FUJUT =JXkbAction *acts;/* linear 2d tables of key actions, 1 per keycode */ SUHUT = s>XkbBehavior *behaviors;/* key behaviors,1 per keycode */ `UFUT =XkLunsigned short * key_acts;/* index into  acts =, 1 per keycode */ omUDUT = kTunsigned char * explicit;/* explicit overrides of core remapping, 1 per key */ sezUBUT =Sunsigned charvmods[XkbNumVirtualMods];/* real mods bound to virtual mods */ bd) aliocc 0HH) b othHHvrp**cf *UTUT =4Kunsigned short *vmodmap;/* virtual mods bound to key, 1 per keycode*/ &tyURUTL =/1} ; XkbServerMapRec =, *XkbServerMapPtr; r'$ 4 o{The  num_acts 4,  size_acts 4,  acts 4, and  key_acts 4 fields specify the key actions, defined in sec 4 4etion 16.1. The  behaviors 4 field describes the behavior for each key and is defined in section eA 4s;c16.2. The  explicit 4 field describes the explicit components for a key and is defined in seco N 4 kction 16.3. The  vmods 4 and the  vmodmap 4 fields describe the virtual modifiers and the ng,[D 4UBBper-key virtual modifier mapping and are defined in section 16.4. tl 3ircKey ActionsZ $ 4 a[A key action defines the effect key presses and releases have on the internal state of the o 4bserver. For example, the expected key action associated with pressing the  Shift 4 key is to  4vi\set the  {Shift 4 modifier. There is zero or one key action associated with each keysym ,D 4 rbound to each key. {Th$ 4, eJust as the entire list of key symbols for the keyboard mapping is held in the  syms 4 field of  4dthe client map, the entire list of key actions for the keyboard mapping is held in the  acts 4 e 4s;marray of the server map. The total size of  acts 4 is specified by  size_acts 4, and the number of D 4 1+entries is specified by  num_acts 4.  f$ 4 vaThe  key_acts 4 array, indexed by keycode, describes the actions associated with a key. The i  gkey_acts 4 array has  min_key_code 4 unused entries at the start to allow direct indexing using an 4 tja keycode. If a  key_acts 4 entry is  {zero 4, it means the key does not have any actions associ' 4pated with it. If an entry is not  {zero 4, the entry represents an index into the  acts 4 field of the ed4 4,fserver map, much as the  offset 4 field of a  {KeySymMapRec 4 structure is an index into the AD ma#syms 4 field of the client map. ld V$ 4iThe reason the  acts 4 field is a linear list of  {XkbAction 4s is to reduce the memory consumpec 4s;Ytion associated with a keymap. Because Xkb allows individual keys to have multiple shift ,p 4 [levels and a different number of groups per key, a single two-dimensional array of  {Key  } {aySSyms 4 would potentially be very large and sparse. Instead, Xkb provides a small  4 a[two-dimensional array of  {XkbAction 4s for each key. To store all of these individual D 4a Zarrays, Xkb concatenates each array together in the  acts 4 field of the server map. $ 4]The key action structures consist only of fields of type char or unsigned char. This is done  4ie[to optimize data transfer when the server sends bytes over the wire. If the fields are anymMa 4 iXthing but bytes, the server has to sift through all of the actions and swap any nonbyte D 4onNfields. Because they consist of nothing but bytes, it can just copy them out. $ 4WXkb provides the following macros, to simplify accessing information pertaining to key ve D 4 actions:  UPUTl = dHBool  tXkbKeyHasActions =( xkb, keycode =)/* macro */ eyUNUTd ==XkbDescPtr xkb =;/* Xkb description of interest */ e$ULUTd = s6KeyCode keycode =;/* keycode of interest */ 7$ fokXkbKeyHasActions 4 returns  {True 4 if the key corresponding to  }keycode 4 has any actions assoethDD 4 5ciated with it; otherwise, it returns  {False 4. eYUJUTl =s Gint  tXkbKeyNumActions =( xkb, keycode =)/* macro */ fUHUTd =pt=XkbDescPtr xkb =;/* Xkb description of interest */ IsUFUTd =ny6KeyCode keycode =;/* keycode of interest */ d) aaandd 1onHH) b ubyHHyth++ 4WXkd f+$ fyWXkbKeyNumActions 4 computes the number of actions associated with the key correspondl 4Xfing to  }keycode 4. This should be the same value as the result of  XkbKeyNumSyms 4 (see sec"D 4pttion 15.3.3). 6UTUTl = SXkbKeyActionPtr  tXkbKeyActionsPtr =( xkb, keycode =)/* macro */ KeyCURUTd =ur=XkbDescPtr xkb =;/* Xkb description of interest */ PUPUTd =th6KeyCode keycode =;/* keycode of interest */ c$ e^XkbKeyActionsPtr 4 returns a pointer to the two-dimensional array of key actions associated p 4ptiwith the key corresponding to  }keycode 4. Use  XkbKeyActionsPtr 4 only if the key actually has } 4f ^some actions associated with it, that is,  XkbKeyNumActions 4(xkb, keycode) returns someD 4)thing greater than zero. UNUTl =thNXkbAction  tXkbKeyAction =( xkb, keycode, idx =)/* macro */ ULUTd = c=XkbDescPtr xkb =;/* Xkb description of interest */ dUJUTd =6KeyCode keycode =;/* keycode of interest */ UHUTd =of:int idx =;/* index for group and shift level */ $ cXkbKeyAction 4 returns the key action indexed by  }idx 4 in the two-dimensional array of key UT 4esgactions associated with the key corresponding to  }keycode 4.  }idx 4 may be computed from the /*D 4st.group and shift level of interest as follows: d 4o ,idx = group_index * key_width + shift_level iaUFUTl =ZXkbAction  tXkbKeyActionEntry =( xkb, keycode, shift, grp =)/* macro */ *UDUTd = =XkbDescPtr xkb =;/* Xkb description of interest */ 7UBUTd =ns6KeyCode keycode =;/* keycode of interest */ DU@UTd =er5int shift =;/* shift level within group */ nQU>UTd =od modmap 4[ keycode 4] field. Bly 4 oKThe  type 4 field can have any of the values shown in Table 16.2. ds;d) a mogg 4UJHH) b /deHH4cription gUT$A 4arbThe  flags 4 field is composed of the bitwise inclusive OR of the masks shown in Table 16.3. BLA 4AcgA general meaning is given in the table, but the exact meaning depends on the action  }type 4. ns $P 4biIf  {XkbSA_UseModMapMods 4 is not set in the  flags 4 field, the  mask 4,  real_mods 4,  vmods1 4, and gtP ]vmods2  4fields are used to determine the action modifiers. Otherwise they are ignored and aDP 4gthe modifiers bound to the key (client  map 4-> modmap 4[ }keycode 4]) are used instead. m$ 4UTrThe  mask 4,  real_mods 4,  vmods1 4, and  vmods2 4 fields represent the components of an Xkb % 4abgmodifier description (see section 7.2). While the  mask 4 and  real_mods 4 fields correspond 2 4qdirectly to the  mask 4 and  real_mods 4 fields of an Xkb modifier description, the  vmods1 4 and r?  cvmods2 4 fields are combined to correspond to the  vmods 4 field of an Xkb modifier descripgA LD 4 gMtion. Xkb provides the following macros, to convert between the two formats: aU<UTl =PJunsigned short  tXkbModActionVMods =( act =)/* macro */ nU:UTd = JXkbAction act =;/* action from which to extract virtual mods */ $ teyXkbModActionVMods 4 returns the  vmods1 4 and  vmods2 4 fields of  }act 4 converted to the  vmods 4 D 4ap'format of an Xkb modifier description. mU8UTl =UTJvoid  tXkbSetModActionVMods =( act, vmods =)/* macro */ U6UTd = c=XkbAction act =;/* action in which to set vmods */ (U4UTd =Wh;unsigned short vmods =;/* virtual mods to set */ $ yXkbSetModActionVMods 4 sets the  vmods1 4 and  vmods2 4 fields of  }act 4 using the  vmods 4 format D 4s2!of an Xkb modifier description. oU2UT,6 3s\ =Despite the fact that the first parameter of these two macros is of type XkbAction, mU0UT6 =be_these macros may be used  1only  =with Actions of type  {XkbModAction = and  {XkbISOt  U.UTD6 {/ Action =. "l 3 )Actions for Changing Group StateG 6$ 4\Actions associated with the  {XkbGroupAction 4 structure change the current group state f C 4teVwhen keys are pressed and released (see Chapter 5 for a description of groups and keyPD 4UTboard state): eU,UT$ =s!typedef struct _XkbGroupAction { orU*UT =Aunsigned chartype;/*  pXkbSA_{Set|Latch|Lock}Group = */ (U(UT =WhOunsigned charflags;/* with  type =, controls the effect on groups */ d)! ad hh 5dsf HH)" b! HHyn . oU2CVhsUTUT = t;chargroup_XXX;/* represents a group index or delta */ ionURUTL =6} H XkbGroupAction =; 'Bl 4ctAThe  type 4 field can have any of the following values: 6$ 4bThe  flags 4 field is composed of the bitwise inclusive OR of the masks shown in Table 16.5. BL 4XkgA general meaning is given in the table, but the exact meaning depends on the action  }type 4. nd d)# afroii 6UTHH)$ b# estHHg onsigned W^i* _{S$ 4p`The  group_XXX 4 field represents a signed character. Xkb provides the following macros to gD 4?convert between a signed integer value and a signed character: ds)UTUTl =8int  tXkbSAGroup =( act =)/* macro */ 6URUTd =CXkbAction act =;/* action from which to extract group */ X;Id ^XkbSAGroup 4 returns the  group_XXX 4 field of  }act 4 converted to a signed int. ^UPUTl = fAvoid  tXkbSASetGroup =( act, grp =)/* macro */ kUNUTd = ?XkbAction act =;/* action from which to set group */ in xULUTd =Bint grp =;/* group index to set in  }group_XXX = */ d n eXkbSASetGroup 4 sets the  group_XXX 4 field of  }act 4 from the group index  }grp 4. UJUT$1 =TDespite the fact that the first parameter of these two macros is of type XkbAction, igUHUT1 =* Wthese macros may only be used with Actions of type  {XkbGroupAction = and  {XkbIer.UFUTD1 {foSOAction =. l 3'Actions for Moving the PointerK lue$ 4acZActions associated with the  {XkbPtrAction 4 structure move the pointer when keys are D 4Xkpressed and released: UDUT$ =chtypedef struct _XkbPtrAction { UBUT  =7unsigned chartype;/* ( pXkbSA_MovePtr { */ onv U@UT =in@unsigned charflags;/* determines type of pointer motion */ gr-U>UT =o 8unsigned charhigh_XXX;/* x coordinate, high bits*/ io:U<UT =t 7unsigned charlow_XXX;/* y coordinate, low bits */ groGU:UT = 9unsigned charhigh_YYY;/* x coordinate, high bits */ TU8UT =_X7unsigned charlow_YYY;/* y coordinate, low bits */ 4aU6UTL =1} L XkbPtrAction =; e t$ 4 teIf the  {MouseKeys 4 control is not enabled (see section 10.5.1),  {KeyPress 4 and  {KeyResD {ouMlease 4 events are treated as though the action is  {XkbSA_NoAction 4. $ 4foeIf the  {MouseKeys 4 control is enabled, a server action of type  {XkbSA_MovePtr 4 instructs c  4tebthe server to generate core pointer  {MotionNotify 4 events rather than the usual  {Key {UB_Press 4 event, and the corresponding  {KeyRelease 4 event disables any mouse keys timers @uD 4s;Lthat were created as a result of handling the  {XkbSA_MovePtr 4 action. ard 4co^The  type 4 field of the  {XkbPtrAction 4 structure is always  {XkbSA_MovePtr 4. Bl 4XThe  flags 4 field is a bitwise inclusive OR of the masks shown in Table 16.6. ud)% awitjj 71} HH)& b% tHHF d (see s_`j, _ssc$ 4sZEach of the X and Y coordinantes of the  {XkbPtrAction 4 structure is composed of two p 4esigned 16-bit values, that is, the X coordinate is composed of  }high_XXX 4 and  }low_XXX 4, s} 4Rand similarly for the Y coordinate. Xkb provides the following macros, to convert D 4{Zbetween a signed integer and two signed 16-bit values in  {XkbPtrAction 4 structures: ULUTl =ey;int  tXkbPtrActionX =( act =)/* macro */ lt UJUTd ={BXkbPtrAction act =;/* action from which to extract X */ d bPtXkbPtrActionX 4 returns the  -high_XXX 4 and  -low_XXX 4 fields of  }act 4 converted to a signed int. luUHUTl =ks;int   tXkbPtrActionY =( act =)/* macro */ UFUTd =BXkbPtrAction act =;/* action from which to extract Y */ d tXkbPtrActionY 4 returns the  -high_YYY 4 and  -low_YYY 4 fields of  }act 4 converted to a signed int. nt UDUTl =trJvoid ! tXkbSetPtrActionX =( act =,  x =)/* macro */ UBUTd =heUTl =trBvoid " tXkbSetPtrActionY =( act, y =)/* macro */ eU<UTd =t rp?1p?m?QHm?m?_?Q*? a>q1_?Qp>q?Q*@ 1 ly q?Q ma* 7 q bUUd T groups[3] ?Q*A rqB1qB?Q grps??q?Q*B aAr1q?QqA?Q*C 1 ?Q *: r UUd Tcompat ?QZ*D rrE1rEO?QZ gr?Q*E rDF1DFOo<?QQ?l? ?Q*F rEs1EO ?QQ ?l ?d?Q*G 1 d?Q psUUd T] XkbDescRec )?Q*H 1 )?Q ?? a>qtUUd T?sym_interpret %?Q*I rtJ1ma%?Q7?Q* J rIK1UU7?Q3] 7?׀7?%?Q*!K rJu1gr%?Q?%?׀%?y?l*"L 1 Ay?l *?uUUd T*XkbCompatMapRec 2A?Ql*#M ruv1?2A?QlD r ?u*$N 1 ? ?u FQv?UUd TXkbSymInterpretRec(s) ?Qu*%O avP1?QusFl??*&P nOQ1l??l??%?/?~*'Q nPR1/?~* /?V/?VA?2S?Q*(R rQS1 a2S?Q2S?S?2e?Q*)S rRT1*2e?Qma2e?e?2w?Q**T rSU12w?Q] 2w?w?2?Q*+U rTV12?Q?2??2?Q*,V rUW1 2?Q2??)JXJL ]*-W pVX1 )JXJL ])S?)S? y0XJ* ]*.X pWY1 XJ* ]?? y num_si - 1XJ( ]*/Y pX1 DXJ( ]?? y size_si - 1- *0Z b ?- P L UTUT` 1F187 ?,- *1[ b ?,- ? M? UTUT` 1122 n:- *2\ b :-  N UTUT` 125 aH- *3] b ?H- T O* UTUT` 179 2V- *4^ b UV-  P]  UTUT` 1?45 d- *5_ b d- ? QQ UTUT` 145 r- *6` b r-  p R  UTUT` 1]185 ?- *7a b pY- XJ S? UTUT` 1si178 - *8b b O-  T si_s UTUT` 152 i- *9c b i- UT U`F UTUT`! 1155 d*:d aww 8UTHH*;e bd b HH  arw Bl 4OThe  type 4 field can have any one of the values shown in Table 16.7. u$ 4bThe  flags 4 field is composed of the bitwise inclusive OR of the masks shown in Table 16.8. BL 4hA general meaning is given in the table, but the exact meaning depends on the action  }type. 4: %l 3:Actions for Changing the Pointer Button SimulatedQ 9$ 4^Actions associated with the  {XkbPtrDfltAction 4 structure change the  mk_dflt_btn 4 FD 4Iattribute of the  {MouseKeys 4 control ( =see  4section 10.5.1): [UUT$ =T#typedef struct _XkbPtrDfltAction { hUUT  =*9:unsigned chartype;/* ) pXkbSA_SetPtrDflt = */ uU UT =!Aunsigned charflags;/* controls the pointer button number */ U UT  =UT?unsigned charaffect;/* * pXkbSA_AffectDfltBtn = */ d*<f arxx 9HH*=g bf nofHHab$$$sxxfl$UTUT =of2charvalueXXX;/* new default button member */ URUTL = }  XkbPtrDfltAction =; en'$ 4 tlIf the  {MouseKeys 4 control is not enabled,  {KeyPress 4 and  {KeyRelease 4 events are treated P4 4lagas though the action is  {XkbSA_NoAction 4. Otherwise, this action changes the  mk_dflt_btn 4 AD 4,attribute of the  {MouseKeys 4 control. ysV$ 4RThe  type 4 field of the  {XkbPtrDfltAction 4 structure should always be cD {*9XkbSA_SetPtrDflt 4. x$ 4SebThe  flags 4 field is composed of the bitwise inclusive OR of the values shown in Table 16.9 BL 41(currently there is only one value defined). e$ 4eThe  affect 4 field specifies what changes as a result of this action. The only valid value for =D 4 n9the  affect 4 field is  {XkbSA_AffectDfltBtn 4.  $ 4^The  valueXXX 4 field is a signed character that represents the new button value for the  DfTmk_dflt_btn 4 attribute of the  qMouseKeys 4 control (see section 10.5.1). If ' qd iXkbSA_DfltBtnAbsolute 4 is set in  }flags 4,  valueXXX 4 specifies the button to be used; oth4 4accerwise,  valueXXX 4 specifies the amount to be added to the current default button. In either rolA 4Ycase, illegal button choices are wrapped back around into range. Xkb provides the followN 4XkXing macros, to convert between the integer and signed character values in  qXkbPtrDflse[D qhetAction 4 structures: 9 pUJUTl =?int # tXkbSAPtrDfltValue =( act =)/* macro */ $}UHUTd =ctCXkbAction act =;/* action from which to extract group */ y vd dXkbSAPtrDfltValue 4 returns the  valueXXX 4 field of  }act 4 converted to a signed int.  UFUTl =ldHvoid $ tXkbSASetPtrDfltValue =( act, val =)/* macro */ UDUTd =flOXkbPtrDfltAction act =;/* action in which to set  valueXXX = */ 'UBUTd =Xk;int val =;/* value to set in  valueXXX = */  4d tt[XkbSASetPtrDfltValue 4 sets the  valueXXX 4 field of  }act 4 from  }val 4. adl 3 d0Actions for Locking Modifiers and GroupT ca$ 4 cXActions associated with the  {XkbISOAction 4 structure lock modifiers and the group in D 4rt(according to the ISO9995 specification. va!$ 4Df_Operated by itself, the  {XkbISOAction 4 is just a caps lock. Operated simultaneously with tVa. 4)Yanother modifier key, it transforms the other key into a locking key. For example, press ; vpISO_Lock 4, press and release  Control_L 4, release  ISO_Lock 4 ends up locking the  {Control 4 d HD 4 modifier. ]d 4tP$The default behavior is to convert: /*rU@UTd =UT {Set,Latch}Mods to: LockMods U>UTd =on" {Set,Latch}Group to: LockGroup U<UTd = SetPtrBtn to: LockPtrBtn ald*>h ayy :al HH*?i bh c 4HHmad ActionyyMoUTUTd = SetControls to: LockControls ed$ 4SOWThe  affects 4 field allows you to turn those effects on or off individually. Set e I' {onZXkbSA_ISONoAffectMods 4 to disable the first,  {XkbSA_ISONoAffectGroup 4 to disable 4D 4outhe second, and so forth. IURUT$ =fitypedef struct _XkbISOAction { ey VUPUT  =. 7unsigned chartype;/* + pXkbSA_ISOLock = */ rescUNUT =CoJunsigned charflags;/* controls changes to group or modifier state */ pULUT =Zunsigned charmask;/*  4same as  mask 4 field of a modifier description = */ }UJUT =dsdunsigned charreal_mods;/* same as  real_mods 4  =field of a modifier description 4 */ rBUHUT =al4chargroup_XXX;/* group index or delta group */ UFUT =alcunsigned charaffect;/* specifies whether to affect mods, group, ptrbtn 1, = or controls*/ AcUDUT =Mo^unsigned charvmods1;/* derived from  vmods 4 field of a modifier description = */ UBUT =lo^unsigned charvmods2;/* derived from  vmods 4 field of a modifier description = */ U@UTL =ab} D XkbISOAction =; ffd* 4safThe  type 4 field of the  {XkbISOAction 4 structure should always be  {XkbSA_ISOLock 4. $ 4 eThe interpretation of the  flags 4 field depends on whether the  {XkbSA_ISODfltIsGroup 4 is lD 4ch(set in the  flags 4 field or not. UT$ 4ighIf the  {XkbSA_ISODfltIsGroup 4 is set in the  flags 4 field, the action is used to change the u 4_megroup state. The remaining valid bits of the  flags 4 field are composed of a bitwise inclusive c"BL 4* -OR using the masks shown in Table 16.10. d*@j a etzz ; pbtHH*Ak bj MoHHq mods 4 Mzdi N P R on$ 4hIf the  {XkbSA_ISODfltIsGroup 4 is not set in the  flags 4 field, the action is used to change U@ 4} ethe modifier state and the remaining valid bits of the  flags 4 field are composed of a bitwise r"BL 4ys7inclusive OR using the masks shown in Table 16.11. erp$- 4ZThe  group_XXX 4 field represents a signed character. Xkb provides macros to convert D- 4laPbetween a signed integer value and a signed character as shown in section Note. is$. 4agrThe  mask 4,  real_mods 4,  vmods1 4, and  vmods2 4 fields represent the components of an Xkb . 4 agmodifier description (see section 7.2). While the  mask 4 and  real_mods 4 fields correspond . 4*@qdirectly to the  mask 4 and  real_mods 4 fields of an Xkb modifier description, the  vmods1 4 and . cvmods2 4 fields are combined to correspond to the  vmods 4 field of an Xkb modifier descriptIsD. 4etYtion. Xkb provides macros to convert between the two formats as shown in section 16.1.3. i$L 4em^The  affect 4 field is composed of a bitwise inclusive OR using the masks shown in Table  BLL 4he 16.11.  n d*Bl ah {{ <estsHH*Cm bl nvHHlaer value N{ch N P Rwnl5 3is/Actions for Changing the Active ScreenW mod$6 4 4^Actions associated with the  {XkbSwitchScreen 4 action structure change the active screen D6 4cton a multiscreen display: U>UT$7 =mo[This action is optional. Servers are free to ignore the action or any of its flags if they odsU<UT7 =XkQdo not support the requested behavior. If the action is ignored, it behaves like eU:UT7 {o SXkbSA_NoAction =. Otherwise, key press and key release events do not generate an 4etU8UTD7 =esevent. c$U6UT$8 = t(typedef struct _XkbSwitchScreenAction { 1U4UT 8 =Th<unsigned chartype;/* , pXkbSA_SwitchScreen = */ si>U2UT8 = i8unsigned charflags;/* controls screen switching */ KU0UT8 =0charscreenXXX;/* screen number or delta */ XU.UTL8 = b%} X XkbSwitchScreenAction =; k$9 4WThe  type 4 field of the  {XkbSwitchScreenAction 4 structure should always be ngixD9 {enXkbSA_SwitchScreen 4. 4$B 4ed\The  flags 4 field is composed of the bitwise inclusive OR of the masks shown in Table ctBLB 4 d 16.13. UT/$C 4 adThe  screenXXX 4 field is a signed character value that represents either the relative or abso7<C 4rtglute screen index, depending on the state of the  {XkbSA_SwitchAbsolute 4 bit in the  flags 4 =IC 4reXfield. Xkb provides the following macros to convert between the integer and signed charVDC 4stLacter value for screen numbers in  {XkbSwitchScreenAction 4 structures: * kUUTlE =ch8int % tXkbSAScreen =( act =)/* macro */ s;xUUTdF =enOXkbSwitchScreenAction act =;/* action from which to extract screen */ a *dG 8_XkbSAScreen 4 returns the  screenXXX 4 field of  }act 4 converted to a signed int. {d*Dn aaay|| =enXkHH*Eo bn dThHHis inclusi|asUTUTlH =?void & tXkbSASetScreen =( act, s =)/* macro */ XXURUTdI =neTXkbSwitchScreenAction act =;/* action in which to set  screenXXX = */ lu!UPUTdJ =ep9int s =;/* value to set in  screenXXX = */ 4d, 4TXkbSASetScreen 4 sets the  screenXXX 4 field of  }act 4 from  }s 4. thMli 3ed4Actions for Changing Boolean Controls StateZ uma$ 4tc]Actions associated with the  {XkbCtrlsAction 4 structure change the state of the boolean nD 4Ucontrols (see section 10.1): eUNUT$N = =!typedef struct _XkbCtrlsAction { sULUT N =Sunsigned chartype;/* - pXkbSA_SetControls, .XkbSA_LockControls = */ ertUJUTN =. ]unsigned charflags;/* with  type =, controls enabling and disabling of controls */ UHUTN =lunsigned charctrls3;/*  ctrls0 = through  ctrls3 =  4represent the boolean controls = */ HUFUTN =Xlunsigned charctrls2;/*  ctrls0 = through  ctrls3 =  4represent the boolean controls = */ /UDUTN =tolunsigned charctrls1;/*  ctrls0 = through  ctrls3 =  4represent the boolean controls = */ UBUTN =Xklunsigned charctrls0;/*  ctrls0 = through  ctrls3 =  4represent the boolean controls = */ AcU@UTLN = B} [ XkbCtrlsAction =; Bl[ 4AcPThe  type 4 field can have any one of the values shown in Table 16.14. b$d 4\The  flags 4 field is composed of the bitwise inclusive OR of the masks shown in Table sBLd 4 16.15. harQ$e 4pZThe  {XkbSA_SetControls 4 action implements a key that enables a boolean control when ^e 4tyXpressed and disables it when released. The  {XkbSA_LockControls 4 action is used to arke 4ctXimplement a key that toggles the state of a boolean control each time it is pressed and Nxe 4ar\released. The  {XkbSA_LockNoLock 4 and  {XkbSA_LockNoUnlock 4 flags allow modifying /De 4toGthe toggling behavior to only unlock or only lock the boolean control. eprd*Fp aT}} >cts0HH*Gq bp 4HHcoLN}$f 4tThe  ctrls0 4,  ctrls1 4,  ctrls2 4, and  ctrls3 4 fields represent the boolean controls in the Thf elienabled_ctrls 4 field of the controls structure ( =see section 10.1 4). Xkb provides the following r"Df 4p,macros, to convert between the two formats: nt6UTUTlg =esDunsigned int ' tXkbActionCtrls =( act =)/* macro */ whCURUTdh = {JXkbCtrlsAction act =;/* action from which to extract controls */ Vdi tbXkbActionCtrls 4 returns the  }ctrls 4 fields of  }act 4 converted to an unsigned int. kUPUTlj =4Hvoid ( tXkbSAActionSetCtrls =( act, ctrls =)/* macro */ toxUNUTdk =avIXkbCtrlsAction act =;/* action in which to set ctrls0-ctrls3 */ ULUTdl =Bunsigned int ctrls =;/* value to set in ctrls0-ctrls3 */ dm 4rXkbSAActionSetCtrls 4 sets the  ctrls0 4 through  ctrls3 4 fields of  }act 4 from  }ctrls 4. ln 34(Actions for Generating Messages] s ,o 4ea]Actions associated with the  {XkbMessageAction 4 structure generate S {XkbActionMes=Do { 4sage 4 events: eUJUTdp =$#defineXkbActionMessageLength6 enUHUT$q =nt#typedef struct _XkbMessageAction { 'UFUT q = ==unsigned chartype;/* / pXkbSA_ActionMessage = */ cUDUTq =Uunsigned charflags;/* controls event generation via key presses and releases */ t"UBUTq = Cunsigned charmessage[XkbActionMessageLength];/* message */ lj/U@UTLq =X } ^ XkbMessageAction =; rlB$r 4 *RThe  type 4 field of the  {XkbMessageAction 4 structure should always be ODr {ULXkbSA_ActionMessage 4. id$} 4;\The  flags 4 field is composed of the bitwise inclusive OR of the masks shown in Table cqBL} 4 16.16. fie$~ 4 f`The  message 4 field is an array of  {XkbActionMessageLength 4 unsigned characters and o,D~ 4ci3may be set to anything the keymap designer wishes. ratCU,UTl nM&Detecting Key Action Messages` U$3 4pfTo receive  {XkbActionMessage 4 events by calling either  XkbSelectEvents 4 or  XkbSelectbD3 =$EventDetails 4 (see section 4.3). bSw$4 4 \To receive  {XkbActionMessage 4 events under all possible conditions, use  XkbSelect aD4 UBmEvents 4 and pass  {XkbActionMessageMask 4 in both  }bits_to_change 4 and  }values_for_bits 4. d*Hr ar~~ ?ldf HH*Is br alHHzr,,e 4. i~},$0 4el]The  {XkbActionMessage 4 event has no event details. However, you can call  XkbSelect60 fEventDetails 4 using  {XkbActionMessage 4 as the  }event_type 4 and specifying  {XkbAllAc"0 {itionMessageMask 4 in  }bits_to_change 4 and  }values_for_bits. 4 This has the same effect as a i/D0 4!call to  XkbSelectEvents 4. bDd 4evLThe structure for the  {XkbActionMessage 4 event is defined as follows: 3XUTUT$ = #typedef struct _XkbActionMessage { $4eURUT = {1inttype;/* Xkb extension base event code */ drUPUT =bS@unsigned longserial;/* X server serial number for event */ saUNUT = BBoolsend_event;/*  {True = => synthetically generated */ ULUT =LDisplay *display;/*  1server connection where event generated = */ UJUT =5Timetime;/* server time when event generated */ UHUT =0intxkb_type;/*  pXkbActionMessage = */ ntUFUT =ilNintdevice;/* Xkb device  1ID =, will not be  pXkbUseCoreKbd = */ UDUT =Me:KeyCodekeycode;/* keycode of key triggering event */ UBUT =0IBoolpress;/*  {True = => key press,  {False = => release */ .U@UT =saMBoolkey_event_follows;/*  {True = => KeyPress/KeyRelease follows */ U>UT =stCchar message[XkbActionMessageLength+1];/* message text */ 3U<UTL = %} a XkbActionMessageEvent =; 4$ 4 {jThe  keycode 4 is the keycode of the key that was pressed or released. The  press 4 field speciD 4orFfies whether the event was the result of a key press or key release. )$ 4er|The  key_event_follows 4 specifies whether a  {KeyPress 4 (if  press 4 is  {True 4) or  {KeyRelease 4 6 4 sn(if  press 4 is  {False 4) event is also sent to the client. As with all other Xkb events,  {XkbAcC {iZtionMessageEvent 4s are delivered to all clients requesting them, regardless of the curP 4ycbrent keyboard focus. However, the  {KeyPress 4 or  {KeyRelease 4 event that conditionally ] 4se\follows an  {XkbActionMessageEvent 4 is sent only to the client selected by the current ssj 4s lkeyboard focus.  key_event_follows 4 is  {True 4 only for the client that is actually sent the folwD 4bA5lowing  {KeyPress 4 or  {KeyRelease 4 event. e$ 4ey`The  message 4 field is set to the message specified in the action and is guaranteed to be fi {ntgNULL 4-terminated; the Xkb extension forces a  {NULL 4 into  message 4[ {XkbActionMessagefieD {yP Length 4]. l 3Tr3Actions for Generating a Different Keycodeb n(i$ 4 aActions associated with the  {XkbRedirectKeyAction 4 structure generate  {KeyPress 4 and  {agVKeyRelease 4 events containing a keycode different from the key that was pressed or D 4 k released: U:UT$ ={'typedef struct_XkbRedirectKeyAction { thaU8UT  =;unsigned chartype;/* 0 pXkbSA_RedirectKey = */ seU6UT =en;unsigned charnew_key;/* keycode to be put in event */ cus)U4UT =ll@unsigned charmods_mask;/* mask of real mods to be reset */ th6U2UT =Cunsigned charmods;/* mask of real mods to take values from */ CU0UT = Sunsigned charvmods_mask0;/* first half of mask of virtual mods to be reset */ o bPU.UT =Sunsigned charvmods_mask1;/* other half of mask of virtual mods to be reset */ 4[]U,UT =geVunsigned charvmods0;/* first half of mask of virtual mods to take values from */ jU*UT =deVunsigned charvmods1;/* other half of mask of virtual mods to take values from */ wU(UTL = $} c XkbRedirectKeyAction =; agd*Jt aeif @asreHH*Ku bt :UTHHsst))on { tha)$ 4;WThe  type 4 field for the  {XkbRedirectKeyAction 4 structure should always be * kD {n XkbSA_RedirectKey 4. *, 4armdKey presses cause a  {KeyPress 4 event for the key specified by the  new_key 4 field instead of l7 4esYthe actual key. The state reported in this event reports the current effective modifiers rD 4se`changed as follows: any real modifiers selected by the  mods_mask 4 field are set to corretoQ 4U,_sponding values from the  mods 4 field. Any real modifiers bound to the virtual modifiers rom^ 4fspecified by the  vmods_mask0 4 and  vmods_mask1 4 fields are either set or cleared, dependk 4iing on the corresponding values in the  vmods0 4 and  vmods1 4 fields. If the real and virtual ex 4]modifier definitions specify conflicting values for a single modifier, the real modifier defD 4inition has priority. $ 4heaKey releases cause a  {KeyRelease 4 event for the key specified by the  new_key 4 field  4\instead of the actual key. The state for this event consists of the effective keyboard modikeD 4d Cfiers at the time of the release, changed as described previously. eve$ 4reZThe  {XkbSA_RedirectKey 4 action normally redirects to another key on the same device  4ma\as the key that caused the event, unless that device does not belong to the input extension el  {er^KeyClass 4, in which case this action causes an event on the core keyboard device. (The  4 Xinput extension categorizes devices by breaking them into classes. Keyboards, and other vD 4mo]input devices with keys, are classified as  KeyClass 4 devices by the input extension.) n$ 4flkThe  vmods_mask0 4 and  vmods_mask1 4 fields actually represent one  vmods_mask 4 value, as  4reVdescribed in Chapter 7. Xkb provides the following macros, to convert between the two ,D 4 formats: a@UTUTl =y.Munsigned int ) tXkbSARedirectVModsMask =( act =)/* macro */ MURUTd = tNXkbRedirectKeyAction act =;/* action from which to extract vmods */ `$ dimXkbSARedirectVModsMask 4 returns the  vmods_mask0 4 and  vmods_mask1 4 fields of  }act 4 conamD 4leverted to an unsigned int. tUPUTl =ioLvoid * tXkbSARedirectSetVModsMask =( act, vm =)/* macro */ n UNUTd =keHXkbRedirectKeyAction act =;/* action in which to set vmods */ ceULUTd = iFunsigned int vm =;/* new value for virtual modifier mask */ $ ssnXkbSARedirectSetVModsMask 4 sets the  vmods_mask0 4 and  vmods_mask1 4 fields of  }act 4 from D }fi vm 4. l$ 4qSimilarly, the  vmods0 4 and  vmods1 4 fields actually represent one  vmods  4value, as described v 4o Sin Chapter 7. To convert between the two formats, Xkb provides the following conveectD 4acnience macros: ro UJUTl =M =unsigned int + tXkbSARedirectVMods =( act =)/* macro */ s UHUTd =NXkbRedirectKeyAction act =;/* action from which to extract vmods */  $ lXkbSARedirectVModsMask 4 returns the  -vmods0 4 and  vmods1 4 fields of  }act 4 converted to di-D 4an unsigned int. BUFUTl =UNHvoid , tXkbSARedirectSetVMods =( act, vm =)/* macro */ toOUDUTd =ULHXkbRedirectKeyAction act =;/* action in which to set vmods */ if\UBUTd =Aunsigned int v =;/* new value for virtual modifiers */ 0od _miXkbSARedirectSetVModsMask 4 sets the  -vmods0 4 and  vmods1 4 of  }act 4 from  }v 4. d*Lv al r AvueHH*Mw bv aerHH tides thevel 3ceIActions for Generating DeviceButtonPress and DeviceButtonReleasee d$ 4XActions associated with  {XkbDeviceBtnAction 4 structures generate  {DeviceButtonwh) {dsbPress 4 and  {DeviceButtonRelease 4 events instead of normal  {KeyPress 4 and  {KeyRe6D {4lease 4 events: JUTUT$ =%typedef struct _XkbDeviceBtnAction { oWURUT  =diRunsigned chartype;/*   pXkbSA_DeviceBtn, 1XkbSA_LockDeviceBtn = */ dUPUT =ctPunsigned charflags;/* with  type =, specifies locking or unlocking */ qUNUT =luVunsigned charcount;/* controls number of DeviceButtonPress and Release events */ ~ULUT =d Aunsigned charbutton;/* index of button on  device = */ UJUT =Punsigned chardevice;/* device  1ID = of an X input extension device */ aUHUTL ="} f XkbDeviceBtnAction =; Bl 4vePThe  type 4 field can have any one of the values shown in Table 16.17. D:$ 4\The  flags 4 field is composed of the bitwise inclusive OR of the masks shown in Table teGBL 4wh 16.18. d*Nx a  B {eyHH*Oy bx leHHUTruct _Xk7onUTMl 3ig<Actions for Simulating Events from Device Valuatorsh ica, 4UTgA  fvaluator 4 manipulates a range of values for some entity, like a mouse axis, a slider or a n 4d Zdial. Actions associated with  {XkbDeviceValuatorAction 4 structures are used to simu{D 4ar>late events from one or two input extension device valuators. UPUT$, =d *typedef struct _XkbDeviceValuatorAction { UNUT , =vi=unsigned chartype;/*4 pXkbSA_DeviceValuator = */ ULUT, =ve1unsigned chardevice;/* device  1ID = */ lUJUT, = 1Tunsigned charv1_what;/* determines how valuator is to behave for valuator 1 */ ncUHUT, =as9unsigned charv1_ndx;/* specifies a real valuator */ UFUT, =*N:unsigned charv1_value;/* the value for valuator 1 */ UDUT, =*OTunsigned charv2_what;/* determines how valuator is to behave for valuator 2 */ 7UBUT, =UT9unsigned charv2_ndx;/* specifies a real valuator */ mU@UT, =h:unsigned charv2_value;/* the value for valuator 1 */ U>UTL, = f'}  XkbDeviceValuatorAction =; er $. 4uIf  device 4 is illegal or if neither  v1_ndx 4 nor  v2_ndx 4 specifies a legal valuator, this action r%D. 4 o%behaves like  {XkbSA_NoAction 4. o:$b =,hThe low four bits of  v1_what = and  v2_what = specify the corresponding scale value (denoted SAGb { vvalScale = in  4Table 16.17 =), if needed. The high four bits of  v1_what = and  v2_what = specify Tb =honthe operation to perform to set the values. 4 The high four bits of  v1_what 4 and  v2_what 4 can ab 4UT\have the values shown in Table 16.17; the use of  {valScale 4 is shown in that table unBLb 4ha also.# U0UT$ =aIllegal values for  {XkbSA_SetValRelative = or  {XkbSA_SetValAbsolute = are clamped into vU.UT =UTfrange. Note that all of these possibilities are legal for absolute valuators. For relative valuators, U,UT =ctdonly  {XkbSA_SetValRelative = is permitted. Part of the input extension description of a device _n(U*UT = l^is the range of legal values for all absolute valuators, whence the maximum and minimum legal 4U(UTD =lo%values shown in  4Table 16.17 =. vH$` 4 tRThe following two masks are provided as a convenience to select either portion of UD` i v1_what 4 or  v2_what 4: oU&UT$} = #define XkbSA_ValOpMask(0x70) b|U$UTD} =n ##define XkbSA_ValScaleMask(0x07) hig*Pz b}{ wtgb 2?e t v UTUT` =le type[*].name l*Q{ bz| lulal 2@U0UT UTUT` =XkbKTLevelNamesMask _S_?*R| b{} t =_?U. 2@UT UTUT  = a first_lvl, ossURUT@ =l num_lvls ePN*S} b|~ TPNSA 2@late UTUT` =Pa Xkb->map ng*T~ b} *UTgan 2@al lu UTUT` =e type[*].lvl_names[*] al*U b~ ovale 2A. v UTUT` =ThXkbKeyAliasesMask _?*V b ier_? 2A v1ha UTUT` =at num_aliases UTPN*W b 0bPN# 2AbSAal UTUT` =hi Xkb->names g*X b g v 2A UTUT` = key_aliases[*] l*Y b lUT 2B` UTUT` =asXkbRGNamesMask _?*Z b _?UT 2B UTUT` =ssnum_rg PN*[ b S bPN 2B UTUT` =e Xkb->names `g*\ b bg 2Ban UTUT` =UTradio_groups[*] tyl*] b U bl 2C UTUT` =XkbKeyNamesMask Th_?*^ b V b_? 2C UTUT  =ha first_key, `URUT@ =UT num_keys PN*_ b PNSA 2CUT UTUT` =es Xkb->names gg*` b g 2CUT UTUT` =sekeys[*] l*a b lUT 2DUT UTUT` =XkXkbVirtualModNamesMask _?_?*b b ?_? 2DUT UTUT` =changed_vmods PN*c b PN 2D UTUT` = Xkb->names g*d b gan 2D UTUT` =[* vmods[*] l$*e b l$C 2E UTUT UTUT` =eyXkbIndicatorNamesMask $_?*f b ?$_? 2EUT UTUT` =y,changed_indicators =UTP$N*g b P$N 2ESA2 UTUT` =UT Xkb->names Xk$g*h b $g 2E2 UTUT` =UTindicators[*] l6*i b l6 2FD UTUT` =XkbGroupNamesMask 6_?*j b b6_? 2F UTUT` =UTchanged_groups chP6N*k b P6N 2F2 UTUT` =UT Xkb->names Xk6g*l b 6g 2Fan2 UTUT` =UT groups[*] d*m a CHH*n b kndHH})) )$ UTbv1_ndx 4 and  v2_ndx 4 specify valuators that actually exists. For example, most mice have  4Ztwo valuators (x and y axes) so the only legal values for a mouse would be 0 and 1. For a "D 4Idial box with eight dials, any value in the range 0..7 would be correct. ;l 37Obtaining Key Actions for Keys from the Serverj UTO$ XkbTo update the actions (the  key_acts  array) for a subset of the keys in a keyboard descrip\D ,tion,  )use   XkbGetKeyActions . *kpUTUTl =ZStatus - tXkbGetKeyActions =( dpy =,  first =,  num =,  xkb =) }URUTd =6Display * dpy =;/* connection to X server */ UPUTd =UTEunsigned int first =;/* keycode of first key of interest */ UNUTd =9unsigned int num =;/* number of keys desired */ ULUTd =XXkbDescPtr  xkb =;/* pointer to keyboard description where result is stored */ 2_$ lueXkbGetKeyActions 4 sends a request to the server to obtain the actions for  num 4 keys on the e 4al^keyboard starting with key  first 4. It waits for a reply and returns the actions in the  e server 4-> key_acts 4 field of  xkb 4. If successful,  XkbGetKeyActions 4 returns  {Success 4. The  xkb 4 e D 4 Aparameter must be a pointer to a valid Xkb keyboard description. $ 4rIf the  server 4 map in the  xkb 4 parameter has not been allocated,  XkbGetKeyActions 4 allocates D 4 1and initializes it before obtaining the actions. a$ 4/[If the server does not have a compatible version of Xkb, or the Xkb extension has not been fi" 4t kproperly initialized,  XkbGetKeyActions 4 returns  {BadAccess 4. If  num 4 is less than 1 or Des/ 4;jgreater than  {XkbMaxKeyCount 4,  XkbGetKeyActions 4 returns  {BadValue 4. If any allocation <D 4thBerrors occur,  XkbGetKeyActions 4 returns  {BadAlloc 4. Ul 3oa6Changing the Number of Actions Bound to a Keyk id ctPTo change the number of actions bound to a key, use  XkbResizeKeyAction . .~UJUTl =Y =XkbAction *. tXkbResizeKeyActions =( xkb =,  key =,  needed =) eUHUTd =teAXkbDescRec * xkb =;/* keyboard description to change */ eUFUTd =p 3int  key =;/* keycode of key to change */  UDUTd = 4 -server 4 if it is necessary to reallocate the  acts  4array. i$ 4 iIf  needed 4 is greater than the current number of keysyms for the key,  XkbResizeKeyActions 4 i#D 4 e>initializes all new actions in the array to  {NoAction 4. 8$ 4UTUBecause the number of actions needed by a key is normally computed as width * number E 4xk`of groups, and  XkbResizeKeyActions 4 does not modify either the width or number of groups R 4ac_for the key, a discrepancy exists on return from  XkbResizeKeyActions 4 between the space _ 4ed]allocated for the actions and the number required. The unused entries in the list of actions Kl 4rv`returned by  XkbResizeKeyActions 4 are not preserved across future calls to any of the map g y 4haWediting functions, so you must update the key actions (which updates the width and numDd*o as Dryo HH*p b HHrd$current ym$ 4io^ber of groups for the key) before calling another allocator function. A call to  XkbChangeD BeTypesOfKey 4 updates these. *$ 4maVIf any allocation errors occur while resizing the number of actions bound to the key, 7D mo.XkbResizeKeyActions 4 returns  {NULL 4. KUTUT$ =foSA change to the number of actions bound to a key should be accompanied by a change e sWURUT =Vin the number of symbols bound to a key. Refer to section 15.3.7 for more information cUPUTD =2on changing the number of symbols bound to a key. {l 3erKey Behaviorl $ 4g XKey behavior refers to the demeanor of a key. For example, the expected behavior of the t ZCapsLock 4 key is that it logically locks when pressed, and then logically unlocks when D 4pressed again. Hd 3d Radio Groups ,\ 4hmKeys that belong to the same radio group have the  {XkbKB_RadioGroup 4 type in the  type 4 to\ 4 tjfield and the radio group index specified in the  data 4 field in the  {XkbBehavior 4 structure. \ 4 raIf the radio group has a name in the  {XkbNamesRec 4 structure, the radio group index is the n\ 4UTfindex into the  radio_group 4 array in the  {XkbNamesRec 4 structure. A radio group key when  \ 4]pressed stays logically down until another key in the radio group is pressed, when the first T\ 4haMkey becomes logically up and the new key becomes logically down. Setting the i$\ {\XkbKB_RGAllowNone 4 bit in the behavior for all of the keys of the radio group means that th1\ 4Ypressing the logically down member of the radio group causes it to logically release, in w>\ 4Kwhich case none of the keys of the radio group would be logically down. If 4K\ {loZXkbKB_RGAllowNone 4 is not set, there is no way to release the logically down member of XD\ 4fi the group. adim$ 4ifgThe low five bits of the  }data 4 field of the  {XkbBehavior 4 structure are the group number, oupzD 4 Cthe high three bits are flags. The only flag currently defined is: UNUTd =to#defineXkbRG_AllowNone0x80 idZ 3ReThe XkbBehavior Structure $ 4hThe  behaviors 4 field of the server map is an array of  {XkbBehavior 4 structures, indexed by T 4ha^keycode, and contains the behavior for each key. The  {XkbBehavior 4 structure is defined D 4wN as follows: tULUT$ =l typedef struct _XkbBehavior { UJUT =Sunsigned char type;/* behavior type + optional  pXkbKB_Permanent = bit */ cal UHUT =unsigned char data; UFUTL =ey} p XkbBehavior =; lo*$ 4jThe  type 4 field specifies the Xkb behavior, and the value of the  data 4 field depends on the 7BL \Ctype 4. Xkb supports the key behaviors shown in Table 16.20. }dd*q artu EupHH*r b ls.HHlydXk:, 4Z\Xkb also provides the mask, r {XkbKB_Permanent 4 to specify whether the key behavior r G 4 Utype should be simulated by Xkb or whether the key behavior describes an unalterable T 4ac`physical, electrical, or software aspect of the keyboard. If the  {XkbKB_Permanent 4 bit is a 4stanot set in the  type 4 field, Xkb simulates the behavior in software. Otherwise, Xkb relies knD 4bi-upon the keyboard to implement the behavior. al 39Obtaining Key Behaviors for Keys from the Servers h$ ld]To obtain the behaviors (the  behaviors  array) for a subset of the keys in a keyboard D . =description from the server, use  XkbGetKeyBehaviors : U(UTl =*q\Status / tXkbGetKeyBehaviors =( dpy =,  first =,  num =,  xkb =) U&UTd =4Display * dpy =;/* connection to server */ U$UTd =@unsigned int first =;/* keycode of first key to get */ rmU"UTd =fyQunsigned int num =;/* number of keys for which behaviors are desired */ rU UTd =ehGXkbDescPtr  xkb =;/* Xkb description to contain the result */ l, $ oiXkbGetKeyBehaviors   4sends a request to the server to obtain the behaviors for  }num 4 keys on i 4 tdthe keyboard starting with the key whose keycode is  }first 4. It waits for a reply and returns he 4wthe behaviors in the  server 4-> behaviors 4 field of  }xkb 4. If successful,  XkbGetKeyBehaviors 4 e +D 4rrreturns  {Success 4. s@$ 4oIf the  server 4 map in the  xkb 4 parameter has not been allocated,  XkbGetKeyBehaviors 4 allo tMD 4s7cates and initializes it before obtaining the actions. b$ 4[If the server does not have a compatible version of Xkb, or the Xkb extension has not been o 4comproperly initialized,  XkbGetKeyBehaviors 4 returns  {BadAccess 4. If  num 4 is less than 1 or i| 4 rhgreater than  {XkbMaxKeyCount 4,  XkbGetKeyBehaviors 4 returns  {BadValue 4. If any allocaD 4yBItion errors occur,  XkbGetKeyBehaviors 4 returns  {BadAlloc 4. d*s ahke FeyhoHH*t b plHHors in t 4l 3 oGExplicit ComponentsAvoiding Automatic Remapping by the Servert D$ 4SuUWhenever a client remaps the keyboard using core protocol requests, Xkb examines the r) 4caYmap to determine likely default values for the components that cannot be specified using r6 4tiZthe core protocol (see section 17.1.2 for more information on how Xkb chooses the default CD 4s values). X$ 4co[This automatic remapping might replace definitions explicitly requested by an application, is e 4Vso the Xkb keyboard description defines an explicit components mask for each key. Any r 4. Xaspects of the automatic remapping listed in the explicit components mask for a key are s D 4 0not changed by the automatic keyboard mapping. $ 4dThe explicit components masks are held in the  explicit 4 field of the server map, which is an  4\array indexed by keycode. Each entry in this array is a mask that is a bitwise inclusive OR SeBL 4(of the values shown in Table 16.21. kl 3 p;Obtaining Explicit Components for Keys from the Server to$ defTo obtain the explicit components (the  explicit  array) for a subset of the keys in a keyboard D 2 6description, use  XkbGetKeyExplicitComponents . U0UTl =vaeStatus 0 tXkbGetKeyExplicitComponents =( dpy =,  first =,  num =,  xkb =) yU.UTd =s 4Display * dpy =;/* connection to server */ deU,UTd =coBunsigned int first =;/* keycode of first key to fetch */ *U*UTd =ngPunsigned int num =;/* number of keys for which to get explicit info */ ch7U(UTd =atIXkbDescPtr  xkb =;/* Xkb description in which to put results */ J$ kbGetKeyExplicitComponents 4 sends a request to the server to obtain the explicit compoycoW 4thmnents for  num 4 keys on the keyboard starting with key  first 4. It waits for a reply and returns d 4uthe explicit components in the  server 4-> explicit 4 array of  }xkb 4. If successful,  XkbGetKeyExeq ciiplicitComponents 4 returns  {Success 4. The  xkb 4 parameter must be a pointer to a valid Xkb l~D 4. keyboard description. d*u a  GumHH*v b ilaHHcoU,UTun$ 4jIf the  server 4 map in the  xkb 4 parameter has not been allocated,  XkbGetKeyExplicitCompoD ciEnents 4 allocates and initializes it before obtaining the actions. c*$ 4o [If the server does not have a compatible version of Xkb, or the Xkb extension has not been ser7 4expproperly initialized,  XkbGetKeyExplicitComponents 4 returns  {BadMatch 4. If  num 4 is less than ItD 4 ah1 or greater than  {XkbMaxKeyCount 4,  XkbGetKeyExplicitComponents 4 returns  {BadValue 4. QD 4ce^If any allocation errors occur,  XkbGetKeyExplicitComponents 4 returns  {BadAlloc 4. jl 3te!Virtual Modifier Mapping~ l~$ 4. \The  vmods 4 member of the server map is a fixed-length array containing  {XkbNumVir {\tualMods 4 entries. Each entry corresponds to a virtual modifier and provides the binding  4fof the virtual modifier to the real modifier bits. Each entry in the  vmods 4 array is a bitwise D 4Co+inclusive OR of the legal modifier masks: and {ef ShiftMask d { LockMask d {r ControlMask a d { o Mod1Mask hd {s Mod2Mask rd {ex Mod3Mask id {bG Mod4Mask id {tu Mod5Mask M0$ 4umfThe  vmodmap 4 member of the server map is similar to the  modmap 4 array of the client map = 4tu^(see section 15.4), but is used to define the virtual modifier mapping for each key. Like the J re[modmap 4 member, it is indexed by keycode, and each entry is a mask representing the vir$WD 4s/tual modifiers bound to the corresponding key: raykUTUT$ =bNdEach of the bits in a  vmodmap = entry represents an index into the  vmods = member. That rowURUT =lis, bit 0 of a  vmodmap = entry refers to index 0 of the  vmods = array, bit 1 refers to index 1, iUPUTD = and so on. +inUNUT$ =lecIf a bit is set in the  vmodmap = entry for a key, that key is bound to the corresponding virdULUTD =a *tual modifier in the  vmods = array. , 3 rj 4The  vmodmap 4 and  vmods 4 members of the server map are the master virtual modifier  4vmZdefinitions. Xkb automatically propagates any changes to these fields to all other fields D 4tu%that use virtual modifier mappings. fd*w ae L HremoHH*x b a eHH@<pr]] m$ 4esUThe overall relationship of fields dealing with virtual modifiers in an Xkb keyboard s"L 4 t*description are shown in Figure 16.2.  @Dl 0 ' Virtual Modifier Relationships x 0@Dl! 3 =<Obtaining Virtual Modifier Bindings from the Server so@D$" dTo obtain a subset of the virtual modifier bindings (the  vmods  array) in a keyboard descripng@DD" %tion, use  XkbGetVirtualMods : sUTl# =NStatus 1 tXkbGetVirtualMods =( dpy =,  which =,  xkb =) 핖UTd$ =te4Display * dpy =;/* connection to server */ XUTd% =roUunsigned int which =;/* mask indicating virtual modifier bindings to get */ vUTd& =ppMXkbDescPtr xkb =;/* Xkb description where results will be placed */ @<$' hXkbGetVirtualMods 4 sends a request to the server to obtain the  vmods 4 entries for the virtual m(@<' 4emodifiers specified in the mask,  which 4, and waits for a reply. See section 7.1 for a descrip5@<' 4rietion of how to determine the virtual modifier mask. For each bit set in  which 4,  XkbGetVirDB@<' `tualMods 4 updates the corresponding virtual modifier definition in the  server->vmods 4 etO@<' 4dijarray of  }xkb 4. The  xkb 4 parameter must be a pointer to a valid Xkb keyboard description. If \@<D' 4?successful,  XkbGetVirtualMods 4 returns  {Success 4. ,q@<$( 4 xnIf the  server 4 map has not been allocated in the  xkb 4 parameter,  XkbGetVirtualMods 4 allo~@<D( 4 =Icates and initializes it before obtaining the virtual modifier bindings. &d*y arti Ilad HH*z b  HHM svmods 4th$) 4'[If the server does not have a compatible version of Xkb, or the Xkb extension has not been for) 4cproperly initialized,  XkbGetVirtualMods 4 returns  {BadMatch 4. Any errors in allocation  "D) 4=cause  XkbGetVirtualMods  4to return  {BadAlloc 4. d;d* 3n  vmodmap 4 array of  }xkb 4. If successful,  * theXkbGetKeyVirtualModMap 4 returns  {Success 4. The  xkb 4 parameter must be a pointer to a eD * 4uavalid Xkb keyboard description =r$ , 4kbnIf the  server 4 map in the  xkb 4 parameter has not been allocated,  XkbGetKeyVirtualModMap 4  D , 4coNallocates and initializes it before obtaining the virtual modifier mappings. "$ y 4y [If the server does not have a compatible version of Xkb, or the Xkb extension has not been ma/ y 4odmproperly initialized,  XkbGetKeyVirtualModMap 4 returns  {BadMatch 4. If  num 4 is less than 1 < y 4yVhor greater than  {XkbMaxKeyCount 4,  XkbGetKeyVirtualModMap 4 returns  {BadValue 4. If any inID y 4 kRallocation errors occur,  XkbGetKeyVirtualModMap 4 returns  {BadAlloc 4. o2e *{ bi mo2e vebOvdmUTUT`f 1}(0x7f) If @eoɚV *| bVtu@eoɚV  {bO 4ThUTUT`g 1me*All AccessX features notifications wanted  *} b  4 p d 4 p m-*~ biua-Nalca ` s Value #-* b #- heoesot UTUT`  v(1<<0) Xk;-* b;-  id,  UTUT`  dM(1<<1) turT-* b anT- yVterha UTUT` nt(1<<2) Xkm-* bu 4m- Ralca UTUT` (1<<3) Key-* b -  bi UTUT` (1<<4) b-* b e-  bV UTUT` (1<<5) b-#* bsfe-# an UTUT` (1<<6) -#* b -#  UTUT` (1<<7) v- * b v-  V* UTUT`" 1 65 - * b T-  W UTUT`# 1207 HH3 b :TUTHHl ? ; ; HH3 b <rhaHHl @ = = jTg2@ * n.-jTg2@ 6 * b  f b6  g [ UTUT` i(1L<<1) 2 * b f b2  g [ UTUT` =V(Notification of geometry changes wanted l * b fl  g [UT UTUT` XkbNKN_DeviceIDMask *6 * b f6 UT g [(1 UTUT` (1L<<2) *2 * b f2 UT g [1 65 UTUT` =1Notification of device  1ID = changes wanted lw * b h0lw 3 i [: UTUT` pXkbNKN_AllChangesMask w6 * b hw6 r i [H UTUT` (0x7) 2w * b h*2w  i [g@ UTUT` = Includes all of the above masks l4 * b Tl4   h ^Real Modifier Masks  DH* b ofi DH   ` 7*Mask l4 [l NKNev UTUT`h 1 Vl4 VlUT UTUT < 1*SendEventUsesXKBSta*URUT@< 1te 2j6#* b Tj6#  o 1D UTUT`@ = (1L <<1) #* b##UT UTUT A =ll"Clients can assign key actions to URUTA =&buttons on non- pKeyClass = input UPUT@A =extension devices. l#* bl# UT UTUT`B = aXkbXI_IndicatorNamesMask \#* b\#  UTUT`D = leds->names r j6#* bj6# D' UTUT`E = (1L <<2) a#* b[##KN UTUT F =h#Clients can assign names to indicaURUTF =)tors on non- pKeyClass = input extenTUPUT@F =Evsion devices. l#* bl# T UTUT`G =XkbXI_IndicatorMapsMask \#* b\#  UTUT`H =UT leds->maps "Clj6#* bAj6#  p =in UTUT`I =A (1L <<3) sH* a bH  UU$ UTwThe one exception to this rule is the  XkbExtensionDeviceNotify  event report  Tthat  is sent when a client UUD 檪Zattempts to use an unsupported feature of an X Input Extension device (see section 21.4). @l$X2@ * n-<<<@l$X2@ ##* b##KNF UTUT K =as%Clients can assign indicator maps to FURUTK = )indicators on non- pKeyClass = input FUPUT@K =. extension devices. *l%#* bTl%# UT=Xk UTUT`L =asXkbXI_IndicatorStateMask %\#* b%\# UT=UTle UTUT`M = leds->state *j%6#* b pj%6# UT=A(1 UTUT`O = (1L <<4) %#* b%##UTTh UTUT Q = t"Clients can request the status of URUTQ = r)indicators on non- pKeyClass = input UPUT@Q =extension devices. nslI#* bve lI# @l2@  UTUT`R =XkbXI_IndicatorsMask I\#* bI\## UTUT S =Ksz_leds ntURUTS =at num_leds FUPUT@S = leds->* rsjI6#* bKjI6# s.% UTUT`T =(0x1c) I#* bkUTI##I_StaMa UTUT U =XkbXI_IndicatorNamesMask | URUTU =XkbXI_IndicatorMapsMask | UPUT@U =atXkbXI_IndicatorStateMask lm * bUTlm UT'=(1 UTUT`V =XkbXI_UnsupportedFeaturesMask k.e@:* n-hUTk.e@:"Cl l/Z4 * - Q l/Z4 1n-UPUTexUU$2 TAugment names to bUU2 Te supply component UU2 Tnames required by $UU2 TMawant and need but not .UUD2 Tsupplied in request m\ * bKszm\ S'_le F UTUT`W = unsupported jm6 * bKjm6 'UT UTUT`x =(0 (1L <<15) m * bTm 'MaUT UTUT`y =Xk _l{* bXkl{ | (UT UTUT`z =diXkbXI_AllDeviceFeaturesMask {\* b{\(1(V UTUT { =orThose selected by URUT@{ =*Value column masks UTj{6* b j{6  l(4  UTUT`| =(0x1e) UP{* b2{(2e UTUT } = XkbXI_IndicatorsMask | s URUT@} =XkbSI_ButtonActionsMask d l* beesl ) UTUT`~ =XkbXI_AllFeaturesMask \* b\ b)K UTUT  =Those selected by URUT@ =xValue column masks mj6* bj6 ') UTUT UTUT` =(0x1f) * b)z UTUT  =icXkbSI_AllDeviceFeaturesMask | URUT@ =XkbSI_KeyboardsMask l* brThl UT*=*Va UTUT` =UTXkbXI_AllDetailsMask \* b l\UT*=(0 UTUT  =Those selected by URUT@ =Value column masks j6* bUtoj6 *XkI_ UTUT` =d (0x801f) * b*UT UTUT  =lFXkbXI_AllFeaturesMask | URUT@ =XkbXI_UnsupportedFeaturesMask d* ahe  hxHH* b *HH])UT 4Wthe one just built. The calls corresponding to each of the mask bits are summarized in UTBL 4I_TTable 20.4, together with the  {XkbDescRec 4 components that are filled in.B A$ 4gThere is no way to determine which components specified in  }want 4 (but not in  }need 4) were \N 4[actually fetched, other than breaking the call into successive calls to  XkbGetKeyboardby [D 1ByName 4 and specifying individual components. bp$ 2cXkbGetKeyboardByName 4 always sets  min_key_code 4 and  max_key_code 4 in the returned }D {XkbDescRec 4 structure. $ [XkbGetKeyboardByName 4 is synchronous; it sends the request to the server to build a new  4 ackeyboard description and waits for the reply. If successful, the return value is non- {NULL 4. H _XkbGetKeyboardByName 4 generates a  {BadMatch 4 protocol error if errors are encountered ThD 4in(when building the keyboard description. in$ 4XIf you simply want to obtain information about the current keyboard device, rather than  4[generating a new keyboard description from elements in the server database, use  ,XkbGetd D , Keyboard 4 (see section 6.2). heU.UTl 1e WXkbDescPtr  \ tXkbGetKeyboard 1( dpy 1,  which 1,  device_spec 1) spe U,UTd = c6Display * dpy =;/* connection to X server */ U*UTd =mYunsigned int which =;/* mask of components of  wXkbDescRec = of interest */ c$U(UTd =UTd =np 32  1LEDs U<UTd 1n A  =bell ia 1l 4nsAn indicator feedback has: wedFU:UTd 1y U =p to 32  1LEDs X$% 4 b\If the input extension is present and the server allows interaction between the input exten =e% 4kbZsion and Xkb, then the core keyboard, the core keyboard indicators, and the core keyboard r% 4 dZbells may each be addressed using an appropriate device spec, class, and ID. The constant  % {ba]XkbXIDfltID 4 may be used as the device ID to specify the core keyboard indicators for % 4 aYthe core indicator feedback. The particular device ID corresponding to the core keyboard d* a ed jdbk HH* b ftiHH]*++l 4vird+% 4]feedback and the core indicator feedback may be obtained by calling  XkbGetDeviceInfo 4 <% 4A `and specifying  {XkbUseCoreKbd 4 as the  }device_spec 4; the values will be returned in o "D% )dflt_kbd_id 4 and  dflt_led_id 4. s7$X 4 aaIf the server does not allow Xkb access to input extension  {KeyClass 4 devices, attempts to aDX 4arbuse Xkb requests with those devices fail with a  Bad {Keyboard 4 error. Attempts to access QX 4, lnon- {KeyClass 4 input extension devices via  XkbGetDeviceInfo 4 and  XkbSetDeviceInfo 4 fail th^DX 4diKsilently if Xkb access to those devices is not supported by the X server. dewd 3inXkbDeviceInfoRec a$ 4XInformation about X Input Extension devices is transferred between a client program and bD 4tithis device has its own state */ UJUT = aKunsigned shortsupported;/* bits indicating supported capabilities */ XUHUT =esOunsigned shortunsupported;/* bits indicating unsupported capabilities */ ss UFUT =, Iunsigned shortnum_btns;/* number of entries in  btn_acts = */ UDUT =ce/XkbAction *btn_acts;/* button actions */ Xk!UBUT =deQunsigned shortsz_leds;/* total number of entries in  1LEDs = vector */ a.U@UT =Runsigned shortnum_leds;/* number of valid entries in  1LEDs = vector */ ;U>UT =aunsigned shortdflt_kbd_fb;/* input extension  1ID = of default (core kbd) indicator */ eHU<UT =UT_unsigned shortdflt_led_fb;/* input extension  1ID = of default indicator feedback */ ameUU:UT =ce6XkbDeviceLedInfoPtr leds;/* LED descriptions */ bU8UTL = i3}  XkbDeviceInfoRec =, *XkbDeviceInfoPtr; te;vU6UT$ =>ttypedef struct { oU4UT =UT=unsigned shortled_class;/* class for this LED device*/ sU2UT =ie@unsigned shortled_id;/*  1ID = for this LED device */ itU0UT =poWunsigned intphys_indicators;/* bits for which  1LEDs = physically present */ ntrU.UT =s[unsigned intmaps_present;/* bits for which  1LEDs = have maps in  maps = */ U,UT =orWunsigned intnames_present;/* bits for which  1LEDs = are in  names = */ RuU*UT =m_Gunsigned intstate;/* 1 bit => corresponding  1LED = is on */ U(UT =orAAtomnames[XkbNumIndicators];/* names for  1LEDs = */ dU&UT =U<GXkbIndicatorMapRecmaps;/* indicator maps for each  1LED = */ IDU$UTL =ic9}  XkbDeviceLedInfoRec =, *XkbDeviceLedInfoPtr; P$a =D jThe  type = field is a registered symbolic name for a class of devices (for example, TABLET). If a  a =ctqdevice is a keyboard (that is, is a member of  {KeyClass =), it has its own state, and  has_own_state = ga =;is  {True =. If  has_own_state = is  {False =, the state of the core keyboard is used. 4 The  supported 4 and %a tr[unsupported 4 fields are masks where each bit indicates a capability. The meaning of the in2a 4\mask bits is listed in Table 21.1, together with the fields in the  {XkbDeviceInfoRec 4 ?a 4U*]structure that are associated with the capability represented by each bit. The same bits are (La 4A[used to indicate the specific information desired in many of the functions described subseicaYDa 4/quently in this section. d* a kXkevHH* b tyHH{st class o & eBl & 4 $ 4s The  name 4,  type 4,  has_own_state 4,  supported 4, and  unsupported 4 fields are always filled in when a u 4ow`valid reply is returned from the server involving an  {XkbDeviceInfoRec 4. All of the other d D 4trDfields are modified only if the particular function asks for them. tyll 3heG Querying Xkb Features for Non-KeyClass Input Extension Devices h t$ 4 {XTo determine whether the X server allows Xkb access to particular capabilities of input il 4 e[devices other than the core X keyboard, or to determine the status of indicator maps, indiesi 4 f_cator names or button actions on a non- {KeyClass 4 extension device, use  XkbGetDevice*D  Info 4. U UTln =evjXkbDeviceInfoPtr F tXkbGetDeviceInfo =( dpy =,  which, device_spec, ind_class, ind_id =) #UUTdo =6Display * dpy =;/* connection to X server */ 0UUTdp =peJunsigned int which =;/* mask indicating information to return */ =UUTdq =edVunsigned int device_spec =;/* device  1ID =, or  wXkbUseCoreKbd = */ JUUTdr =cNunsigned int ind_class =;/* feedback class for indicator requests */ WUUTds =asTunsigned int ind_id ; =/* feedback  1ID = for indicator requests */ Ej$y bXkbGetDeviceInfo 4 returns information about the input device specified by  device_spec 4. wy 4hUnlike the  }device_spec 4 parameter of most Xkb functions,  }device_spec 4 does not need to be did* atn  las 4HH* b HH ,, =evjXk ,y 4(Za keyboard device. It must, however, indicate either the core keyboard or a valid X Input Dy 4coExtension device. */ *$z 4pegThe  which  4parameter   4is a mask specifying optional information to be returned. It is an d i7z 4cRinclusive OR of one or more of the values from Table 21.1 and causes the returned DDz {as\XkbDeviceInfoRec 4 to contain values for the corresponding fields specified in the table. d_Y$Y 4edeThe  {XkbDeviceInfoRec 4 returned by  XkbGetDeviceInfo 4 always has values for  name 4 ifY 4 d(may be a null string, ),  type 4,  supported 4,  unsupported 4,  has_own_state 4,  dflt_kbd_fd 4, and sDY nKdflt_kbd_fb 4. Other fields are filled in as specified by  }which 4. l$Z 4cUpon return, the  -supported 4 field will be set to the inclusive OR of zero or more bits from Z 4,YTable 21.1; each bit set indicates an optional Xkb extension device feature supported by dDZ 4t Lthe server implementation, and a client may modify the associated behavior. h $ 4 gIf the  {XkbButtonActionsMask 4 bit is set in  }which 4, the  {XkbDeviceInfoRec 4 returned R oD 4heQwill have the button actions ( -btn_acts 4 field) filled in for all buttons. R$ 4vaaIf  }which 4 includes one of the bits in  XkbXI_IndicatorsMask 4, the feedback class of I 4d bthe indicators must be specified in  ind_class 4, and the feedback ID of the indicators must  4tySbe specified in  ind_id 4. If the request does not include any of the bits in d  eXkbXI_IndicatorsMask 4, the  ind_class 4 and  ind_id 4 parameters are ignored. The class Z D 4 tZand ID can be obtained via the input device extension  XListInputDevices 4 request. "$5 4TagIf any of the  {XkbXI_IndicatorsMask 4 bits are set in  }which 4, the  {XkbDeviceInfoRec 4 4t /5 4megreturned will have filled in the portions of the  leds 4 structure corresponding to the indicator ion<5 4etufeedback identified by  }ind_class 4 and  }ind_id 4. The  leds 4 vector of the  {XkbDeviceInfoRec 4 _I5 4llxis allocated if necessary and  sz_leds 4 and  num_leds 4 filled in. The  led_class 4,  led_id 4 and heV5 Ivphys_indicators 4 fields of the  leds 4 entry corresponding to  }ind_class 4 and  }ind_id 4 are always c5 4tyefilled in. If  }which 4 contains  {XkbXI_IndicatorNamesMask 4, the  names_present 4 and p5 to~names 4 fields of the  leds 4 structure corresponding to  }ind_class 4 and  }ind_id 4 are returned. {  4If }5 } dkwhich 4 contains  {XkbXI_IndicatorStateMask , 4 the corresponding  state 4 field is updated. ask5 4inpIf  }which 4 contains  {XkbXI_IndicatorMapsMask 4, the  maps_present 4 and  maps 4 fields are tD5 4ru updated. s$^ 4icWXkb provides convenience functions to request subsets of the information available via . T^ ctYXkbGetDeviceInfo 4. These convenience functions mirror some of the mask bits. The func^ 4ions all take an  {XkbDeviceInfoPtr 4 as an input argument and operate on the X Input s_i^ 4dsdExtension device specified by the  device_spec 4 field of the structure. Only the parts of the ^ 4n.Zstructure indicated in the function description are updated. The  {XkbDeviceInfo 4Rec ^ 4tobstructure used in the function call can be obtained by calling  XkbGetDeviceInfo 4 or can be D^ 4{Dallocated by calling  XkbAllocDeviceInfo 4 (see section 21.3). atdC 4 c6These convenience functions are described as follows. $,J }b 4To query the button actions associated with an X Input Extension device, use  XkbGetDe1DJ viceButtonActions. EUTUTlP =XkoStatus G tXkbGetDeviceButtonActions =( dpy, device_info, all_buttons, first_button, num_buttons =) GetRURUTd\ =es6Display * dpy =;/* connection to X server */ _UPUTd =OXkbDeviceInfoPtr device_info =;/* structure to update with results */ ratlUNUTd =_iRBool all_buttons =;/*  {True = => get information for all buttons */ yULUTd =lydunsigned int first_button =;/* number of first button for which info  1is  =desired */ TUJUTd =foVunsigned int num_buttons =;/* number of buttons for which info is desired */ d* a m cliHH* b 23)HH c--tions ar f-$ }\XkbGetDeviceButtonActions 4 queries the server for the desired button information for the Ge 4Jkdevice indicated by the  device_spec 4 field of  }device_info 4 and waits for a reply. If successe_i" 4ficful,   XkbGetDeviceButtonActions 4 backfills the button actions ( }btn_acts 4 field of ver/ }zdevice_info 4) for only the requested buttons, updates the  name 4,  type 4,  supported 4, and  unsup<D {0ported 4 fields, and returns  {Success 4. ULQ$ unkall_buttons 4,  first_button 4 and  num_buttons 4 specify the device buttons for which actions ^ 4lshould be returned. Setting  all_buttons 4 to  {True 4 requests actions for all device buttons; if k tall_buttons 4 is  {False 4,  first_button 4 and  num_buttons 4 specify a range of buttons for which -xD 4actions are requested. $] 4Bu[If a compatible version of Xkb is not available in the server or the Xkb extension has not ] 4atfbeen properly initialized,  XkbGetDeviceButtonActions 4 returns  {BadAccess 4. If allocation ] 4 Merrors occur, a  {BadAlloc 4 status is returned. If the specified device ] 4o( }device_info 4-> device_spec 4) is invalid, a  BadKeyboard 4 status is returned. If the device ppo] 4unshas no buttons, a  Bad {Match 4 status is returned. If  first_button 4 and  num_buttons 4 specify fD] 4d =illegal buttons, a  Bad {Value 4 status is returned. s, 4XTo query the indicator names, maps, and state associated with an LED feedback of an aD 4 i5input extension device, use  XkbGetDeviceLedInfo. UTUTl =on_Status H tXkbGetDeviceLedInfo =( dpy, device_i nfo, led_class, led_id, which =) arURUTd =6Display * dpy =;/* connection to X server */ UPUTd =erOXkbDeviceInfoPtr device_info =;/* structure to update with results */ ed,+UNUTd =utWunsigned int led_class =;/* LED feedback class assigned by input extension */ r, 8ULUTd = sYunsigned int led_id =;/* LED feedback  1ID = assigned by input extension */ EUJUTd =s Hunsigned int which =;/* mask indicating desired information */ X$b no\XkbGetDeviceLedInfo 4 queries the server for the desired LED information for the feedback nseb 4`specified by  }led_class 4 and  }led_id 4 for the X input extension device indicated by rb ildevice_spec 4-> }device_info 4 and waits for a reply. If successful,  XkbGetDeviceLedInfo 4 backdeb 4etmfills the relevant fields of  }device_info 4 as determined by  }which 4 with the results and returns sb {)KSuccess 4. Valid values for  }which 4 are the inclusive OR of any of */ b {erCXkbXI_IndicatorNamesMask 4,  {XkbXI_IndicatorMapsMask 4, and reDb {UTXkbXI_IndicatorStateMask 4. $ 4 LhThe fields of  }device_info 4 that are filled in when this request succeeds are  -name, type, sup*  -Dwported 4, and  unsupported 4, and portions of the  leds 4 structure corresponding to  }led_class 4 and ati }oled_id 4 as indicated by the bits set in  }which 4. The  device_info->leds 4 vector is allocated if  4d necessary and  sz_leds 4 and  num_leds 4 filled in. The  led_class 4,  led_id 4 and  phys_indicators 4 d 4 wwfields of the  }device_info 4-> leds 4 entry corresponding to  }led_class 4 and  }led_id 4 are always }dD 4de filled in. }$ 4 roIf  }which 4 contains  {XkbXI_IndicatorNamesMask 4, the  names_present 4 and  names 4 fields of 4byof the  }device_info 4-> leds 4 structure corresponding to  }led_class 4 and  }led_id 4 are updated, if + }kwhich 4 contains  {XkbXI_IndicatorStateMask , 4 the corresponding  state 4 field is updated, * 8 4Dpand if  }which 4 contains  {XkbXI_IndicatorMapsMask 4, the  maps_present 4 and  maps 4 fields 4ED 4 are updated. dZ$f 4by[If a compatible version of Xkb is not available in the server or the Xkb extension has not gf 4ssgbeen properly initialized,  XkbGetDeviceLedInfo 4 returns  {BadAccess 4. If allocation errors s_itf 4coccur, a BadAlloc status is returned. If the device has no indicators, a  BadMatch 4 error is s f 4 4vreturned. If  ledClass 4 or  ledID 4 have illegal values, a  Bad {Value 4 error is returned. If they d* a  nHH* b e HH[di((and  } u(f 4Zhave legal values but do not specify a feedback that contains LEDs and is associated with Df 4d,Athe specified device, a  Bad {Match 4 error is returned. n.l 3,M Allocating, Initializing, and Freeing the XkbDeviceInfoRec Structure pB$ 4dTo obtain an  {XkbDeviceInfoRec 4 structure, use  XkbGetDeviceInfo 4 or  XkbAllocDeviceOD ss Info 4. cUTUTl = YXkbDeviceInfoPtr I tXkbAllocDeviceInfo =( device_spec, n_buttons, sz_leds =) fpURUTd =Al^unsigned int device_spec =;/* device  1ID = with which structure will be used */ }UPUTd =rnVunsigned int n_buttons =;/* number of button actions to allocate space for*/ UNUTd = tTunsigned int sz_leds =;/* number of LED feedbacks to allocate space for */ $ *aXkbAllocDeviceInfo 4 allocates space for an  {XkbDeviceInfoRec 4 structure and initializes  4fcthat structures  device_spec 4 field with the device ID specified by  device_spec 4. If  }spln_buttons 4 is nonzero,  }n_buttons 4  {XkbActions 4 are linked into the  {XkbDeviceInfoRec 4 ,  4bDnstructure and initialized to zero. If  sz_leds 4 is nonzero,  }sz_leds 4  {XkbDeviceLedInfoRec 4  4 ]structures are also allocated and linked into the  {XkbDeviceInfoRec 4 structure. If you  4]request  {XkbDeviceLedInfoRec 4 structures be allocated using this request, you must inisD 4e tialize them explicitly. td 4/ WTo obtain an  {XkbDeviceLedInfoRec 4 structure, use  XkbAllocDeviceLedInfo 4. locULUTl =UNCStatus J tXkbAllocDeviceLedInfo =( devi, num_needed =) edb"UJUTd =pa_XkbDeviceInfoPtr device_info =;/* structure in which to allocate  1LED = space */ Rec/UHUTd = iKint }num_needed =;/* number of indicators to allocate space for */ witB$ ec^XkbAllocDeviceLedInfo 4 allocates space for an  {XkbDeviceLedInfoRec 4 and places it in O }nsldevice_info 4. If  num_needed 4 is nonzero,  }num_needed 4  {XkbIndicatorMapRec 4 structures f \ 4 n]are also allocated and linked into the  {XkbDeviceLedInfoRec 4 structure. If you request li { iWXkbIndicatorMapRec 4 structures be allocated using this request, you must initialize DevvD 4st;them explicitly. All other fields are initialized to zero. d 4izYTo initialize an  {XkbDeviceLedInfoRec 4 structure, use  XkbAddDeviceLedInfo 4. eUFUTl =De\XkbDeviceLedInfoPtr K tXkbAddDeviceLedInfo =( device_info, led_class, led_id =) umUDUTd =UJYXkbDeviceInfoPtr device_info =;/* structure in which to add  1LED = info */ UBUTd =*/Yunsigned int }led_class =;/* input extension class for LED device of interest */ cU@UTd =[unsigned int }led_id =;/* input extension  1ID = for LED device of interest */ d p$ kXkbAddDeviceLedInfo 4 first checks to see whether an entry matching  }led_class 4 and  }led_id 4  s 4balready exists in the  }device_info->leds 4 array. If it finds a matching entry, it returns a  4\pointer to that entry. Otherwise, it checks to be sure there is at least one empty entry in ze } ]device_info 4-> leds 4 and extends it if there is not enough room. It then increments i }Derdevice_info 4-> num_leds 4 and fills in the next available entry in  }device_info 4-> leds 4 with D } ="led_class 4 and  }led_id 4. 0$j 4`If successful,  XkbAddDeviceLedInfo 4 returns a pointer to the  {XkbDeviceLedInfoRec 4 =j 4*/dstructure that was initialized. If unable to allocate sufficient storage, or if  }device_info 4 Jj 4 iopoints to an invalid  {XkbDeviceInfoRec 4 structure, or if  }led_class 4 or  }led_id 4 are inapproeviWDj 4t :priate,  XkbAddDeviceLedInfo 4 returns  {NULL 4. d* alad o_io-HH* b r iHH,,t entry. c,$l 4at^To allocate additional space for button actions in an  {XkbDeviceInfoRec 4 structure, use Dl ug"XkbResizeDeviceButtonActions 4. )UTUTl =cePStatus L tXkbResizeDeviceButtonActions =( device_info, new_total =) fo6URUTd = w\XkbDeviceInfoPtr device_info =;/* structure in which to allocate button actions */ l,CUPUTdm =edRunsigned int }new_total =;/* new total number of button actions needed */ V$n as\XkbResizeDeviceButton 4 reallocates space, if necessary, to make sure there is room for a cn 4o jtotal of  }new_total 4 button actions in the  }device_info 4 structure. Any new entries allocated pn 4prpare zeroed. If successful,  XkbResizeDeviceButton 4 returns  Success 4. If  new_total 4 is zero, }n 4o-Zall button actions are deleted,  }device_info 4-> num_btns 4 is set to zero, and n }device_info 4-> btn_acts 4 is set to  {NULL 4. If  device_info 4 is invalid or  new_total 4 is greater than n 4ug`255,  BadValue 4 is returned. If a memory allocation failure occurs, a  {BadAlloc 4 is onDn 4nf returned. =d 4NTo free an  {XkbDeviceInfoRec 4 structure, use  XkbFreeDeviceInfo 4. UNUTl =l,Ivoid M tXkbFreeDeviceInfo =( device_info, which, free_all =) ULUTd =neiXkbDeviceInfoPtr device_info =;/* pointer to  pXkbDeviceInfoRec = in which to free items */ UJUTd =Vunsigned int which =;/* mask of components of  device_info = to free */ UHUTd =enVBool free_all =;/*  {True = => free everything, including device_info */ $ 4SwIf  free_all 4 is  {True 4, the  XkbFreeDeviceInfo 4 frees all components of  }device_info 4 and the n { tsXkbDeviceInfoRec 4 structure pointed to by  }device_info 4 itself. If  free_all 4 is  {False 4, the in" 4otevalue of  which 4 determines which subcomponents are freed.  which  4is an inclusive OR of / 4 Eone or more of the values from Table 21.1. If  which 4 contains < {XXkbXI_ButtonActionsMask 4, all button actions associated with  }device_info 4 are I 4cefreed,  }device_info 4-> btn_acts 4 is set to  {NULL 4, and  }device_info 4-> num_btns 4 is set to zero. If V n awhich 4 contains all bits in  XkbXI_IndicatorsMask ,  4all  {XkbDeviceLedInfoRec 4 fc 4=xstructures associated with  }device_info 4 are freed,  }device_info 4-> leds 4 is set to  {NULL 4, and p }Ifvdevice_info 4-> sz_leds 4 and  }device_info 4-> num_leds 4 are set to zero. If  which 4 contains } t\XkbXI_IndicatorMapsMask ,  4all indicator maps associated with  }device_info 4 are i 4heUcleared, but the number of LEDs and the leds structures themselves are preserved. If e s ]which 4 contains  XkbXI_IndicatorNamesMask ,  4all indicator names associated with c 4Wdevice_info are cleared, but the number of LEDs and the leds structures themselves are ice 4dpreserved. If  which 4 contains  XkbXI_IndicatorStateMask ,  4the indicator state assoin 4nsdciated with the  }device_info 4 leds are set to zeros but the number of LEDs and the leds struc D 4De tures themselves are preserved. l 3ssGSetting Xkb Features for Non-KeyClass Input Extension Devices   4$ 4LLZThe Xkb extension allows clients to assign any key action to either core pointer or input  4reYextension device buttons. This makes it possible to control the keyboard or generate keyD 4apCboard key events from extension devices or from the core pointer. are'$ 4ofWKey actions assigned to core X pointer buttons or input extension device buttons cause 4 4D 4_IOkey events to be generated as if they had originated from the core X keyboard. 4I$o 4clTXkb implementations are required to support key actions for the buttons of the core Vo 4f Zpointer device, but support for actions on extension devices is optional. Implementations co 4ciJthat do not support button actions for extension devices must not set the po {ru^XkbXI_ButtonActionsMask 4 bit in the  supported 4 field of an  {XkbDeviceInfoRec 4 }Do 4-K structure. Exd* aLTh een tHH* b t oHH--uttons. po-$p 4oaYIf a client attempts to modify valid characteristics of a device using an implementation hp 4re]that does not support modification of those characteristics, no protocol error is generated. b" p 4aInstead, the server reports a failure for the request; it also sends an ! {XkbExtensionDevi/p {cl_ceNotify 4 event to the client that issued the request if the client has selected to receive <Dp 4dethese events. foQ$ 4si]To change characteristics of an X Input Extension device in the server, first modify a local s^ 4icccopy of the device structure and then use either  XkbSetDeviceInfo ,, 4 or, to save network eldk 4ceRtraffic, use an  {XkbDeviceChangesRec 4 structure (see section 21.6) and call xD ?XkbChangeDeviceInfo 4 to download the changes to the server. t$ 4\To modify some or all of the characteristics of an X Input Extension device, use  XkbSetenD fyDeviceInfo 4. tiUTUTl =KBool N tXkbSetDeviceInfo =( dpy =,  which, device_info =) of URUTd =ic6Display * dpy =;/* connection to X server */ UPUTd =veNunsigned int which =;/* mask indicating characteristics to modify */ UNUTdq =cl^XkbDeviceInfoPtr device_info =;/* structure defining the device and modifications */ $r p_XkbSetDeviceInfo 4 sends a request to the server to modify the characteristics of the device evir 4figspecified in the  }device_info 4 structure. The particular characteristics modified are identified ceIr 4o lby the bits set in  }which 4 and take their values from the relevant fields in  }device_info 4 (see ar 4gTable 21.1).  XkbSetDeviceInfo 4 returns  {True 4 if the request was successfully sent to the fy r 4 cVserver. If the X server implementation does not allow interaction between the X input )Dr 4UTVextension and the Xkb Extension, the function does nothing and returns  {False 4. >$ 4aThe  which 4 parameter specifies which aspects of the device should be changed and is a bitK 4 mGmask composed of an inclusive OR or one or more of the following bits: ceIX {_i?XkbXI_ButtonActionsMask 4,  {XkbXI_IndicatorNamesMask 4, e {Xk^XkbXI_IndicatorMapsMask 4. If the features requested to be manipulated in  }which 4 are r 4fiYvalid for the device, but the server does not support assignment of one or more of them, rD 44that particular portion of the request is ignored. t$s 4rokIf the device specified in  }device_info 4-> device_spec 4 does not contain buttons and a request 4 s 44]affecting buttons is made, or the device does not contain indicators and a request affecting mDs 4no?indicators is made, a  {BadMatch 4 protocol error results. ens$ 4 ngIf the  {XkbXI_ButtonActionsMask 4 bit is set in the  supported  4mask returned by  XkbGetete asZDeviceInfo 4, the Xkb extension allows applications to assign key actions to buttons on  4onDinput extension devices other than the core keyboard device. If the Ac {X^XkbXI_ButtonActionsMask 4 is set in  which 4, the actions for all buttons specified in  mtdevice_info 4 are set to the  {XkbAction 4s specified in  }device_info 4-> btn_acts 4. If the number o 4heaof buttons requested to be updated is not valid for the device,  XkbSetDeviceInfo 4 returns oD {ec9False 4 and a  {BadValue 4 protocol error results. c&$ 4 a_If the  {XkbXI_IndicatorMaps 4 and / or  {XkbXI_IndicatorNamesMask 4 bit is set in the ato3 ffbsupported  4mask returned by  XkbGetDeviceInfo 4, the Xkb extension allows applications to @ 4IfVassign maps and / or names to the indicators of nonkeyboard extension devices. If supM 4Xported, maps and / or names can be assigned to all extension device indicators, whether onZD 4Hthey are part of a keyboard feedback or part of an indicator feedback. ico$ 4]If the  {XkbXI_IndicatorMapsMask 4 and / or  {XkbXI_IndicatorNamesMask 4 flag is set s| 4lin  which 4, the indicator maps and / or names for all  }device_info 4-> num_leds 4 indicator   4 ogdevices specified in  }device_info 4-> leds 4 are set to the maps and / or names specified in o `mDP@* * - d `mDP@* 'toheUU$3 T4Build keyboard XI_UU3 T description from eUU3 Texpressions in 4$UUD3 T names l5 Z3* - lat l5 Z31 nor namestoUU$D Tn Build keyboard MUUD Tpodescription for client caUUD Tllby extracting strucca$UUD Ttures specified in want p.UUDD Tfe and need kX_@* * - kX_@* '_I / or  toUU$E T sReplace device_spec inUUE Te active keyboard /UUE T description with newly m_l$UUDE T built description jTg2@ * a->jTg2@ @l$X2@ * a-mD@l$X2@ k.e@:* a-ok.e@:MLz\>tX ]* n- U3MLz\>tX ]MLze&)MLze&) TKeyboard DescriptionfrMLzgN> ]* n- MLzgN> ]MLzp6MLzp6 Tfor device_spec`>'h ]* n- `>'h ]`>t`>t TKeyboard`>. ]* n- `>. ]`>`> T Component`>y$? ]* n- UU`>y$? ]`>.`>. TDatabaseUUY;< ]* n- Y;< ]YY T New KeyboardY.f ]* n- Y.f ]YMYM T Descriptionc6=9'h ]* n- UEc6=9'h ]c6=!Hc6=!H TKeyboardEc6=I.f ]* n -  *c6=I.f ]c6=1c6=1 T Description$c6=ZM. ]* n - l$c6=ZM. ]c6=Bc6=B T returned to c6=9.f!1* a  -+]c6=9.f!1 Y;< * a  -(KeY;< `>.!1* a  -&'`>.!1MLz\>tX * a -)*hMLz\>tX -H=[5 ]* n - t-H=[5 ]-- TInitial Request: -0 ]* n- Co-0 ]-}?-}? T device_spec -b5 ]* n- aba-b5 ]-J-J Tnames -0m ]* n- Ne-0m ]-- Twant-Pޠ ]* n- M-Pޠ ]-- Tneed*-ʒ5 ]* n- =!H-ʒ5 ]-˲G-˲G Tload-H=[5A* a-$%]6=-H=[5Ak-e@:* n- k-e@:ZM l-Z4 * - 6= l-Z4 ' a9.f;UU$F TAugment names to ;UUF Tsupply required com UUF T>ponent names not supt$UUDF T aplied in request k-e@:* a-< nk-e@:mk ]* n- aRemk ]H`sms Tload Ð`7#5o* n- ?Ð`7#5o-bÐoHM`7#ioHM Ð`7#5o* a-naÐ`7#5oT2$Ot* l-]T2$OtTwapu2$TaVA MM* l-PޠVA MMVA q.A SA PQ=>* n--ʒSA PQ=>-GSA q/!H0<* n-=-0<k-0PY="* n -M lY="* O[YSqp23NO* n!-qp23NON!qp^1g$*! n "-UUg$reqreg?gѡ߶D?NM*" n!#-UUѡ߶D?NMn rue[߶ѡж?*# n"$-@ж?]жXжE`FEG*$ n#%-%E`FEG`7#E`FEG*% a$&-7#E`FEG$[p68@8(P(*& n%'- '[p68@8(P([p68@8(P(*' a&(-[p68@8(P( &VkDpD(P(*( n')- aVkDpD(P(HєXaa*) n(*- *HєXaaA HєXaa** a)+--ʒHєXaa )_" 7;23*+ n*,-  n_" 7;23-hO@+, n+--YhO@ n hO@haqb+- n,.-qpqb n!qbqbP +. n-/- ! n" #uB-+/ n.0-߶B-" n#B-T?@R+0 n/1-@R# n$@R@"`n+1 n0n-`n$ n%`n`>+lٕ +2 b6  alٕ  bEG$h 3cXkbComponentNameRec  mF lags  mB its 6ٕٙ +3 b 6ٕٙ pD b* nd a GLٕ +4 b n*GLٕ  bA єd * aٕ + 5 b " ٕ , b nd - hlJٙ+ 6 b27 YhlJٙh baqb   + Component @ Type ٙs1+ 7 b68 +ٙs1 b ` Component Hints ` (flags) ߶GL?+ 8 b79 RGL?1 b` nMeaning R-L+ 9 b8: -L b`n` ٕValue l/Jٙ +: b9; l/Jٙ  bh UTUT` =NaAll Components gs ٙ/s1 +; b:< bٙ/s1  b pD UTUTh pXkbLC_Hidden GL/? +< b;= n*GL/?  bA є UTUT` 1*Do not present to user + /-L += b<> ,/-L  b- h UTUT` 1(1L<<0) 7l<Jٙ +> b=? bl<Jٙ  bpont UTUT` = yٙ<s1 +? b>@ ٙ<s1  b UTUTh pXkbLC_Default GL<? +@ b?A ?GL<?  bRL UTUT` 11Default member of class <-L +A b@B  b<-L  b UTUT` 1n(1L<<1) lJJٙ +B bAC b;lJJٙ  b  UTUT` =UT TٙJs1 +C bBD 1ٙJs1  bٙ UTUTh pbXkbLC_Partial GLJ? +D bCE GLJ?  bGL UTUT` 1bPartial component J-L +E bDF J-L > b, UTUT` 1(1L<<2) lXJٙ +F bEG lXJٙ ? bb UTUT` =Keymap ٙXs1 +G bFH 1ٙXs1  bٙ UTUT` =bnone GLX? +H bGI  LGLX?  b b UTUT` = X-L +I bHJ eulX-L  b  UTUT` = lfJٙ +J bIK UTlfJٙ <1 bJٙ UTUT` =C Keycodes bٙfs1 +K bJL UTٙfs1 ٙ b  UTUT` =none GLf? + L bKM TUTGLf? C_ bGL UTUT` = b Ef-L +!M bLN bf-L  btiaco UTUT` =L ltJٙ +"N bMO ltJٙ , b UTUT` =Types ٙts1 +#O bNP ٙٙts1 b bUT UTUT` =none GLt? +$P bOQ GLt?  b UTUT UTUT` =  t-L +%Q bPR Lt-L b bUT UTUT` =  lJٙ +&R bQS lJٙ b bUT UTUT` = Compatibility ٙs1 +'S bRT ٙs1 ٙ b UTUT` =ٙnone 1GL? +(T bSU s1GL?  bUT UTUT` =L -L +)U bTV -L  b UTUT UTUT` = lJٙ+*V bUW lJٙ  b UTUT UTUT` =Symbols ٙs1++W bVX ٙs1  b UTUTh pXkbLC_AlphanumericKeys GL?+,X bWY TGL?no bt? UTUT( pQ, =Bindings primarily for alphanumeric URUT@ =keyboard section -L+-Y bXZ -L  b UTUT UTUT` =(1L<<8) lJٙ +.Z bY[ alJٙ UT b UTUT` =y  ٙs1 +/[ bZ\ ٙٙs1 b bUT UTUTh pnoXkbLC_ModifierKeys +(GL? +0\ b[] GL? UT b=L UTUTh =)Bindings primarily for modifier keys -L +1] b\^  -L +* b UTUT` =ٙ(1L<<9) lJٙ+2^ b]_ llJٙ ++ b UTUT` =s1 ٙs1+3_ b^` ٙs1 ys b? UTUTh pYXkbLC_KeypadKeys GL?+4` b_a GL? p bforlp UTUT  =UT&Bindings primarily for numeric keypad URUT@ = bkeys -L+5a b`b UT-L  b  UTUT` =+. (1L<<10) lJٙ +6b bac lJٙ y bs1 UTUT` =\ ٙs1 +7c bbd ٙs1 no bLC_di UTUTh pXkbLC_FunctionKeys GL? +8d bce LGL?  bdin p UTUT` =ie%Bindings primarily for function keys ^-L +9e bdf b-L  b<<9 UTUT` = (1L<<11) _lJٙ +:f beg blJٙ  bٙ UTUT` = b `ٙs1 +;g bfh bٙs1  bXkC_ UTUTh pXkbLC_AlternateGroup GL? +<h bgi orGL? UT bs pma UTUTh =ey$Bindings for an alternate group -L +=i bhj -L  b UTUT UTUT` =[ (1L<<12) lJٙ +>j bik lJٙ  b UTUT UTUT` =ٙ Geometry ٙs1 +?k bjl 1ٙs1 di b UTUT` =ncnone sGL? +@l bkm GL?  bin UTUT` = e-L +Am bl -L f bb UTUT` = ܱgoNNg g+Bn n1-1 _ܱgoNNg g+:o+qo+q<ܱg<l7c+Co b p l7c g bh `g 7ٙError 7M+Dp bo 7Mro ? `h 7iCause lUc +Eq b r pmalUc  s f a UTUThi =lBadKeyboard UM +Fr bqy UM UT `[ UTUT`j =DThe device specified was not a valid core or input extension device HH3s b >HHl  ? ? diHH3t b @sLHHl x A A  HH3u b V TeHHl U U  H I K3v b V X TgH I Kl W W H'˚ K3w b [ TH'˚ Kl \ \ HH3x b BHHl t, e e rolcc +My brz lcc  b p UTUThk =mBadImplementation cM +Nz by{ cM y  UTUT`m =Invalid reply from server lqc +O{ bz| aallqc si   UTUTht =3 nBadAlloc qM +P| b{} qM di  UTUT`u =Unable to allocate storage lc+Q} b|~ lc  b e UTUThv = oBadMatch M+R~ b}  KM H I UTUT w =KA compatible version of Xkb was not available in the server or an argument URUT@w =K5has correct type and range, but is otherwise invalid HH3 b fHHl  g g cHH3 b hHHl  i i Imp UH +S b { UH  y UTUT` =UT ShiftMask  cH +T b  cH a  q UTUT` = LockMask T qH +U b  qH    UTUT` = ControlMask UT H +V b e H +Q   UTUT` = Mod1Mask b H +W b aat H   }  UTUT`, = Mod2Mask  H +X b  mp H wa  ilae UTUT`- =n Mod3Mask  H +Y b rge H al H UTUT`. = Mod4Mask  H +Z b  H   UTUT`/ = Mod5Mask HH3 b j HHl  k k  HH, b THH  ` 4  HH3 b rHHl  s s H, e sUTH+VHH +[ b H Mo  h b(XkbDescRec Component References  +\ b a  +X d 4 %l+] b  Mo%l  b ` XkbDescRec Field lD%H+^ b a D%H+Z  ` For more info 6l +_ b 6l  b  UTUT` =ctrls D6H +` b D6H   T UTUT` = Chapter 10 Dl +a b Dl   UTUT`0 =server HDDH +b b  DDH  , e UTUT`{ =UT Chapter 16 Rl +c b +[Rl   UTUT` =map DRH +d b e RDRH  +\ b UTUT` = Chapter 15 `l +e b  `l +]  UTUT` = indicators D`H +f b cieD`H   UTUT` = Chapter 8 nl +g b omonl   b UTUT` =names DnH +h b DnH   b UTUT` = Chapter 18 |l +i b hte|l   b UTUT` =compat D|H +j b seD|H   b UTUT` = Chapter 17 l +k b htel   b UTUT` =geom DH +l b DH   b UTUT` = Chapter 13 H I K, b hteH I K  UTUTl =UTi November 10, 1997 Library Version 41.05 1/ =Document Revision 1 61.17 = 1 H6, f  H6+g bH66(2NPF[`b+m nn-UT(2NPF[`bnas ¡S2(2(anaAm)9ޠ ]+n n- Am)9ޠ ]AmAm TTruefCYޠ ]+o n- htefCYޠ ]fLAfLA TTrueUTy` 1 ]+p n- y` 1 ]yhyh TFalse, 1 ]+q n- Ch, 1 ],)|,)| TFalse- ]+r n- - ]X6t6t Tload "5o+s n- "5o 2E"a2EBG "5o+t a- "5oY3 ]+u n-( Y3 ]YY T (Temporary)NoVkDpD(P(+v a-VkDpD(P( c6=j ]+w n-+ c6=j ]c6=R_c6=R_ T_" 7;23+x a-F`b_" 7;23 kIa9+y a-(kIa9.cjo ]+z n- cjo ]cR_cR_ TClientpSE+{ r-htepSEfApS`0dRE0+| r- RE0 ]yR_VKpE0+} r-KpE01]Kp`Op=@E0+~ r-=@E0-=@`@A@DE0+ r-nDE0 D`*HQRR+ n-QRR-Qq. ?0hh+ n-(?0hh?0A1434i + b+v434i B2DpDP(hH ]fXkbDescRec  mC omponents  mR eturned for  mV alues of  mW ant &  mN eeds i + bi B2(kUTUTdI 8 Ei + bjEi R_B2entpSUTUTdJ 8+{ r434y+ bpS434y0B3+| r `K 7 Request (want+need) yy~+ bry~pB31] `L 7=Fills in Xkb components Ey+ b=@EyB3 r `M 7DEquivalent Function Call 434 + b434 B4Q UTUT`N =hXkbGBN_TypesMask ~ + b~ B4 b UTUT`O =34 map.types E + b]XkE neB4 tu UTUT`P =al)XkbGetUpdatedMap(dpy, XkbTypesMask, Xkb) 434 + b434 BB5kUT UTUT`Q = XkbGBN_ServerSymbolsMask b~ + b_B~ B5 r34 UTUT`R =+server E + b3+|E  B5 (wt+ UTUT`S =1XkbGetUpdatedMap(dpy, XkbAllClientInfoMask, Xkb) 434 + b=Fi434 B? UTUT`T =XkbGBN_ClientSymbolsMask ~ + bDEq~  B? UTUT`U =map, including map.types E + bhXkE B?+ UTUT`V =1XkbGetUpdatedMap(dpy, XkbAllServerInfoMask, Xkb) T434 + b+434 XkBP UTUT`W = XkbGBN_IndicatorMaps l~ + b34~  bBP UTUT`X = indicators 5E + bSboE BP b UTUT`Y =/XkbGetIndicatorMap(dpy, XkbAllIndicators, Xkb) `R434 + b434 B  UTUT`Z =UTXkbGBN_CompatMapMask t~ + b34~  bB= UTUT`[ =compat BE + bitSE B+ b UTUT`\ =Eq,XkbGetCompatMap(dpy, XkbAllCompatMask, Xkb) UT434 + b434 BhXk UTUT`] =XkbGBN_GeometryMask UT~ + bASe~ 34B  UTUT`^ =geom E + bTUTE ndBs l UTUT`_ =+XkbGetGeometry(dpy, Xkb) 434+ bT434 5B UTUT`` =XkbGBN_KeyNamesMask ~+ bY~pyBndito UTUT a = names.keys +URUT@a =names.key_aliases E+ bTXkEB  UTUT b =(XkbGetNames(dpy,  4XkbKeyNamesMask | URUT@b 4[XkbKeyAliasesMask =, Xkb) 434{+ b434{  bB\ UTUT`c =MaXkbGBN_OtherNamesMask ~{+ b~{{BB  UTUT d =names.keycodes GeoURUTd =names.geometry bUPUTd =Senames.symbols *UNUTd = names.types 5ULUTd =map.types[*].lvl_names[*] @UJUTd = names.compat KUHUTd = names.vmods _VUFUTd =rynames.indicators aUDUTd = b names.groups TlUBUTd =names.radio_groups wU@UT@d =names.phys_symbols E{+ bYE{'pyBndito UTUT e =#XkbGetNames(dpy, XkbAllNamesMask & naURUTe =1~( 4XkbKeyNamesMask | XkbKeyAliasesMask =), #UPUT@e =BXkb) HH3 b XHHl s =,HH3 b HHl  `cl' + b !l'  "Khj Debug Control Masks ' + b !as.'  "Knas.UTUTdk 8 d6' + b !aty6' UJ "KdUTUTdl 8UH T7+ b !dry7UD "Kd b `m 7UBDebug Control Mask es.P7?+ b !.ysP7? "K+ b `n 7Value TP7+ b !eTP7 b "KsMa & ` 7eMeaning 4H + b !UPH  "K UTUT` =Xkb 4DF_DisableLocks PH? + b !,PH? 3 "K UTUT` = (1 << 0) TPH + b !TPH  "K UTUT` =,Disable actions  1that = lock modifiers DeHH3 b  bHHl t UTHH3 b  bHHl  UTHH3 b  bHHl @  HH3 b HHl  HVq + b 8 : PHVq  b ; rhV = oFunction Error Returns  mD ue to Extension Problems Vq + b :Vq  ; r UTUTUTUTdW 8 4 _lf+ b :blf ; r 3 `X 7UTFunctions return type f~+ b :f~ ; r `Y 7 Return value clw + b :lw  ; r b UTUT`Z =pointer to a structure tw~ + b :w~  ; r  UTUT`[ = NULL l + b :l  ; r!l UTUT`\ =@Bool ~ + b :~  ; r! UTUT`] = False l + b : Pl  b ; r" UTUT`_ =Status cti~ + b :rle~  ; r" UTUT`` = BadAccess H'o bx, a  _H'o bxH2XH2X bb'o , a  'o /Ŝ/Ŝ be H'ol, a H'olH'˚ K, b ernH'˚ K UTUTh =UT4The X Keyboard Extension =:Running H/F 2; HH3 b HHl  HH3 b HHl  HH3 b HHl  se HH3 b  PHHl    HH3 b HHl  ``HH3 b aHHl    'oHH3 b oHHl    HH3 b HHl    HH3 b HHl [   unnHH3 b $bHHl Z % %  HH3 b 4bHHl  5 5  HH3 b bHHl   HH3 b bHHl   HH3 b bHHl   HH3 b bHHl   HH3 b bHHl   HH3 b bHHl   HH3 b bHHl   HH3 b bHHl   HH3 b bHHl   HH3 b bHHl   HH3 b 2bHHl   HH3 b HHl     HH3 b bHHl     HH3 b bHHl     HH3 b bHHl      HH3 b bHHl      HH3 b bHHl  P  HH3 b ybHHl  z z  HH3 b {bHHl   | |  HH3 b }bHHl  ~ ~  HH3 b bHHl   HH3 b bHHl #  hfg33 + b9 jbhfg33  kh (Server Database Keyboard Components 3d+ a L HH+ b HH 11  4 bStransformed to achieve an approximately equivalent change to the core keyboard mapHD 43ping maintained by the server. *$ 4XThis chapter discusses how a client may modify the compatibility map so that subsequent 7D 4*transformations have a particular result. Pl 3The XkbCompatMap Structure d$> 4WAll configurable aspects of mapping Xkb state and configuration to and from core protoq> 4[col state and configuration are defined by a compatibility map, contained in an  {XkbCom~> {ZpatMap 4 structure; plus a set of explicit override controls used to prevent particular > 4Rcomponents of type 2 (core-to-Xkb keyboard mapping) transformations from automati> 4^cally occurring. These explicit override controls are maintained in a separate data structure D> 4discussed in section 16.3. $ 4`The  compat 4 member of an Xkb keyboard description ( {XkbDescRec 4) points to the { apD {XkbCompatMap 4 structure: erUTUT$ ="typedef struct _XkbCompatMapRec { URUT =fyEXkbSymInterpretPtrsym_interpret;/* symbol based key semantics*/ fUPUT =arEXkbModsRecgroups[XkbNumKbdGroups];/* group => modifier map */ UNUT =Kunsigned shortnum_si;/* # structures used in  sym_interpret = */ coULUT =Qunsigned shortsize_si;/* # structures allocated in  sym_interpret = */ iUJUTL =om1}  XkbCompatMapRec =, *XkbCompatMapPtr; s/"l 4 o l re*Xkb Compatibility Data Structures ,$ 4reXThe subsections that follow discuss how the compatibility map and explicit override conin9D 4ovXtrols are used in each of the three cases where compatibility transformations are made. d Rl 38Xkb State to Core Protocol State Transformation kef, 4 (jAs shown in Figure 17.3, there are four  fgroup compatibility maps 4 (contained in  groups 4 s 4ct][0..3]) in the  {XkbCompatMapRec 4 structure, one per possible Xkb group. Each group comk 4UP^patibility map is a modifier definition (see section 7.2 for a description of modifier definid+ a#tr MreHH+ b orHHct--m_interpUJ- 4btions). The  mask 4 component of the definition specifies which real modifiers should be set  4trZin the core protocol state field when the corresponding group is active. Because only one " 4veWgroup is active at any one time, only one of the four possible transformations is ever bil/ 4s aapplied at any one point in time. If the device described by the  {XkbDescRec 4 does not sup<D 4hoFport four groups, the extra groups fields are present, but undefined. Q$ 4roaNormally, the Xkb-aware server reports keyboard state in the  state 4 member of events such b^D 4 cOas a  {KeyPress 4 event and  {ButtonPress 4 event, encoded as follows: 2 fs$ 4f bitsmeaning  4150 a 4tr13-14Group index  48-12Pointer Buttons D 40-7Modifiers $ 4RFor Xkb-unaware clients, only core protocol keyboard information may be reported.  4e XBecause core protocol does not define the group index, the group index is mapped to modpr 4 wdifier bits as specified by the  groups 4roup index] field of the compatibility map (the bits ne 4 tVset in the compatibility map are ORed into bits 0-7 of the state), and bits 13-14 are D 4 dreported in the event as zero. cRel 3ECore Keyboard Mapping to Xkb Keyboard Mapping Transformation s$ 4. VWhen a core protocol keyboard mapping request is received by the server, the servers ( 4 eXcore keyboard map is updated, and then the Xkb map maintained by the server is updated. t,5 4s:XBecause a client may have explicitly configured some of the Xkb keyboard mapping in the 13B 4Wserver, this automatic regeneration of the Xkb keyboard mapping from the core protocol $O 4arSkeyboard mapping should not modify any components of the Xkb keyboard mapping that 4e \  4todwere explicitly set by a client. The client must set explicit override controls to prevent this tsiD 4heOfrom happening (see section 16.3). The core-to-Xkb mapping is done as follows: ~$ 4hePMap the symbols from the keys in the core keyboard map to groups and symbols on  4rtSkeys in the Xkb keyboard map. The core keyboard mapping is of fixed width, so each ybo 4orSkey in the core mapping has the same number of symbols associated with it. The Xkb cei 4 tSmapping allows a different number of symbols to be associated with each key; those mai 4veVsymbols may be divided into a different number of groups (1-4) for each key. For each  4oaWkey, this process therefore involves partitioning the fixed number of symbols from the key 4 tTcore mapping into a set of variable-length groups with a variable number of symbols ne 4boYin each group. For example, if the core protocol map is of width five, the partition for s 4erSone key might result in one group with two symbols and another with three symbols. 3). 4apTA different key might result in two groups with two symbols plus a third group with c 4o Uone symbol. The core protocol map requires at least two symbols in each of the first y D 4f two groups. o ", 4UFor each changed key, determine the number of groups represented in the new core e/D 4Skeyboard map. This results in a tentative group count for each key in the Xkb map. ; tD$ 4LFor each changed key, determine the number of symbols in each of the groups acQ 4Ufound in step 1a. There is one explicit override control associated with each of the ^ 4eyHfour possible groups for each Xkb key,  {ExplicitKeyType1 4 through thk { oUExplicitKeyType4 4. If no explicit override control is set for a group, the number ix  4heWof symbols used for that group from the core map is two. If the explicit override and 4e Ocontrol is set for a group on the key, the number of symbols used for that Xkb twd+ a Nco pHH+ b nacHH++. o "+ 4, Jgroup from the core map is the width of the Xkb group with one exception:  4. Tbecause of the core protocol requirement for at least two symbols in each of groups " 4ngNone and two, the number of symbols used for groups one and two is the maximum /D 4p $of 2 or the width of the Xkb group. trD$ 4 eRFor each changed key, assign the symbols in the core map to the appropriate group Q 4ugTon the key. If the total number of symbols required by the Xkb map for a particular f^ 4mbOkey needs more symbols than the core protocol map contains, the additional sym. k 4t Zbols are taken to be  {NoSymbol 4 keysyms appended to the end of the core set. If the x 4kbLcore map contains more symbols than are needed by the Xkb map, trailing symco 4Ubols in the core map are discarded. In the absence of an explicit override for group  4Rone or two, symbols are assigned in order by group; the first symbols in the core  4Omap are assigned to group one, in order, followed by group two, and so on. For ls  4Oexample, if the core map contained eight symbols per key, and a particular Xkb two 4Mmap contained 2 symbols for G1 and G2 and three for G3, the symbols would be oD 4, ,assigned as (G is group, L is shift level): opd 4#G1L1 G1L2 G2L1 G2L2 G3L1 G3L2 G3L3 l n$ 4eqSIf an explicit override control is set for group one or two, the symbols are taken tha 4l Qfrom the core set in a somewhat different order. The first four symbols from the N  4s Lcore set are assigned to G1L1, G1L2, G2L1, G2L2, respectively. If group one ta 4haLrequires more symbols, they are taken next, and then any additional symbols co$ 4edHneeded by group two. Group three and four symbols are taken in complete on1 4arPsequence after group two. For example, a key with four groups and three symbols ma>D 4grKin each group would take symbols from the core set in the following order: 4Sd 4coSymbol Interpretations the XkbSymInterpretRec Structure J$ 4maYSymbol interpretations are used to guide the X server when it modifies the Xkb keymap in tW 4ow_step 2. An initial set of symbol interpretations is loaded by the server when it starts. A clin sdD 4syGent may add new ones using  XkbSetCompatMap 4 (see section 17.4). iaty$ 4 iZSymbol interpretations result in key semantics being set. When a symbol interpretation is  4Yapplied, the following components of server key event processing may be modified for the D 4 sparticular key involved: c$ 4Virtual modifier map in 4 Auto repeat y 4ns1Key behavior (may be set to  {XkbKB_Lock 4) eD 4Key action (see section 16.1) strd 4 bLThe  {XkbSymInterpretRec 4 structure specifies a symbol interpretation: apURUT$ =e typedef struct { UPUT =nt7KeySymsym;/* keysym of interest or  {NULL = */ UNUT =olLunsigned charflags;/*  pXkbSI_AutoRepeat, XkbSI_LockingKey   =*/ p ULUT =?unsigned charmatch;/* specifies how mods is interpreted */ by +UJUT = sVunsigned charmods;/* modifier bits, correspond to  1eight  =real modifiers */ 8UHUT =).Lunsigned charvirtual_mod;/* 1 modifier to add to key virtual mod map */ sEUFUT =inCXkbAnyActionact;/* action to bind to symbol position on key */ ts RUDUTL =t 6}  XkbSymInterpretRec =,*XkbSymInterpretPtr; e$ 4nvmIf  -sym 4 is not  {NULL 4, it limits the symbol interpretation to keys on which that particular keysr 4ayssym is selected by the modifiers matching the criteria specified by  mods 4 and  match 4. If  sym 4 Xk 44`is  {NULL 4, the interpretation may be applied to any symbol selected on a key when the modD 4syGifiers match the criteria specified by  mods 4 and  match 4. sig$ * ]match 4 must be one of the values shown in Table 17.1 and specifies how the real modifiers BL 4mo5specified in  mods 4 are to be interpreted. m$ 4iffIn addition to the above bits,  match 4 may contain the  {XkbSI_LevelOneOnly 4 bit, in which z 4o ucase the modifier match criteria specified by  mods 4 and  match 4 applies only if  sym 4 is in level /d+ anrp PtP; HH+ b {HHe )) keys onrt) 4gone of its group; otherwise,  mods 4 and  match 4 are ignored and the symbol matches a condi IfD 4!tion where no modifiers are set. t)UTUTd =maR#define XkbSI_LevelOneOnly(0x80)/* use mods + match only if sym is level 1 */ <$ 4teXIf no matching symbol interpretation is found, the server uses a default interpretation e ID 4shwhere: ble^$ }s sym 4 =0 odk }!flags 4 = {XkbSI_AutoRepeat x }te"match 4 = {XkbSI_AnyOfOrNone  } b mods 4 =0  } $virtual_mod 4 = {XkbNoModifier h D }o act 4 = {SA_NoAction $ 4y \When a matching symbol interpretation is found in step 2a, the interpretation is applied to +D 4nmodify the Xkb map as follows. ; $ 4bThe  act 4 field specifies a single action to be bound to the symbol position; any key event  4\that selects the symbol causes the action to be taken. Valid actions are defined in section olD 4If16.1. $ 4 w_If the Xkb keyboard map for the key does not have its  {ExplicitVModMap 4 control set, the +  {isDXkbSI_LevelOneOnly 4 bit and symbol position are examined. If the i {r ^XkbSI_LevelOneOnly 4 bit is not set in  match 4 or the symbol is in position G1L1, the * vvirtual_mod 4 field is examined. If  virtual_mod 4 is not  {XkbNoModifier 4,  virtual_mod 4 specifies 7 4fa single virtual modifier to be added to the virtual modifier map for the key.  virtual_mod 4 is DD 4Wh-specified as an index in the range [0..15]. Y$ 4prYIf the matching symbol is in position G1L1 of the key, two bits in the flags field potenfD 4ac2tially specify additional behavior modifications: {URUT$ =onN#defineXkbSI_AutoRepeat(1<<0)/* key repeats if sym is in position G1L1 */ UPUTD = aZ#defineXkbSI_LockingKey(1<<1)/* set  pKB_Lock = behavior if sym is in psn G1L1 */ $ 4thYIf the Xkb keyboard map for the key does not have its  {ExplicitAutoRepeat 4 control k 44`set, its auto repeat behavior is set based on the value of the  {XkbSI_AutoRepeat 4 bit. If s  4chathe  {XkbSI_AutoRepeat 4 bit is set, the auto-repeat behavior of the key is turned on; other.D 4dwise, it is turned off. er$ 4mo\If the Xkb keyboard map for the key does not have its  {ExplicitBehavior 4 control set, if 4y.Wits locking behavior is set based on the value of the  {XkbSI_LockingKey 4 bit. If  {preXkbSI_LockingKey 4 is set, the key behavior is set to  {KB_Lock 4; otherwise, it is turned off D 4pe(see section 16.3). orl 3URFXkb Keyboard Mapping to Core Keyboard Mapping Transformations +$ 4L1WWhenever the server processes Xkb requests to change the keyboard mapping, it discards r i8 4L1Zthe affected portion of its core keyboard mapping and regenerates it based on the new Xkb ED 4tr mapping. Z$ 4 iVWhen the Xkb mapping for a key is transformed to a core protocol mapping, the symbols gD 4Dfor the core map are taken in the following order from the Xkb map: r |d 4ed0G1L1 G1L2 G2L1 G2L2 G1L3-n G2L3-n G3L1-n G4L1-n edd+ ayar Q he HH+ b fHH}lo%%sed on t(6e %$ 4itYIf group one is of width one in the Xkb map, G1L2 is taken to be NoSymbol; similarly, if BD 4seHgroup two is of width one in the Xkb map, G2L2 is taken to be NoSymbol. *$ 4KeYIf the Xkb key map for a particular key has fewer groups than the core keyboard, the symt7 4s Xbols for group one are repeated to fill in the missing core components. For example, an ctD 4coSXkb key with a single width-three group would be mapped to a core mapping counting pinQD 4three groups as: mfd 4s -G1L1 G1L2 G1L1 G1L2 G1L3 G1L3 G1L1 G1L2 G1L3 b{$ 4SWhen a core keyboard map entry is generated from an Xkb keyboard map entry, a modi 42 Vfier mapping is generated as well. The modifier mapping contains all of the modifiers  4Zaffected by any of the actions associated with the key combined with all of the real modi 4d \fiers associated with any of the virtual modifiers bound to the key. In addition, if any of G 4 N[the actions associated with the key affect any component of the keyboard group, all of the is  4olamodifiers in the  mask 4 field of all of the group compatibility maps are added to the modiy 4]fier mapping as well. While an  {XkbSA_ISOLock 4 action can theoretically affect any modx 4Xifier, if the Xkb mapping for a key specifies an  {XkbSA_ISOLock 4 action, only the unD 4Nmodifiers or group that are set by default are added to the modifier mapping. l 3=Getting Compatibility Map Components From the Server r$ 4 mZUse  XkbGetCompatMap 4 to fetch any combination of the current compatibility map com 4 oUponents from the server. When another client modifies the compatibility map, you are e*  4 adnotified if you have selected for  {XkbCompatMapNotify 4 events (see section 17.5).  Xkbth7 , ]GetCompatMap 4 is particularly useful when you receive an event of this type, as it allows hD 4alXyou to update your programs version of the compatibility map to match the modified vercoQ 4reZsion now in the server. If your program is dealing with multiple servers and needs to con^ 4reRfigure them all in a similar manner, the updated compatibility map may be used to kD 4SAreconfigure other servers. unUTUT$ =UTo make a complete matching configuration you must also update the explicit override URUTD =Ge components of the server state. FUPUTl = r@Status 3 tXkbGetCompatMap =( display, which, xkb =) biUNUTd =en:Display *  display =;/* connection to server */ ULUTd =otRunsigned int which =;/* mask of compatibility map components to fetch */ UJUTd =d MXkbDescRec *  xkb =;/* keyboard description where results placed */ $ om_XkbGetCompatMap 4 fetches the components of the compatibility map specified in  }which 4  4pdhfrom the server specified by  }display 4 and places them in the  }compat 4 structure of the key n 4Ifiboard description  }xkb 4. Valid values for  }which 4 are an inclusive OR of the values shown in sBL 4 uTable 17.2. tyl$ 4gIf no compatibility map structure is allocated in  }xkb 4 upon entry,  XkbGetCompatMap 4 allofigyD 4lsZcates one. If one already exists, its contents are overwritten with the returned results. d+ aaap Rkb=HH+ b ilaHHto##d =ot #$ cZXkbGetCompatMap 4 fetches compatibility map information for the device specified by the  -tijdevice_spec 4 field of  }xkb 4. Unless you have specifically modified this field, it is the default " 4d jkeyboard device.  XkbGetCompatMap 4 returns  {Success 4 if successful,  {BadAlloc 4 if it is / 4trcunable to obtain necessary storage for either the return values or work space,  {BadMatch 4 if 4 < 4R wthe  }dpy 4 field of the  }xkb 4 argument is non- {NULL 4 and does not match the  }display 4 argument, s aID 4b^and  {BadLength 4 under certain conditions caused by server or Xkb implementation errors. bl 3ts$ Using the Compatibility Map ulv$ 4YXkb provides several functions that make it easier to apply the compatibility map to conb 4la[figure a client-side Xkb keyboard mapping, given a core protocol representation of part or $ 4MaWall of a keyboard mapping. Obtain a core protocol representation of a keyboard mapping  4 4`from an actual server (by using  XGetKeyboardMapping 4, for example), a data file, or some D 4oaother source. $ 4 rUTo update a local Xkb keyboard map to reflect the mapping expressed by a core format nD 4es>mapping by calling the function  XkbUpdateMapFromCore 4. UTUTl =Bool 4 tXkbUpdateMapFromCore =( xkb =,  first_key =,  num_keys =,  map_width =,  core_keysyms =,  changes =) URUTd = @XkbDescPtr  xkb =;/* keyboard description to update */ mpUPUTd =. OKeyCode  first_key =;/* keycode of first key description to update */ YXkUNUTd = fDint  num_keys =;/* number of key descriptions to update */ ULUTd =fi>int  map_width =;/* width of core protocol keymap */ !UJUTd =arGKeySym * core_keysyms =;/* symbols in core protocol keymap */ oto.UHUTd = oLXkbChangesPtr  changes =;/* backfilled with changes made to Xkb */  A$ inWXkbUpdateMapFromCore 4 interprets input argument information representing a keyboard N 4e `map in core format to update the Xkb keyboard description passed in  }xkb 4. Only a portion ma[ 4heSof the Xkb map is updated the portion corresponding to keys with keycodes in the apFh 4bzrange  }first_key 4 through  }first_key 4 +  }num_keys 4 - 1. If  XkbUpdateMapFromCore 4 is being called u  4 }in response to a   {MappingNotify   4event }, first_key 4 and  }num_keys 4 are reported in the  {Mapt {Xk]pingNotify 4 event.  }core_keysyms 4 contains the keysyms corresponding to the keycode L 4in`range being updated, in core keyboard description order.  }map_width 4 is the number of keyre 4sypsyms per key in  }core_keysyms 4. Thus, the first  }map_width 4 entries in  }core_keysyms 4 are for ng 4 uthe key with keycode  }first_key 4, the next  }map_width 4 entries are for key  }first_key 4 + 1, and so D 4inon. fo$ 4 X_In addition to modifying the Xkb keyboard mapping in  }xkb 4,  XkbUpdateMapFromCore 4 map 4pobbackfills the changes structure whose address is passed in  }changes 4 to indicate the modifi 4`cations that were made. You may then use  }changes 4 in subsequent calls such as  XkbSetinD ;Map 4, to propagate the local modifications to a server. nud+! a S4veHH+" b! mcoHHco..`range  i.$ 4n WWhen dealing with core keyboard mappings or descriptions, it is sometimes necessary to co 4usUdetermine the Xkb key types appropriate for the symbols bound to a key in a core key"D 4 kGboard mapping. Use  XkbKeyTypesForCoreSymbols 4 for this purpose:  }6UTUT, =, lint 5 tXkbKeyTypesForCoreSymbols =( map_width =,  core_syms =,  protected, types_inout, CURUTD bUxkb_syms_rtrn =) mapPUPUTd =poMXkbDescPtr xkb =;/* keyboard description in which to place symbols*/ ]UNUTd =iUint map_width =;/* width of core protocol keymap in  xkb_syms_rtrn = */ qjULUTd = IKeySym * core_syms =;/* core protocol format array of KeySyms */ iwUJUTd =nu;unsigned int  protected =;/* explicit key types */ SUHUT$ =[int * types_inout; =/* backfilled with the canonical types bound to groups one and `raUFUTD = itwo for the key */ $UDUT$ = wXKeySym * xkb_syms_rtrn =;/* backfilled with symbols bound to the key in the Xkb UBUTD =e mapping */ ap$ syhXkbKeyTypesForCoreSymbols 4 expands the symbols in  }core_syms 4 and types in  }types_inout 4   4e:\according to the rules specified in section 12 of the core protocol, then chooses canonical e_ 4ec[key types (canonical key types are defined in section 15.2.1) for groups 1 and 2 using the Ptr 4ke\rules specified by the Xkb protocol and places them in  }xkb_syms_rtrn 4, which will be /*D 4tonon- {NULL 4. _sy$ 4ULZA core keymap is a two-dimensional array of keysyms. It has  }map_width 4 columns and  }nu\max_key_code 4 rows.  XkbKeyTypesForCoreSymbols 4 takes a single row from a core key! 4/*Ymap, determines the number of groups associated with it, the type of each group, and the o. 4UD_symbols bound to each group. The return value is the number of groups,  }types_inout 4 has th; 4bthe types for each group, and  }xkb_syms_rtrn 4 has the symbols in Xkb order (that is, groups HD 4nd%are contiguous, regardless of size). ],^ }rdcprotected 4 contains the explicitly protected key types. There is one explicit override conj^ 4anHtrol associated with each of the four possible groups for each Xkb key, hew^ {[ExplicitKeyType1 4 through  {ExplicitKeyType4 }; protected  4is an inclusive OR of l b^ 4^these controls.  }map_width 4 is the width of the core keymap and is not dependent on any ^ 4maiXkb definitions.  }types_inout 4 is an array of four type indices. On input,  }types_inout 4 cons^ 4 a\tains the indices of any types already assigned to the key, in case they are explicitly pro tD^ 4 atected from change. $ 4d `Upon return,  }types_inout 4 contains any automatically selected (that is, canonical) types   4r [plus any protected types. Canonical types are assigned to all four groups if there are  4igcenough symbols to do so. The four entries in  }types_inout 4 correspond to the four groups for tyD 4 the key in question. $ 4^SIf the groups mapping does not change, but the symbols assigned to an Xkb keyboard   4icXcompatibility map do change, the semantics of the key may be modified. To apply the new  4thZcompatibility mapping to an individual key to get its semantics updated, use  XkbApply#D maCompatMapToKey 4. t8U@UTl =anSBool 6 tXkbApplyCompatMapToKey =( xkb =,  key =,  changes =) \taEU>UTd = aE XkbDescPtr xkb; =/* keyboard description to be updated */ tRU<UTd = a1 KeyCode key =;/* key to be updated */ r_U:UTd =noW XkbChangesPtr changes =;/* notes changes to the Xkb keyboard description */ 4r r$ edZXkbApplyCompatMapToKey 4 essentially performs the operation described in section 17.1.2  4ls[to a specific key. This updates the behavior, actions, repeat status, and virtual modifier D 4kebindings of the key. HH3# b thaHHl $ HH3$ b sanHHl #% HH3% b ialHHl $& HH3& b  HHl %'  kHH3' b  aHHl &N pdaHT +( b+eyHT da_U:UTh% bC&Compatibility Map Component Masks T +) b T ppapTeyd& 4er mT +* b T  sey.hid 4vi ld++ b(,rldbi thke ` Mask d?+, b+-d?  ` Value 2d+- b,.2d% ` 3 Affecting lu +. b-/lu H UTUT` pXkbSymInterpMask u? +/ b.0 'u? 3 b UTUT` = a(1<<0) 2u +0 b/12u + UTUT` =Symbol interpretations _U:l +1 b02 p l + UTUT` p XkbGroupCompatMask ? +2 b13m?  b UTUT` =(1<<1) 2 +3 b242  UTUT`w =bi Group maps kel +4 b35l d UTUT` pXkbAllCompatMask ? +5 b46b.? % UTUT` =(0x3) 2 +6 b5 b2   UTUT` =!All compatibility map components afg33 +7 b j fg33  k3UTUTd 8 ak33 +8 b j1k33  kUTUTd 8UT hfgH+9 b: jhfgH kp    7 Component @ 7Type kfg33+: b9; j bfg33 k ` 7 Component Primary Contents k+; b:< jk k` 7biMay also contain hfgH#+< b;= jhfgH#  kUT UTUT` =XkKeymap tMafg33#+= b<> jbfg33## k UTUT  =Complete keyboard description URUT =$Normally assembled using a complete UPUT@ ='component from each of the other types s ak#+> b=? j k#  k3 UTUT` = ahfgH.+? b>@ j1hfgH.  k UTUT` =UT Keycodes fg33.+@ b?A jgfg33. k  UTUT  =onSymbolic name for each key e kURUT@ =#Minimum and maximum legal keycodes 33k.+A b@B j k..nt kk UTUT  = bAliases for some keys URUT =Symbolic names for indicators UPUT =ta%Description of indicators physically *UNUT@ =present hfgH+B bAC jeaphfgH  k<> UTUT` =Types fg33+C bBD jCofg33 pt kUT UTUT` = a Key types k+D bCE jnt k t kk UTUT  = b$Real modifier bindings and symbolic URUT@ =3!names for some virtual modifiers hfg5H#+E bDF jhfg5H#  kUT UTUT` = Compatibility fg533#+F bEG j3fg533#  k UTUT` =e (Rules used to assign actions to keysyms muk5#+G bFH jk5## kk UTUT  =Maps for some indicators URUT =so$Real modifier bindings and symbolic nUPUT@ =s !names for some virtual modifiers fhfgYH.+H bGI jprhfgYH.  kB bC UTUT`" =fgSymbols fgY33.+I bHJ jTyfgY33.# kBD UTUT # =!Symbol mapping for keyboard keys TURUT# =KeModifier mapping UPUT@# =ESymbolic names for groups kY.+J bIK j bkY..gs koli UTUT $ =3(Explicit actions and behaviors for some URUT$ = bkeys UPUT$ =$Real modifier bindings and symbolic UT*UNUT@$ =at!names for some virtual modifiers bhfgH9+K bJL jhfgH9  k(Rus UTUT`% =io Geometry mfg339+L bKM jfg339  k UTUT`( =Layout of the keyboard atok9+M bL jdgsk99UT k=s na UTUT * =al%Aliases for some keys; overrides keybURUT* =prcodes component aliases UPUT* =UT#Symbolic names for some indicators .*UNUT* =%Description of indicators physically 5ULUT@* =UTpresent HH3N b THHl 'O mesHH3O b KHHl NQ HH3P b romHHl  W difHH3Q b $atHHl OR K bHH3R b HHl QS HH3S b HHl RT ardHH3T b dHHl SU =alHH3U b RUTHHl TV #SyHH3V b THHl U HH3W b bHHl PX  HH3X b bHHl WY  HH3Y b bHHl XZ  HH3Z b bHHl Y  HH3[ b bHHl \    HH3\ b bHHl [    Ua]a@D+] bbk^k  N,J0Q+^ i]`al N,J0Q`NvQ+_ j] `NvQ H bUUd TXkbServerMapRec Nt#Q+` ka]^a Nt#Q Nt# Nt# N#Q+a k`b]`b X N#QH N# N# N#Q+b kac]ac N#Q Y N# N#wI~ ]+c mbd]bd wI~ ] T... I+Nc ]+d mce]ce bI+Nc ] T vmods[15]I'` ]+e mdf]df I'` ] Tvmodmap*OQ+f keg]eg *OQ3*O*O aQ+g kfh]fh aQ a a =Q+h kgi]gik =Q NJ0 = =A^&O ]+i mhj]hj `NA^&O ]II vmods[0]`NS^&O ]+j mil]il S^&O ][[ vmods[1]TZ6- #+k p] kTZ6- # NTZ6-`}6-Tc&O ]+l ijm]jm kTc&O ]TlzTlz vmods[2] Nuq/~ ],m iln]l cauq/~ ]uq8]uq8] ...#T>: W0 t`,n nmo]bT>: W0 t`~]T>l`l`: WK: W|% ],o onp] |% ]|u|u TKeyCode٠[[ aG@,p noq]٠[[ aG@٠[Js 3Js 3[ ab[ a>H5Q,q mpr]rv>H5QO)KQ,r mqs]qsvf)KQQ`OvQ,s mr]ruv`OvQi1mh@-,t j] 1mh@-'+A^UU$ Tunsigned short +UUD T (one per key) UU$ TDefines virtual modifiers $UUD Tfor each key. `9S5Q,u mv]svT`9S5Ql i`9H5]@ , v muw]zT`9H5]@ qu`[JK4, w qvx]ca`[JK4uq]`[JK`[NZ`aNZ`/HQ[, x iw]z>`/HQ[]/6,Q, y j] ]/6,Q |uKeUUd T XkbDescRec ]`/;Q, z k{]x{s 3`/;Q[ a>`/;S`/;xa~ ],{ mz|]z| xa~ ]xx T...f 6Q,| k{}]{}, 6Q 6S 6`6Q,} k|~]|~ `6Q-`6S`6`6Q,~ k}]}`6Qungn`6S`6xNvj ], m~]~ U xNvj ]x6+x6+ serverxNv~ ], m] ,xNv~ ]x6+x6+ ...l i55 ], i] zT55 ]5Œ5Œ names R~ ], i] q]R~ ]RuRu ... HQ@$[, a]] HQ@$[x/HQs, a]/HQs*,J0Q@$, a]*,J0Q@$^m*,J0Q$+, a]x*,J0Q$+e WQ, i]]e WQ|e`S6DQ, j] ..e`S6DQ , UUd T6 XkbNamesRec ,e vJQ, k]e vJQ`6e vJ vJe %vJQ, k]ngne %vJQxNve %vJ %vJe 7vJQ, k]x6+e 7vJQUUxe 7vJ 7vJvp~ ], m] ]xvp~ ]vv%vv% T...v'p+Nc ],  m] ]5v'p+Nc ]v0v%v0v% T vmods[15]v9p~ ],! m] Ruv9p~ ]vBv%vBv% T...,d`+Q," k]/d`+Q, ad`+`+e U+Q,# k],e U+Qe U+ U+e Uܶ+Q,$ k]xe Uܶ+Q+e Uܶ+ Uܶ+v΅&O ],% m] v΅&O ]v:v: vmods[0] v΅&O ],& m] v΅&O ]v:v: vmods[1]UUv]&O ],' i] ,v]&O ]v Ev E vmods[2]6vu}~ ],( i] kvu}~ ]vuevue ...e d` WQ@$,) a]d` WQ@$d` WQ$+,* a]^]d` WQ$+LuT ]),+ q]%LuT ])+Nc]LuT ]X AT ]X Ac`zw?Z[߀r,, q][]w?Z[߀r,!VJxw?Jxw?Z[Z[SF ,?,- j] +SF ,?',`UU$ T,# Define real UU Tmodifiers bound +UU T to virtual k$UUD Tx modifier ycZ ,. n]]ycZ  ycZZN _,/ n]wON _N`NW _,0 n]UW _,' iWd`3 #w?Z[߀r,1 a]ms[w?Z[߀r`[JK4,2 a]]`[JK4wLuT ]),3 a]LuT ])RY 6j \Z+u 4l = =  HH3 b j mHHl B  HH3 b j ~HHl   HH3 b j HHl   HH3 b j HHl   HH3 b bHHl   HH3 b bHHl   HH3 b  8HHl   HH3 b HHl   HH3 b  >HHl   HH3 b bHHl   A)V@4 j Y bA)V@l j ??db@4 j Y b??db@l k HH4 bHHl V  HH4 bbHHl   HH4 bbHHl   HH4 bbHHl   HH4 bbHHl   HH4 bbHHl   HH4 bbHHl   HH4  bj HHl   HH4  bj HHl   HH4  bbHHl   HH4  bbHHl   HH4  bbHHl   HH4 bbHHl   HH4 bbHHl   HH4 bbHHl   HH4 bbHHl   HH4 bbHHl   HH4 bbHHl   HH4 bbHHl   HH4 bbHHl   HF ,7 b bHF  (h v) mW ant and  mN eed  mM ask  mB its and  mR equired m N ames  mC omponents F ,8 b F  (UTUTd 8  F ,9 b F  (UTUTd 8  zffV,: b zffV ( ` 7 want or need mask bit ffV,; b ffV ( ` 7Required names Components ffV+33,< b ffV+33 (H ` 7 bvalue zffg ,= b ^zffg  (H UTUT` =XkbGBN_TypesMask ffg ,> b  ffg  (,7 b UTUT` =Types ffg+33 ,? b ffg+33  a ( d UTUT` = (1L<<0)  zffu ,@ b eszffu  ( UTUT` =XkbGBN_CompatMapMask ffu ,A b ffu  ( UTUT` =(Compat ffu+33 ,B b ,:ffu+33  ( UTUT` =(1L<<1) zff ,C b zff  (ff UTUT` =XkbGBN_ClientSymbolsMask ff ,D b 33ff  (ff UTUT` =Types + Symbols + Keycodes `ff+33 ,E b ff+33  (( UTUT` =UT(1L<<2) zff ,F b > bzff ff (  UTUT` = bXkbGBN_ServerSymbolsMask ff ,G b ff  a ( d UTUT` = Types + Symbols + Keycodes ff+33 ,H b ff+33 UT (` UTUT` =Ma(1L<<3) zff ,I b fzff  ( UTUT UTUT` =atXkbGBN_SymbolsMask ff ,J b ff UT (` UTUT` =Symbols ff+33 ,K b ff+33 UT (` UTUT` =bo(1L<<1) ffzff ,L b 3ffzff ( (ffUT UTUT` =TyXkbGBN_IndicatorMapMask ff ,M b ff  (( UTUT` =UTCompat ff+33 ,N b > bff+33 ff (  UTUT` = b(1L<<4) erzff ,O b bzff  (  a UTUT` =UTXkbGBN_KeyNamesMask s ff ,P b ,Hff  (+33 UTUT` = Keycodes Tff+33 ,Q b ,Iff+33  ( UTUT` =UT(1L<<5) UTzff ,R b zff  (ff UTUT` =UTXkbGBN_GeometryMask UTff ,S b ,Kff  (+33 UTUT` = Geometry Tff+33 ,T b ,Lff+33 ff ( UTUT` =ff(1L<<6) UTzff,U b fzff  ( UTUT` =XkbGBN_OtherNamesMask ff,V b ff> (33 UTUT  =Types + Symbols + Keycodes + 1URUT@ =Compat + Geometry ff+33,W b (ff+33  (GBNey UTUT` =(1L<<7) zff ,X b zff UT (` UTUT` =XkbGBN_AllComponentsMask ff ,Y b ff UT ( UTff UTUT` =,R bff+33 ,Z b (ff+33  (XkBN UTUT` =ff(0xff) HH4 bHHl  HH4 bfHHl   UTHH4 bfHHl  HH4 bV bHHl   UTHH4 bs 1HHl  ,WHH4 bHHl s  HH4 b;HHl << nenHH4 b=HHl >> `HH4 b?HHl @@ `HH4 bAbHHl BB  HH4  bCbHHl DD  HH4! bEbHHl FF  HH4" bGbHHl HH  HH4# bIbHHl JJ  HH4$ bKbHHl LL  HH4% bMbHHl NN  HH4& bObHHl PP  HH4' bQbHHl RR  HH4( bSbHHl TT  HH4) bUbHHl SVV  >B %4*  ~GUb>B %l  q xJ"-N4+  ~5TbxJ"-Nl   oKe.g4, ~6boKe.gl   Q4- jbQl  r c?Q4. jbc?Ql  s ?'Q4/ j b?'Ql  t $Q40 jb$Ql  u rDj Q41 jbrDj Ql  v 9V@42 jb9V@l  w  Q43 j  Ql  x <xQ44 j<xQl  y 9Q45 j9Ql  z ?Q46 jj?Ql  { cQ47 jjcQl  | ۿQ48 jjۿQl  } v Q?49 jjv Q?l  ~ w@@4Q4: jjw@@4Ql   x f0nH 4; jjx f0nH l   'H 4< jj'H l   ?@SQ4= j!#)?@SQl ""  1@H 4> j*,j1@H l ++  YD?Q4? j<>;<jYD?Ql ==  B: <Q4@ jIK;OUjB: <Ql JJ  D A4Q4A jZ\;XdjD A4Ql [[  Q%f4B! jfh;jQ%fl gg  T\v _4C" jnp;njT\v _l oo  J@s4D# jsu;jJ@sl tt  P Z?g4E$ j|~;jP Z?gl }}  Om?Q4F% jj# Om?Ql   \Q4G& jj,\Ql   `"Q4H' jj> `"Ql   ?b?4I( jjK?b?l   ?TQ4J) jj\?TQl   B`[ _@4K* jjhB`[ _@l   Q4L+ jpQl   HH4M, bjuHHl x-  HH4N- bj~HHl ,.  HH4O. bjHHl -/  HH4P/ bjHHl .0   HH4Q0 b jHHl /1   HH4R1 b jHHl 02   HH4S2 bjHHl 13  HH4T3 bjHHl 24  HH4U4 bHHl 35  HH4V5 bbHHl 46  HH4W6 bbHHl 57  HH4X7 bbHHl 68 HH4Y8 bbHHl 79  HH4Z9 bbHHl 8:  HH4[: bbHHl 9;  HH4\; b bHHl :<!!  HH4]< b"bHHl ;=##  HH4^= b$bHHl <>%%  HH4_> b&bHHl =?''  HH4`? b(bHHl >@))  HH4a@ b*bHHl ?A++  HH4bA b,bHHl @B--  HH4cB b.bHHl A//  87e-4dC 79~79b87e-l 88  j87e-4eD :<~:<bj87e-l ;;  TB %4fE UW~tubTB %l VV  `NQ4gF jb`NQl  > V@4hG jb > V@l  'V@4iH jb'V@l  n@ b@4jI jbn@ b@l  `=W V@4kJ jb`=W V@l  ZgVkV@4lK jbZgVkV@l  HH4mL b9HHl QN  HH4nM b<HHl O  HH4oN b%WHHl LR88  HH4pO b9jHHl MP::  HH4qP b;jHHl OQ<<  HH4rQ b=jHHl PL>>  HH4sR bAjHHl NBB  HH4tS bjHHl T  HH4uT bjHHl SU  HH4vU bbHHl TV  HH4wV bbHHl UW  HH4xW bbHHl VX  HH4yX bbHHl WY  HH4zY bbHHl XZ  HH4{Z bbHHl Y[  HH4|[ bbHHl Z\  HH4}\ b HHl []   HH4~] b bHHl \^   HH4^ b bHHl ]_  HH4_ bbHHl ^`  HH4` bbHHl _a  HH4a bbHHl `b  HH4b bbHHl ac  HH4c bbHHl bd  HH4d bbHHl ce  HH4e bbHHl df  HH4f bbHHl eg  HH4g bbHHl fh   HH4h b!bHHl gi""  HH4i b#bHHl hj$$  HH4j b%bHHl iw&&  ?Q4k 3134b?Ql 22L ?Q4l 4m1b?Ql 55M A?H-4m ln1bA?H-l 66N ;?Q4n m8189b;?Ql 77O M?Q4o 9;1;<bM?Ql ::P _?Q4p <>1>?b_?Ql ==Q q?Q4q ?A1ABbq?Ql @@R ?Q4r BD1sDOb?Ql CCS d?Q4s Ft1rObd?Ql GGT )?Q4t sI13)?Ql HHU y?l4u KM1my?ll LLV  ?u4v MO1n ?ul NNW HH4w bd8HHl jxee HH4x bf;HHl wygg  HH4y bh>HHl xzii  HH4z bjAHHl y{kk  HH4{ blDHHl z|mm  HH4| bntHHl {}oo  HH4} bpIHHl |~qq  HH4~ brMHHl }ss  HH4 btOHHl ~uu  HH4 bvbHHl ww  HH4 bxbHHl yy  HH4 bbHHl   HH4 bbHHl   HH4 bbHHl   HH4 bbHHl   HH4 bbHHl   HH4 bbHHl   HH4 bbHHl   \?4 b\?  UTUT`= 1Boolean w l/Z4 4 - l/Z4 l XyyHH4 bHHl  HH4 bHHl  HH4 bHHl  HH4 bHHl  HH4 bHHl  HH4 bHHl  HH4 bHHl  HH4 bHHl  `=HH4 bHHl   `mDP@* 4 -b`mDP@* l * l5 Z34 -.b l5 Z3l Y kX_@* 4 -bkX_@* l } l-Z4 4 -b l-Z4 l ~ HH4 b bHHl   H I K4 b bH I Kl  H'˚ K4 b bH'˚ Kl  HH4 bbHHl   HH4 bxHHl   HH4 bHHl   HH4 bHHl   HH4 bHHl   HH4 bHHl   HH4 bbHHl    HH4 b!bHHl  ""  `NvQ4 j^`]b`NvQl __ ` 1mh@-4 jsu]b1mh@-l tt a /6,Q4 jxz]b/6,Ql yy b e`S6DQ4 j]be`S6DQl  c SF ,?4 j]bSF ,?l  d l4 bl  UTUT` 1 Vl4 bVl UTUT  1LookupStateWhenGrabHURUT@ 14bed \?4 \?  H UTUT` 1 bBoolean l 4 l  Q UTUT` 1"Miscellaneous per-client controls Vl 4 1Vl ub UTUT` 1GrabsUseXKBState \? 4 4\? Q UTUT`" 1Boolean d4 jHH4   HH4  S la Xkb-aware Client $b 4YA client application that initializes Xkb extension and is consequently bound to an Xlib $Db 4!that includes the Xkb extension. 9lc Xkb-capable Client kupH$d 4URYA client application that makes no Xkb extension Xlib calls but is bound to an Xlib that UDd 4includes the Xkb extension. jle Xkb-unaware Client y$f 4YA client application that makes no Xkb extension Xlib calls and is bound to an Xlib that Df 4$does not include the Xkb extension. HH4 bKtaHHl R ] dUTLeftd { TRightd |d " Referenced TOCd  IXd LOFad  LOTd 2tit d 4anond 6 d :s b d f h cd ] ^ d tit d b bud / d < Xend Xkd  fd  tked  llisd  d  t ed 4d d d d d ghd d  ncd  d  d d  d d yd {d }d  fd ]d  d! d" d# d$ d% d& d' d( d) d* d+ d, d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d< d=!d>"d?#d@$dA%dB&dC'dD(dE)dF*dG >+dH ,dI -dJ .dK @/dL B0dM1dN2dO3dP4dQ 5dR 6dS7dT8dU9dV:dW;dX<dY=dZ>d[ ?d\   @d]  "Ad^   $Bd_   &Cd`   (Dda   *Edb   ,Fdc   .Gdd   Hde  Idf dg Kdh Ldi  Mdj   Ndk    Odl    Pdm    Qdn   ;Rdo   =Sdp   ?Tdq   AUdr   CVds   EWdt   GXdu   IYdv   KZdw   M[dx   O\dy   Q] dz   S^ d{   U_ d|  !` d} ! "a d~ " ! #b d # " $c d $ # %d d % $ &e d & % 'f d ' & (g d ( ' )h d ) ( * i d * ) + j d + * , k d , + -l d - , .m d . - /n d / . 0o d 0 / 1p d 1 0 2q d 2 1 3r d 3 2 4s d 4 3 5t d 5 4 6!u d 6 5 7#v d 7 6 8%w d 8 7 9dx d 9 8 :fy d : 9 ;hz d ; : <j{ d < ; =l| d = < >n} d > = ?p~ !d ? > @r "d @ ? At #d A @ Bv $d B A Cx %d C B D &d D C E 'd E D F (d F E G )d G F H *d H G I +d I H J ,d J I K r -d K J L .d L K M /d M L N 0d N M O 1d O N P 2d P O Q 3d Q P R 4d R Q S 5d S R T! 6d T S U  7d U T V  8d V U W  9d W V X  :d X W Y ;d Y X Z <d Z Y [ =d [ Z \ >d \ [ ] ?d ] \ $ @d ^ _ f Ad _ ^ ` h Bd ` _ a j Cd a ` b  Dd b a c  Ed c b d  Fd d c f  Gd e o p Hd f d  Id g s u 2 Jd h i Kd i h j Ld j i k Md k j l Nd l k m Od m l n Pd n m o Qd o n e Rd p e q  Sd q p s  Td r z v Ud s q g 4 Vd t u w 4 Wd u g t ! Xd v r |% Yd w t x Zd x w y9 [d y x z; \d z y r=d { NoNumberd | vA _  4 C$$f 4  )H Body. f  ) CellHeading. $$ f D )Z Q )#define. f  )Footnote.   )  TitleBanner1. f  )RequestCellHeading. f$$f 4 )H Body. f f T )  TableTitleT:Table 5. . f T )  TableTitleT:Table 11. . $ f 3HQ ) $2Heading H:.\t FirstBody. CCf  )C U BulletCont Bullet Symbol. 6$f H] ) 45@NumberedIndentH:< >< >< >.\tIndent. f  )H Legalese. f  )  CellBodyCentered. blf  )CellHeadingCntr. HHf @ )Z ~     2 V uzt l S    .f CodeExampleBody. ~6f  )~  Definition. f p )EquationBody. HH6f $c )Zl l ~ f          2l dD V h z      Extract. ZZ6f $c )ExtractContinuation. 66f 4 )H ExtractQualifier. f T )  TableTitleT:Table 8. ). H6f HM )HNumbered2IndentH:< >< >< >.\tIndent. 6$f ] )  6NumberedIndentHead.\tIndent. 66f   )$6Indent. $$f @ )46     2x cVi z   f   . Structure DeclBody. f  ) CellBodyCntr. ~6f ` ) ~  f   2 V z      .b dFunctionArgDescFunctionArgDesc6.  f  ) TableFootnote. $f @ ) 6    2 xV iz    f  . FunctionDeclFunctionArgDecl. f   )dy  CellBody. C6f S )C Step S:.\t. 66f   ) BodyTable. $$ f \ ) H 4Heading FirstBody. CCf ^ 4 )C Ux BulletCont Bullet Symbol. @  )   right footer. f T )  TableTitleT:Table 10. . C6f 1B  )C U BulletB:\t. f P ) TitleAuthor.   )  TitleBanner2. $ f HQ ) $2Heading H:.\tBody. Z6f M )Z NoteNoteTextNote\tBody. @ = )  right footer. f 7 )RequestCellHeading. 6f =` )Qu   2 V zl n      f. FunctionArgDeclFunctionArgDecl. 6f =` ) u M  2 V z  o o e e .  FunctionArgDeclFunctionArgDecl. f 8 )CellHeadingCntr. f 1 ) CellBodyCntr. f 7 ) CellHeading. f ` * KECellHeadingCntrD. f a )KECellBodyCntr. @ d )u ic  left footer. f@ d )  header right. f T )  TableTitleT:Table 14. . $$f 6L )H BodyBodyBody. $ ) )$ a. 1HeadingTOC. H$ * )H . 2HeadingTOC. lH@  * )l . 3HeadingTOC.  @  : )Level2IX. $@  : )Level1IX. @  : )SpecIX. @  : ) SortSpecIX. @  e )  GroupTitlesIX. @  : )IndexIX. @  ) ) Paragraph. H ) )H . FigureLOF. f T )  TableTitleT:Table 13. . 66f 6  )H Body. f    R )  CellBody. f  1  )  CellBody. f  T )  TableTitleT:Table 14. . $$f  4H )Hf GlossaryText GlossaryHead. f   )Footnote.   )  TitleBanner. f  )  5f CellBodyList. $f  1@ ) 6f    2 V z   t   a.< FunctionDeclFunctionArgDecl. f P ) SubTitleAuthor. C6f SE )C  1Step S:.\tStep. 6f  =` ) uf  2 V z      f.l yFunctionArgDeclFunctionArgDecl. f   )H Diagram. 6f  1` ) f  2 V z      . FunctionArgDeclFunctionArgDecl. 66f  =@ )pH :k@,tSt   f 2 V z      . Structure DeclBody. f  1  )ec  CellBody. f  T )  TableTitleT:Table 17. . $$f  6  )H fBody. $ f  3HQ ) $3HeadingH:..\t FirstBody. HHf M )HIndent2Indent. f !P )Author1Heading. 66f " 1@ ) H   2 V z     l  .a Structure DeclBody. $ f #HQ ) $3HeadingH:..\t FirstBody. HH6f $ 1$c ) Zd l ~ f          2 D V h ez   f   Extract. f % 4  ) 1 CellBody. C6f &B  )Cl U BulletB:\tl. CCf ' ^ )C U  BulletCont Bullet Symbolt. odCCf ( ^ )C  U BulletCont Bullet Symbol. f ) T )  TableTitleT:Table 18. . 6f * =` ) u  1 2o V z  f    . FunctionArgDeclFunctionArgDecl. $ f , 3HQ ) $2Heading H:.\tBody. ~6f - = )~ ^  Definition. C6f . =B  )C U BulletB:\t. f / T )  TableTitleT:Table 10. . f 0 = )  5 CellBodyList. f 1  R )  5 CellBodyList. $$f 2 4 )H GlossaryText GlossaryHead. 6$f 3 4H] ) 5@NumberedIndentH:< >< >< >.\tIndent. 66f 4 4  )6Indent. $f 5 =@ ) 6    2 V zy t    f . FunctionDeclFunctionArgDecl. f 6 T )  TableTitleT:Table 4. . 66f 7 =@ )fH k@,    2 V z  b d    >.. Structure DeclBody. 6f 8 1` )     2 V z=      . FunctionArgDeclFunctionArgDecl.  f 9 T )  TableTitleT:Table 6. . f :  ) CellHeading . f ; =  ) , CellBody. 6f < 2HQ ) $1HeadingH:\t FirstBody. 66f = =@ )H k@,    2 V z ur c i r  . Structure DeclBody. f > T  )H Diagram. 6f ? =` ) uf   2 V z    , e o. FunctionArgDeclFunctionArgDecl. HH6f @ =$c )rsZ l ~    =       2 D ,V h z     u Extract. i66f A   4 ) 6Indent. 6f B 2HQ ) $ 1HeadingH:\t FirstBody. 6f C =T )Z e u#definec. 66f D =P )H k@,s    2 V z      . Structure DeclBody. 66f E =P )H k@,    42 V z      . Structure DeclBody. f F T )  TableTitleT:Table 18. . f G  R )  CellBodyList. f H = )  5 CellBodyList. f I T )  TableTitleT:Table 7. . 6f J =T )Z4  #define. 6f K =D )Z  #define. 6f L =` ) l   2 Ve oz      . FunctionArgDeclHFunctionArgDecl. 66f M 4  )H Body. f N = )  CellBodyCentered. f O =  )f   CellBody. 6f P =T )Zf  #define. 6f Q =D )eZ  #define. f R = )  5 CellBodyList. 6f S =T )Z  #define. $$f T 6H )H GlossaryText GlossaryHead. f U T )  TableTitleT:Table 5. . fZ6f V M )Z NoteNoteTextNote\tBody. C6f W =B )C U BulletB:\t. $$f X  )H Body. C6f Y =B )C6 U BulletB:\t. f Z T )  TableTitleT:Table 2. . 6f [ =` ) ~   2 V z o o ey   . FunctionArgDeclFunctionArgDeclB. 66f \ =@ ) Hf     2 V z      . Structure DeclBody. 6f ] =` ) u:t  f 2 V z      . FunctionArgDeclFunctionArgDecl. $$f ^ 4 )H FunctionIntro. 6f _ 2HQ ) Fu$r1HeadingH:\t FirstBody.  f ` T )  TableTitleT:Table 21. . f a mT )  TableTitleT:Table . . f b T )  TableTitleT:Table 16. . 66f c =@ ) H    2 V z u i    . Structure DeclBody. ? d ) )H .f TableTitleLOT. $$f e 4  )HBody. f f mT )  TableTitleT:Table . . f g 1 )  CellBodyList. 66f h =@ ) H k@,   u i 2 V z t  y   . Structure DeclBody. f i 1 )  CellBodyList. f j T )  TableTitleT:Table 6. . HHf k =@ )Z ~   1  2 V z    e i .  CodeExampleBody. 6f l 2P ) 6 1Heading FirstBody. f m T )  TableTitleT:Table 9. . f n * )Footnote. 66f o =@ )H k@,}f  ? ? =2 V z      . Structure DeclBody. 66f p =@ )H k@,f    22 V z      .i Structure DeclBody. Hf q \ ) H a GlossaryHead GlossaryText. f r T )  TableTitleT:Table 8. . HHf s 4M )HIndent2Indent. 66 f t =D )Z )#define=. f u = )   CellBodyList. f v 1 )  G CellBodyList. f w 1 )  CellBodyCentered. f x = )  G CellBodyList. f y  )  CellBodyList. f z   )  =CellBody. f { T )  TableTitleT:Table 9. . 6f | =` ) u  1   2 V z  o e   . FunctionArgDeclFunctionArgDecl. $$f } =  )H Body. 66f ~ =@ )H k@,f    2 V z     e o. Structure DeclBody. f  T )  TableTitleT:Table 2. . f f T )  TableTitleT:Table 15. . 66f =@ )H k@,f    ) ; z     o . Structure DeclBody. f T )  TableTitleT:Table 16. . $$f 4  )H Body. 6f =` ) u     2 V z     l  .a FunctionArgDecl6FunctionArgDecl. H6f 4H] ) H NumberedIndentH:< >< >< >.\tIndent. $ f 3HQ ) $ 2Heading H:.\t FirstBody. HHf =@ )Z 4~     2 V z      f. CodeExampleBody. ` f F! ) Figure Table RuleF:Figure 20. . 66f =@ )H4 k@,    - V uzn t :  +n t  . Structure DeclBody. f   )yH Diagram. $$f   ) H SmallBody. $$f =@ )6      2 V z   u  l  :.2 nStructure DeclBody. Hf \ ) H GlossaryHead GlossaryText. $$f 4@ )6 f     2 V z   i a  . Structure DeclBody. $$f =@ ). 6     = 2 V z      . Structure DeclBody. $$f =@ ). 6      2 V z      l.e Structure DeclBody. $$f =@ )6      2 V z   i   .t tStructure DeclBody. $$f =@ )6     = 2 V z      .t tStructure DeclBody. $$f =@ )6      2 V z      e.t tStructure DeclBody. $$f =@ )6      2 V z      t.t tStructure DeclBody. f T )  TableTitleT:Table 17. . $$f =@ ) 6y   2 V= z      . Structure DeclBody. 6f =` ) e u?y   2 V z=      . FunctionArgDeclFunctionArgDecl. 6f =` ) clu   f 2 V z      . FunctionArgDeclFunctionArgDecl. 66f =D )c    #define. $$f =@ )6 fu     2 V z    y  . Structure DeclBody. 66f =@ )H k@,?  ?= K 2 V z  l    . Structure DeclBody. $$f T )  TableTitleT:Table 8. . f T )  TableTitleT:Table 10. . f F! ) Figure Table RuleF:Figure 14. . ?  )?f. TableTitleLOT. 6f =` ) u    2 V z  t  l    . FunctionArgDeclFunctionArgDecl. $$ f =D )6  )#define. 66 f =D )Z  )#define. f 8 ) CellHeading. f   ) f CellBody. f T )  TableTitleT:Table 19. . f T )  TableTitleT:Table 15. . 6f =` ) u  =  2 V z      . FunctionArgDeclFunctionArgDecl. f T )  TableTitleT:Table 20. . ~6f n )~ f Definition. f 1  )  CellBullet\t. 6f =` ) u =  2 V z      .= FunctionArgDeclFunctionArgDeclz. 66f =@ )H k@,    2 V z   l a  > . Structure DeclBody. 66f 6  )H  Body. ff n  ) \  CellBody. f 1  ) =  CellBody. ~6f 1 )~f  Definition. $f =@ ) 6     l 2a V> z t  y   . FunctionDeclFunctionArgDecl. 6$f ] ) 6NumberedIndentHead.\tIndent. 66f =@ ) H  1   2 V z =  o   . Structure DeclBody. 66f 4  ) BodyTable. H6f 4HM )HNumbered2IndentH:< >< >< >.\tIndent. 66f 4  )6Indent. ]6$f 4H] )6NumberedIndentH:< >< >< >.\tIndent. 6Zf 4  )  BodyTable. 6f =` ) u     2 V  yz      . FunctionArgDeclFunctionArgDecl. f F! ) Figure Table RuleF:Figure 1. . 6f ` ) u ]  2 V z  b d    >.. FunctionArgDeclZFunctionArgDecl. 66f 4  )H Body.  f = )   CellBodyList. f =  )  CellBody. 66f =@ )H k@,f   `2 V z      . Structure DeclBody. $$ f =D )Z  )#define. $$f =@ ) 6  2= V z      . eStructure DeclBody. 6f =` ) leBo   f2 V z      . FunctionArgDeclHFunctionArgDecl. f F! ) Figure Table RuleF:Figure 5. . f   4 )  CellBody. f T )  TableTitleT:Table 22. . $$f =@ )6f w  =  2 V z  e o   . Structure DeclBody. 6f =` ) uf @  2 V z   u  l u.: uFunctionArgDecl FunctionArgDecl. $$f =@ )6 u f ?  2 V z     l t. Structure DeclBody. 6f =` ) u  =  2 V z  e o   . FunctionArgDeclFunctionArgDecl. 6f =` ) u   2 V z   u  u u.r cFunctionArgDeclcFunctionArgDecl. 66f =@ ) c f    2 V z     t . tStructure DeclBody. 66f =@ )H k@,=   2 V z o     u.r cStructure DeclBody. f T )  TableTitleT:Table 20. . $f 1@ ) 6i r    2 V z=      . FunctionDeclFunctionArgDecl. 6f 1` ) uy     2 V= z      . FunctionArgDeclFunctionArgDecl. $$f =@ )6   f   2 V z     l t. Structure DeclBody. 66f 1@ ) rH     2 V= z      .i eStructure DeclBody. 66f =@ )Hy k@,     2= V z      .i rStructure DeclBody. 6f =` ) Q    2 V z      . lFunctionArgDeclFunctionArgDeclo. . 66f =@ ) rH k@,     2= V z     i e.t Structure DeclBody. $$f   ) H FirstBody. 66f =@ )Hy k@,    2= V z      .  Structure DeclBody. 66f =@ ) tiHc   f  2 V =z      . rStructure DeclBody. 66f =@ )ctHl k@,dy  f  2 V z      . Structure DeclBody. 6f HQ ) $1HeadingH:\t FirstBody. f F! ) Figure Table RuleF:Figure 10. . 6f =` ) u =  2 V z  r t  l  .  FunctionArgDeclFunctionArgDecl. $$f H )fH GlossaryText GlossaryHead. 66f =@ )H k@,    2 V az > d    .f Structure DeclBody. 6f =` ) uf   2 V z      . FunctionArgDeclFunctionArgDecl. $$f  )H f FunctionIntro. 6f =` ) u f  2 V z      ., FunctionArgDeclFunctionArgDecl. 66f =@ )dyH  k@,f    =2 V z      f. Structure DeclBody. f = )ec  5 CellBodyList. 66f =@ ). H k@,   = 2 V z      .f Structure DeclBody. f mF! ) Figure Table RuleF:Figure 13 . 6f =` ) Q  =   2 V z  f t   .y FunctionArgDeclFunctionArgDecl. 6f =` ) . u   2= V z       . ,FunctionArgDeclFunctionArgDecl. = f T )  TableTitleT:Table 1. . 6f =` ) u f  2 =V z      . FunctionArgDeclFunctionArgDecl. 66f =@ )H k@,f   =2 V z      . Structure DeclBody. f F! ) Figure Table RuleF:Figure 13. . f = ). O 5 CellBodyList. 6f =` ) _?r.=   2 V z  ur c  i r. FunctionArgDeclFunctionArgDecl. $$ f \ ) H 4Heading FirstBody. f = )  5CellBodyIndent. f  )  5CellBodyIndent. 6f =` ) cu =?  2 V z  =    . FunctionArgDeclFunctionArgDecl. f F! ) Figure Table RuleF:Figure 15. . 6f =` ) u= J 2 V z   le   . FunctionArgDeclFunctionArgDecl. f F! ) Figure Table RuleF:Figure 16. . f F! ) Figure Table RuleF:Figure 16. . f F! ) Figure Table RuleF:Figure 17. . f F! ) Figure Table RuleF:Figure 17. . f F! ) Figure Table RuleF:Figure 14. . $$f  )!H FunctionIntro. 6f =` ) u~   2 V zu u 1    .f FunctionArgDeclFunctionArgDecl. 66f =@ )H k@,    2 V z  u u 1  . Structure DeclBody. 6f =` ) > u f  2 V z      . FunctionArgDeclrFunctionArgDecl. $f  =@ ) 6    2  V z1      u.r c FunctionDeclFunctionArgDecl6. 6f  =` ) u  ɿ  2 V z  u u 1  . FunctionArgDeclFunctionArgDecl. 66f =@ )H k@,f    2 V z    u r c. Structure DeclBody. ) M ڝ ) ) ڝ * ) 3ڝ + )BitLabel tu , )Function tu - )Field Referencer 3ڝ . )Callout 3tu / ) ArgumentText 3ڝ 0 ) Bullet Symbol ڝ 1 )[ 2 )  [ 3 )  ڝ 4 )3w 5 ) BigSymbol ڝ 6 ) tu 7 ) tu 8 )w# 9 )Emphasis ڝ : ) 3) ; ) Run-In Heading. tu < )Field Reference ڝ = ) 3ڝ > )Dingbat 43i_mF ? )LiteralComment @ ) EquationVariables3# A ) Field Reference 3) B )  Figure Labelw# C )Function 3ڝ D )Header 3vk E .   ImpliedKeycap 3vk F *  InvisibleKeycap 3vk G )  Keycap 3vk H )   Keycap Small 3[ I )  Keycap Table 3[ J )  Keycap Text 3,f/ K )  KeycapInText 3) L ) FunctionDeclaration 3) N )  Node Labele 3[ O ) NoteText w3 P )Path w3 Q ) Placeholder w3 R )Programn R3i_mF S ) ProtoLiteral ڝ T ) 3yc> U ) SansLabel) w3 V ) Subscript w3 W ) Superscript#w X )Symbol 3[ Y ) Tree Cap 3i_mF Z ) Type NameH w3 [ )Variable Reference ڝ \ ) ArgumentText 3ڝ ] +RedText ڝ ^ ) Bullet Symbol [ ` *  yc> a ) ڝ b )Header [ c ) Keycapڝ d ) ) e )  tu f )New Term ) m )  i_mF n ) Ri_mF p ) ProtoLiteral 4i_mF q )Literal i_mF r )Literal 3tu s )New Term ) t ) FunctionDeclaration 3) u ) StructureDeclaration 4i_mF w )LiteralComment ڝ y )Diagram ) z )  DiagramBold 4i_mF { )Literal) | )  DiagramBold tu } ) ArgumentText ڝ ~ ) tu )Function ) ) StructureDeclaration [ )  tu )Field Reference ڝ ) tu ) ArgumentText tu ) i_mF ) Type Nameu ڝ ) Underlinet ڝ ) ) )  ڝ )Literal tu )Function 4i_mF ) ) )  tu ) ArgumentText ڝ )Variable Reference tu )Argument tu )Function ڝ ) KeycapInText i_mF ) ProtoLiteral ) )  tu ) ArgumentText tu ) ArgumentText tu )Field Reference Ri_mF ) [ ) NoteText ڝ ) ڝ ) ImpliedKeycap  tu )New Term ڝ )Function tu )Field Reference yc> ) KeycapInText ڝ ) tu )Emphasis tu ) ڝ )Field Referencec uo& )  tu )Emphasis tu ) ڝ ) ڝ ) ڝ ) Superscript tu )New Termڝ )ڝ ) ڝ ) Subscriptڝ ) Subscriptڝ )star [ .  ImpliedKeycap [ * InvisibleKeycap yc> ) SansLabel w )Symbol [ )  Keycap Small ) )  Figure Label ڝ )Field Reference ڝ )Function tu )Field Reference ) )  DiagramBold ڝ + ڝ ) i_mF ) 4i_mF )Literal 43i_mF )Literal [ )  3tu )Argument a ) a ) b ) c ) @ d )@ e ) f ) g ) @ h ) i )b j ) k  )Zl l  )Z m ) n  )Z o ) p  )Z q  )Z r  )Z s  )Z t ) u ) v ) w ) x  )Z y  )Z z  )Z { ) | ) } ) ~ )   )Z   )Z)   )Z   )Z   )Z   .  *   )Z  )Z   b   )Thin ) )Medium ) )Double ) )Thick@ ) ) Very Thin ) ) U \" Ƨ U / ) ) ): )9 Format A V / ) ) )6  6  6  Format BƧ W / ) ) )d  b3  9n  6  D  Sequence Examples )6 X ) ) )) I .I I *I Example Keys6 Y ) ) )6 I )I I )CenteredExample $ Z ) ) ) 0  0 Protocol Types U [ / ) ) ) : 9 Compose Tablet 6 ] ) ) )l    Request TypesFo $ ^ ) ) )l  2  3Protocol Types  $ _ ) ) )l  2  Protocol Types $ ` 6 ) ) )l 0 H 0 Protocol Types $ a ) ) ) 0  0 xProtocol Types  b ) ) )0l  02  TProtocol Types $ c I ) ) ) : 0 : : 0 :aProtocol Types $ d I ) ) )l : 0 :6 : 0 :y : ; :Protocol Types $ e M ) ) )l : O :T2 : O :Protocol Types $ f M ) ) )l : O :T2 : O :Protocol Types $ g ) ) )0l  T2  Protocol Types $ h  ) ) )0l  T  Request Types $ i ) ) )  g T g Protocol Types $ j ) ) )0 i T i Protocol Types $ k ) ) )0l  ;2  TProtocol Types  l ) ) )O i O i TProtocol Types $ m ) ) )OV i O i TProtocol Types $ n ) ) ) 0  0 TProtocol Types $ o ) ) )l 2 yProtocol Types $ p ) ) )gl : :g2 : :TProtocol Types $ q ) ) )il  i2  TProtocol Types  s ) ) ) 0  0 TProtocol Types  t ) ) )i 0 i 0 Protocol Types 6 u ) ) )il  i2  TProtocol Types $ v M ) ) )0l : O :02 : O :TProtocol Types $ w ) ) )V i  i TProtocol Types $ x / ) ) ): 9 TProtocol TypesC g kbO 2eɚV!o a 6>?! ^ JW )?--0! _ XfBFep!7 ` DI 0l$r! a gwH/o b @}~HTHT2g hWQZ)c ! tB2oc~/7 ^ [0 6i! ^!J cl6" d#lDO! e'l6>! f3l;W$ v7l6!E n`~~/# _J@w1!4 accgl}-Nxb" w!) n " gt"b"1A? &!| n} 0 * 0  0 = m l! m  !y m ?![ iQl\?! ^ @ kG-ocN0 kf.@  e uj/~ g@ٕ/ xbJٙs1?-L0/ lT&f Y|/0 _K0K`!) jH2! jZ H! ^ !7 a!&l$!/ ^+<?4G?@% q2=F_?Ng/; o*\60!z n\c 0 M 0 t`! aK?!S ^# 33/ aH33H!o aH 0 !a blHy!) p?)!) n r"~o33! s(+33!= ^$(l!2!t ^04p?!` ^59! ^:>*!+ ^?BlD!` ^CG 0 !# ^HJ! ^KR3!D ^S\!R ^]`0! ^ad !1 ^eh!k ^im!L ^qt !1 ^ux(! ^y4lD! o9u--`l' -j - -+i0 .p .! .^ .~A / / /lz 01 gR l0 m0 n0!l10 g o1 p1  q1434i 23222434y 324333434 435444434 54?x5(55l 67 t6 u6768 v7- w7 879 x8- y8 98: z9. {9. :9 |:/ }:/ ;<R ~;0 ;0# <;= < <11 =<> = =? >= > >434 ?5P?? ?Hi @A z @ @  @yA@B z A A  A BAC z B B B CBx z C C C8l DE  D D9EDF  E E: FEG  F F; GFH  G G< HGI  H H= IH  I I>l JK  J J? J?/J?l KJL  K@ K@ K@0Kl LKM  LA LA LZLBl, MLN  MB M MC[Ml: NMO  N ND N\NlH ONP  O O O]OlV POQ  P P P^Pld QPR  Q Q Q _Q lr RQS  R  R  Rl`Rl SRT   S  S/ SlaSl TSU   T  T0 TlbTli U(TV   U  UZ UlcUlv VUW   V  V[ VlVl WPV   W  W\ WlWk XY   X  X] XlmYXZ   Y  Y  Y^m) ZY[ R Z  Z  Z m7 [Z\  [ [  [ mE \[]  \ \ \ mS ]\^ a ] ] ]ma ^]_  ^ ^i ^mo _^`  _ _ _vm} `_a  ` ` `m a`b  a a am bac  b b bm cbd  c c cm dce  d d dm edf  e e emi fxe  f f fl gh  g g hgi  h^ h ihj  i i_ jik  j_ j kjl  k` k` lkm  la la mln  m mb nmo  n n onp  o  o poq  p p ' qpr  q q5 rqs  r rC srt h s sQ tsu i t t^_ utv j u um vuw k v v_{ wv l w w` xCy zm x xa xa yxz z y yb y  zy{ z z z  z {z| z {  { { |{} z | | |q }| z } }r }rlH ~  ~s ~sl ]  t tl? ST +u ,u -l? U .v / wlA? VW  x l]? WX  y l? Y  z l%? V  { HC0 ?  |   l 1 g   g T  lT  l3 T  Z G?   %l  g? l  g?lw x i?l\ ? & ' ( )ll    l.    l#  l#Tl#  l%#g l'    Q\  i  l'   !  "  &l7 ) #l ! $lH    % " &lV#  ' # (lz  ) $ *Hi   + ,ly  - .l  / 0l$  1 2l$  3 4l$  5 6l$  7 8Hh   9 :) ;lx  < =  >l   ? @ Al   B C Dl.  E F Gl9  H I Jl#  K L Ml2#  N O PH   Q R l  S Tl   U Vl.  W Xl.  Y Zl6#  [ \lZ.  ] ^l.  _ `H   a9 b cl  d# e fl  g# h il  j  k ll  m n ol*  p q rl'  s t ulC  v w xll  l}   l   l   l   l   l   l   l  * l   l   l   l   l$   l2   l@   Zi      ly"     l     l?    l?    l     l     $l   2  l       l         l         l         i0D    *   li0T      l i0s.       l l?       lly? X       l? @      l7~ op lU ~ qrlI#'H   lb  lblblb  lb  lb lb  @lb  l b  lb#l(bU J      UJ     b U/J b     Uj/(L        UL   l    UL        U/L      UL      UL      UPL       :; 2 3l l l# l<lU   Uln ' ( ) l*+L, HT ()*ldy+,-l P S T Ul-P V W XlP Y Z [l#P \ ] ^lC#P _ ` alg#P b c dl#P e f gl# P h i jl   P k  l  m l.  P n  o  p l9  T !  " lK9  T #  q i0#        0 i0#  1 r s ti0 Z u v w xg V { |l)V } ~l:V  lS.V   lV   lV    l7b  lFb  lUb  ldb lsb!" lb#$Zi  %&ly '(l  )*l   +,l   - .  l !"/!0! "!#1"2" #"$3#4# $#%5$6$ %$&7%8% &%9&:&lm '('''' l{(')((((l)(*))))l*)**** l<! +,  -+ .+! /+ 0+lL!,+-  1, 2, 3, 4,lk! -,. 3 5- 6- 7- 8-ly! .-/  9. :. ;.7 <.8l! /.0  =/9 >/: ?/l @/l! 0/1  A0 B0 C0l D0l! 102  E1 F1 G1l H1l! 213  I2 J2 K2l L2l! 324  M3 N3 O3l P3l! 435  . Q4 / R4 0 S4l T4l! 546  2 U5 3 V5 4 W5l X5l! 657  6W6 7X6 8Y6lZ6l! 768  :[7 ;\7 <]7l^7l! 879 9 >_8 ?`8 @a8lb8l! 98:  Bc9 Cd9 De9lf9l!! :9;  Fg: Gh: Hi:lj:l/!K;:<  Jk; Kl; Lm;ln;lz!<;  No< Op< Pq<lr<Vr => / Rs= St=  Tu= lv= l>=? 3 Vw> Wx> Xy>lz>l?>@ 7X{?Y|?Z}?lz?l@?A ;\{@]|@^}@l~@lA@B ?`AaAbAlAlBAC CdBeBfBlBlCBD GhCiCjClClDCE KlDmDnDlDl$EDF pEqErEVEl6FE StFuFvFlFlGHWx &Gy 'Gz (Gll HGIX{ )H| *H} +Hzl! IHJA ,I{I|I}l. JIKJJJl; KJLKKKlH LKMLLLlU MLNMMMlb NMONNN$lo ONOOO434 P?PPPl? QR Q Q Ql?RQS R R Rl? SR S S Sl? TU T T Tl ? UT U U Ul3? V V V VlO? W W W Wlk? X X X Xl? Y Y Y *Yi0Z[ZZZZi0 [Z^[[[[l \]  \ \l ]\  ] ]i0 ^[_^^^^i0- _^____3Z  `a' ` ` `Ola`b' a a akl. bah'bbbl$ cd ccccl64dce ddddl6E edf eeeel6S feg  ffff l6agf ggggl< hbi'hhhlJ ih'ii'i l7j-k j j'lG kjl k. klT lkm l l$la mlnmmln nmonnl{ onooel/0p.qWpeXpeYpl?0 qprZqf[qf\qflL0 rqs]rg^rg_rglY0 srt`sashbshlf0 tsuctdtietils0 utvfugujhujl0 vuwivkjvkkvl0wvxlwlmwnwml0 xwyoxpxnqxl0 yxzryosytyl0 zy{uzvzwzlh0 { z|x{y{z{lt0 |{}{|||}|l0}|~~}}}l0 ~}~~~l0 P~~Q/~a 0w~n 0x~{ x0~ yy~ zz~ {~ 0434 P434  434  P434 {l'  "7t` "Ht`  "i0;_l?H0  ?H0 ?H0 ?4H0  ?lH0A ?H0  ?H'0  ?H50  ? H^0  ?Hl0  ?Hz0  ? H0  ?lAH0  ? H0  ? Hw0A  H0    H0    H0   H0   H0   A    H 0'P    j|   Aj|  j|    j|    !j|  "#$%j|  &'()j|  *H+,-j |   . /H01j|  234j5j%|  678j9j3|  :;<j=jA|  >?@jAjO|  B C!DjEj]|  #F$G%HjIjk|  'J(K)LjMjy|  +N,O-PjQj|   /R0S1TjUj|  3V4W5XjYj|  7Z8[9\j]j|  ;^<_=`jaj| ?b@cAdjej|   CfDgEhjij|  $GjHkIljml  (KnLoM* pNqO;  rsI  TtuW  vwl]  xyzm2 |{|}~2  ~|2  |2  |2  2  (2  2  2  2  2   2  2  &2  lX i'lf 'i0T i0b i0pi0  Zi     ly   l. l?l? at k H Ilk J Kl#k L Mli.(m N Ol#m P Ql.Pm Rluy ./ 0ly 123ly 456lٕ  2345lٕ 6789l/ٕ  :;<=l<ٕ  >?@AlJٕ  BCDElXٕ  FGHmI Rlfٕ  JK.L/M0ltٕ  N1O2P3Qllٕ  4R5S6TlUlٕ 3V4W5XlYlٕ  7Z8[9\l]lٕ ;^<_=`lalٕ  ?b@cAdlelٕ  CfDgEhlilٕ  GjHkIllml KLMl NOl l Tj yVlyl y ٕ!lc  yzlq  {|l }~l4   DH GH UH   cH   L l qH      H      H       H      H    H  H  % 6  D  l y"#l y&U'l  y()l y*5l) y 67 HVq  ; lf) ; lw)  ! ;  l) ! " ;!!l) "! ;""Z $%+$,$l"%$&-%.%l3^&%'/&0&l'&(1'2'Ul^('3(4(l{ 01"C0D0l102"E1F1l213"G2H2 l2324" I3J3l^43"!K4L4Z? 56""M5N5lO657"O6P6l`#768"%Q7R7l879"&S8T8l#98"'U9V9Z; :;$(W:X:lK;:<$Y;Z;l\#<;=$1[<\<l.=<>$2]=^=li.>x=&3_>`>l\ ?@e4a? b?ll@?Aec@!d@l}A@Be6eA"fAl3tBAe7gBhBc CDe8iC%jClDCEe9kD&lDl.EDFemE'nEl&FEGe;oF(pFl?GFe<qGrG[ HIg=sH1tHlIHJg>uI2vIl#JIgxwJ3xJav K Li@yK4zK lL KMiA{L|L!liM LNiB}M6~M"l#N MOiN7Nl%#O NPiDO8O%lI#P OQiEP9P&lm#Q PRiFQQ'l#R QiGR;R(av S TkS<SlT SUkIT=T1liU TVkJU>U2l.V UWkVV3l/ W VXkLW@W4l= X WYkMXAXlK#Y XZkNYBY6lo#Z Y[kOZZ7l#[ Z\kP[D[8l#\ [kQ\E\9U ] ^mR]F]l^ ]_m^G^;l#_ ^`mT__<l3.` _mU`I`=dE a boVaJa>lUb acoWbblf=c bdoXcLc@l^d coYdMdAZ1 e foZeNeBlAf ego[fOflRg fho\gPgDlkh gohQhE] ijq^iRiFljikq_jjGl#kjlq`kTkl #lkmqlUlIl.#mlqbmVmJj qrwcqWqlrqswdrXrLl srtwsYsMltswftZtNZ uvwgu[uOlvuwwhv\vPlwvxwwwQlixxwyjx^xRl yzky_ylzy{(lz`zTl {z|m{{Uli9|({}|b|Vlm}|~r}c}Wl.~}s~d~Xl?.P~tYc fZNlg[Ol#\Pl;QxlTylm(zzl{{l|}l#~l#hfg33  k7 8 hfg33 k9:;hfg33# k<=>hfg33. k?@Ahfg33 kBCDhfg533# kEFGhfgY33. kHIJhfg339 kKLMR  `  n  33|    33  lv?    li? (Y   HF  zffVo33 zffgo33  zffuo33  zffo33  zffo33  zffo33  zffo33  zffo33  zffo33  zffo33 zffo33    +Comment  FromProtocol - Open Issue ] ff" I J% K L( M N+ O P. Q Rff1 S TK g iO j n^ u xd y ff, ,j H /., J 45, K 67, M :; ) 9 133d  )BlackT! *WhiteddA +Red dd ,Greendd  -Blued .Cyand /Magentad 0Yellow Times-Roman Times-ItalicTimes-BoldItalic Times-BoldHelvetica-BoldSymbolSymbolCourierf HelveticaHelvetica-Narrow-BoldHelvetica-NarrowCourierTimes HelveticaSymbol NarrowRegulartRegular BoldRegularItalicNT2,8g NWw3^z hB?+eY݌T;(mnՆB JGiv/ᏟO^Bq:߰F$RH83ç:'5zfaD#pe]fCPRaAvSXEimJDϜia_ցvv( xdQV+dXu*FJ_NZ.9ɮxj= O]F>unَNnaODž]gc4bvNnjxᓙqa!\])hoڀ[#ݵO .$%hy*iNW?/꫿׉b)P7!_/8`Vٮ#C,"x񾁖 4ݨ Fdj3(HOdsbl^<١: $ 8d"FuQ痡]C"85V 4LtY8rdo8,Uw|ʮ <Ôed q׹G2!TJ3F)TbL4.{}߳>RwW&꒾8 }ڨn i\T__0\Qېq0 zbm)sAVmމ|LV@"߹6\gs U.TJ|:jI*&+Dd>h\L)Y騿Ocw͎Ă?A#:PՔE5@\i[ic"8etw-Id殛^vkT6YS2 pTc)Iܡ9\?BLS#aJM>jX?0ڕ t]C ʒ'lI2D' PIM "zE$݂{[zL5ywOf#"L8|%]Ch'oXtw[=%,;ʮ8gFyedEc\{:>o o-){AKS~fTug/aH+D)eiʥ._5YlC|sɖH ]pP"qS`BXYT~Kqy#HK ;e {#|A?lTǝ :vs̴|ɫHO40%b "/xSQ|E=9|hI}wu~Pu(a0̗aO?nM먣Q?`៫X0pT'<oml7mPpM%DI&He U@\lT߻skvH5^}Zgs ûc^amM%!x\;c"6 uw+»HMJ' H`6-Hl@Lg!zKsTc˹^䡋B5hbř4'2;>1(ä/$#"mӅtO7WtIKQPSP ώ;z Q&:{IJzy׌fs:)҇–f Y)/.w^UCjw \&G _C-}'* bK3i2e:k$lĊnZ(DrfaYJZFtGDpF 'ˊGY"o"=sc4aL5*2թI End7}-t nPETς7!.v˿M"H)nߛw1/;G=lJUMg0(ՀK/1C(UHnL+{@ސ[Mqɖ-s)>,m~߈;jE \+1E{ޅzNg_! :)H`]ϫrД=>/{9*"~)2pf*љY;oæeʘNC^΀q%(Vr,@ >^!\*RBw<Lq)kjSI6K;CF~(_Э=Li}5݊dW˼؂S}eoas? O5Nj8-ImB{FnL"*7um6:E'Q34(Ɍ]tcĚU d͔GrRa.weApk`FX%&89ϙ{=!wU0u.r,~ެ StSvM/D2Vi±:ȻdWy$ozP}JZ%mO]^8Ξcya$n0kXwoBuӠfz ԡTa&@2Ȳ"@!nI4 㽁/f \=[rW!'XU1KEjZbm#QuS\bs>;rY :DoGcאn2\B{!Բm8%fgaƨ_90ߦȬ^"daǏĊ-V;vWud(=K =iM*[6+-.&J#6諯M07XY)@hܼ!,F ˮvמPhY|zwVnn堳4,a<E DCp`G {G[s Htc"Xfb U38ĵ@=9i=qU\gp`ؼ?79,MY-CeIÈ%/+h~r_%n$$Vz]߳tH`nuJG$/25NEBpԑsi+/AՓtC7l}58P7W7;>_y2Z1BngBo[ gV*V, 8XHnEe3} \}AZ%`W#Vܲ"~ǶTَ fW6 k7Z?`n bHO[VL&T">&ּ칯Q߽Ia"_[~p3J ؁ -N$%q$?41޵QdRU'F؏p-||o!m, Ԃ'ㄕY;$. +I'τ`=o²ICetܤPMS "5t9Ky*2O ,ݗ;+FxVCq*&hF:Yȩ#;ǰ@B ܈bu.qN Xik]%M;#fc@mbEv^~E|boJ`=^oz>]~poYl~ccv̪6a)\Y'G=?K&/? -Ȼή#4]$M OKxmOKIT!s$=ZA|nsM#'PDXFD q-c[`Ò67_t[- )^$Mס" #?m9d MY3ʙ[a'b N? |\J6KWANAL?jν(,̮n 3xffَR^1d@K޺bkegl{6[ >z+ih_T3w7HWwO'OJdc=pGWo fowό)9AuLhu_Q)#5!/g\22aj-..Ie 921US&% N=o?ɽ:'p| y4tcDm "7]z-x 7-.nkm 9%=邪BF\b@v`xoCZRwg D Q16 ;PdjN.)*Ϯ6ԘHlEz?^^AYƴ{d-f ʢV/L*-$1]7H_`Owfy T©jZ^w+1yqu.j4SeD\=|@_Nɘ3@">DOdaK = ;o$~Oò/|%M  s