Path: blob/master/thirdparty/linuxbsd_headers/X11/extensions/XKB.h
9905 views
/************************************************************1Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc.23Permission to use, copy, modify, and distribute this4software and its documentation for any purpose and without5fee is hereby granted, provided that the above copyright6notice appear in all copies and that both that copyright7notice and this permission notice appear in supporting8documentation, and that the name of Silicon Graphics not be9used in advertising or publicity pertaining to distribution10of the software without specific prior written permission.11Silicon Graphics makes no representation about the suitability12of this software for any purpose. It is provided "as is"13without any express or implied warranty.1415SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS16SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY17AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON18GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL19DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,20DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE21OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH22THE USE OR PERFORMANCE OF THIS SOFTWARE.2324********************************************************/2526#ifndef _XKB_H_27#define _XKB_H_2829/*30* XKB request codes, used in:31* - xkbReqType field of all requests32* - requestMinor field of some events33*/34#define X_kbUseExtension 035#define X_kbSelectEvents 136#define X_kbBell 337#define X_kbGetState 438#define X_kbLatchLockState 539#define X_kbGetControls 640#define X_kbSetControls 741#define X_kbGetMap 842#define X_kbSetMap 943#define X_kbGetCompatMap 1044#define X_kbSetCompatMap 1145#define X_kbGetIndicatorState 1246#define X_kbGetIndicatorMap 1347#define X_kbSetIndicatorMap 1448#define X_kbGetNamedIndicator 1549#define X_kbSetNamedIndicator 1650#define X_kbGetNames 1751#define X_kbSetNames 1852#define X_kbGetGeometry 1953#define X_kbSetGeometry 2054#define X_kbPerClientFlags 2155#define X_kbListComponents 2256#define X_kbGetKbdByName 2357#define X_kbGetDeviceInfo 2458#define X_kbSetDeviceInfo 2559#define X_kbSetDebuggingFlags 1016061/*62* In the X sense, XKB reports only one event.63* The type field of all XKB events is XkbEventCode64*/65#define XkbEventCode 066#define XkbNumberEvents (XkbEventCode+1)6768/*69* XKB has a minor event code so it can use one X event code for70* multiple purposes.71* - reported in the xkbType field of all XKB events.72* - XkbSelectEventDetails: Indicates the event for which event details73* are being changed74*/75#define XkbNewKeyboardNotify 076#define XkbMapNotify 177#define XkbStateNotify 278#define XkbControlsNotify 379#define XkbIndicatorStateNotify 480#define XkbIndicatorMapNotify 581#define XkbNamesNotify 682#define XkbCompatMapNotify 783#define XkbBellNotify 884#define XkbActionMessage 985#define XkbAccessXNotify 1086#define XkbExtensionDeviceNotify 118788/*89* Event Mask:90* - XkbSelectEvents: Specifies event interest.91*/92#define XkbNewKeyboardNotifyMask (1L << 0)93#define XkbMapNotifyMask (1L << 1)94#define XkbStateNotifyMask (1L << 2)95#define XkbControlsNotifyMask (1L << 3)96#define XkbIndicatorStateNotifyMask (1L << 4)97#define XkbIndicatorMapNotifyMask (1L << 5)98#define XkbNamesNotifyMask (1L << 6)99#define XkbCompatMapNotifyMask (1L << 7)100#define XkbBellNotifyMask (1L << 8)101#define XkbActionMessageMask (1L << 9)102#define XkbAccessXNotifyMask (1L << 10)103#define XkbExtensionDeviceNotifyMask (1L << 11)104#define XkbAllEventsMask (0xFFF)105106/*107* NewKeyboardNotify event details:108*/109#define XkbNKN_KeycodesMask (1L << 0)110#define XkbNKN_GeometryMask (1L << 1)111#define XkbNKN_DeviceIDMask (1L << 2)112#define XkbAllNewKeyboardEventsMask (0x7)113114/*115* AccessXNotify event types:116* - The 'what' field of AccessXNotify events reports the117* reason that the event was generated.118*/119#define XkbAXN_SKPress 0120#define XkbAXN_SKAccept 1121#define XkbAXN_SKReject 2122#define XkbAXN_SKRelease 3123#define XkbAXN_BKAccept 4124#define XkbAXN_BKReject 5125#define XkbAXN_AXKWarning 6126127/*128* AccessXNotify details:129* - Used as an event detail mask to limit the conditions under which130* AccessXNotify events are reported131*/132#define XkbAXN_SKPressMask (1L << 0)133#define XkbAXN_SKAcceptMask (1L << 1)134#define XkbAXN_SKRejectMask (1L << 2)135#define XkbAXN_SKReleaseMask (1L << 3)136#define XkbAXN_BKAcceptMask (1L << 4)137#define XkbAXN_BKRejectMask (1L << 5)138#define XkbAXN_AXKWarningMask (1L << 6)139#define XkbAllAccessXEventsMask (0x7f)140141/*142* Miscellaneous event details:143* - event detail masks for assorted events that don't really144* have any details.145*/146#define XkbAllStateEventsMask XkbAllStateComponentsMask147#define XkbAllMapEventsMask XkbAllMapComponentsMask148#define XkbAllControlEventsMask XkbAllControlsMask149#define XkbAllIndicatorEventsMask XkbAllIndicatorsMask150#define XkbAllNameEventsMask XkbAllNamesMask151#define XkbAllCompatMapEventsMask XkbAllCompatMask152#define XkbAllBellEventsMask (1L << 0)153#define XkbAllActionMessagesMask (1L << 0)154155/*156* XKB reports one error: BadKeyboard157* A further reason for the error is encoded into to most significant158* byte of the resourceID for the error:159* XkbErr_BadDevice - the device in question was not found160* XkbErr_BadClass - the device was found but it doesn't belong to161* the appropriate class.162* XkbErr_BadId - the device was found and belongs to the right163* class, but not feedback with a matching id was164* found.165* The low byte of the resourceID for this error contains the device166* id, class specifier or feedback id that failed.167*/168#define XkbKeyboard 0169#define XkbNumberErrors 1170171#define XkbErr_BadDevice 0xff172#define XkbErr_BadClass 0xfe173#define XkbErr_BadId 0xfd174175/*176* Keyboard Components Mask:177* - Specifies the components that follow a GetKeyboardByNameReply178*/179#define XkbClientMapMask (1L << 0)180#define XkbServerMapMask (1L << 1)181#define XkbCompatMapMask (1L << 2)182#define XkbIndicatorMapMask (1L << 3)183#define XkbNamesMask (1L << 4)184#define XkbGeometryMask (1L << 5)185#define XkbControlsMask (1L << 6)186#define XkbAllComponentsMask (0x7f)187188/*189* State detail mask:190* - The 'changed' field of StateNotify events reports which of191* the keyboard state components have changed.192* - Used as an event detail mask to limit the conditions under193* which StateNotify events are reported.194*/195#define XkbModifierStateMask (1L << 0)196#define XkbModifierBaseMask (1L << 1)197#define XkbModifierLatchMask (1L << 2)198#define XkbModifierLockMask (1L << 3)199#define XkbGroupStateMask (1L << 4)200#define XkbGroupBaseMask (1L << 5)201#define XkbGroupLatchMask (1L << 6)202#define XkbGroupLockMask (1L << 7)203#define XkbCompatStateMask (1L << 8)204#define XkbGrabModsMask (1L << 9)205#define XkbCompatGrabModsMask (1L << 10)206#define XkbLookupModsMask (1L << 11)207#define XkbCompatLookupModsMask (1L << 12)208#define XkbPointerButtonMask (1L << 13)209#define XkbAllStateComponentsMask (0x3fff)210211/*212* Controls detail masks:213* The controls specified in XkbAllControlsMask:214* - The 'changed' field of ControlsNotify events reports which of215* the keyboard controls have changed.216* - The 'changeControls' field of the SetControls request specifies217* the controls for which values are to be changed.218* - Used as an event detail mask to limit the conditions under219* which ControlsNotify events are reported.220*221* The controls specified in the XkbAllBooleanCtrlsMask:222* - The 'enabledControls' field of ControlsNotify events reports the223* current status of the boolean controls.224* - The 'enabledControlsChanges' field of ControlsNotify events reports225* any boolean controls that have been turned on or off.226* - The 'affectEnabledControls' and 'enabledControls' fields of the227* kbSetControls request change the set of enabled controls.228* - The 'accessXTimeoutMask' and 'accessXTimeoutValues' fields of229* an XkbControlsRec specify the controls to be changed if the keyboard230* times out and the values to which they should be changed.231* - The 'autoCtrls' and 'autoCtrlsValues' fields of the PerClientFlags232* request specifies the specify the controls to be reset when the233* client exits and the values to which they should be reset.234* - The 'ctrls' field of an indicator map specifies the controls235* that drive the indicator.236* - Specifies the boolean controls affected by the SetControls and237* LockControls key actions.238*/239#define XkbRepeatKeysMask (1L << 0)240#define XkbSlowKeysMask (1L << 1)241#define XkbBounceKeysMask (1L << 2)242#define XkbStickyKeysMask (1L << 3)243#define XkbMouseKeysMask (1L << 4)244#define XkbMouseKeysAccelMask (1L << 5)245#define XkbAccessXKeysMask (1L << 6)246#define XkbAccessXTimeoutMask (1L << 7)247#define XkbAccessXFeedbackMask (1L << 8)248#define XkbAudibleBellMask (1L << 9)249#define XkbOverlay1Mask (1L << 10)250#define XkbOverlay2Mask (1L << 11)251#define XkbIgnoreGroupLockMask (1L << 12)252#define XkbGroupsWrapMask (1L << 27)253#define XkbInternalModsMask (1L << 28)254#define XkbIgnoreLockModsMask (1L << 29)255#define XkbPerKeyRepeatMask (1L << 30)256#define XkbControlsEnabledMask (1L << 31)257258#define XkbAccessXOptionsMask (XkbStickyKeysMask|XkbAccessXFeedbackMask)259260#define XkbAllBooleanCtrlsMask (0x00001FFF)261#define XkbAllControlsMask (0xF8001FFF)262#define XkbAllControlEventsMask XkbAllControlsMask263264/*265* AccessX Options Mask266* - The 'accessXOptions' field of an XkbControlsRec specifies the267* AccessX options that are currently in effect.268* - The 'accessXTimeoutOptionsMask' and 'accessXTimeoutOptionsValues'269* fields of an XkbControlsRec specify the Access X options to be270* changed if the keyboard times out and the values to which they271* should be changed.272*/273#define XkbAX_SKPressFBMask (1L << 0)274#define XkbAX_SKAcceptFBMask (1L << 1)275#define XkbAX_FeatureFBMask (1L << 2)276#define XkbAX_SlowWarnFBMask (1L << 3)277#define XkbAX_IndicatorFBMask (1L << 4)278#define XkbAX_StickyKeysFBMask (1L << 5)279#define XkbAX_TwoKeysMask (1L << 6)280#define XkbAX_LatchToLockMask (1L << 7)281#define XkbAX_SKReleaseFBMask (1L << 8)282#define XkbAX_SKRejectFBMask (1L << 9)283#define XkbAX_BKRejectFBMask (1L << 10)284#define XkbAX_DumbBellFBMask (1L << 11)285#define XkbAX_FBOptionsMask (0xF3F)286#define XkbAX_SKOptionsMask (0x0C0)287#define XkbAX_AllOptionsMask (0xFFF)288289/*290* XkbUseCoreKbd is used to specify the core keyboard without having291* to look up its X input extension identifier.292* XkbUseCorePtr is used to specify the core pointer without having293* to look up its X input extension identifier.294* XkbDfltXIClass is used to specify "don't care" any place that the295* XKB protocol is looking for an X Input Extension296* device class.297* XkbDfltXIId is used to specify "don't care" any place that the298* XKB protocol is looking for an X Input Extension299* feedback identifier.300* XkbAllXIClasses is used to get information about all device indicators,301* whether they're part of the indicator feedback class302* or the keyboard feedback class.303* XkbAllXIIds is used to get information about all device indicator304* feedbacks without having to list them.305* XkbXINone is used to indicate that no class or id has been specified.306* XkbLegalXILedClass(c) True if 'c' specifies a legal class with LEDs307* XkbLegalXIBellClass(c) True if 'c' specifies a legal class with bells308* XkbExplicitXIDevice(d) True if 'd' explicitly specifies a device309* XkbExplicitXIClass(c) True if 'c' explicitly specifies a device class310* XkbExplicitXIId(c) True if 'i' explicitly specifies a device id311* XkbSingleXIClass(c) True if 'c' specifies exactly one device class,312* including the default.313* XkbSingleXIId(i) True if 'i' specifies exactly one device314* identifier, including the default.315*/316#define XkbUseCoreKbd 0x0100317#define XkbUseCorePtr 0x0200318#define XkbDfltXIClass 0x0300319#define XkbDfltXIId 0x0400320#define XkbAllXIClasses 0x0500321#define XkbAllXIIds 0x0600322#define XkbXINone 0xff00323324#define XkbLegalXILedClass(c) (((c)==KbdFeedbackClass)||\325((c)==LedFeedbackClass)||\326((c)==XkbDfltXIClass)||\327((c)==XkbAllXIClasses))328#define XkbLegalXIBellClass(c) (((c)==KbdFeedbackClass)||\329((c)==BellFeedbackClass)||\330((c)==XkbDfltXIClass)||\331((c)==XkbAllXIClasses))332#define XkbExplicitXIDevice(c) (((c)&(~0xff))==0)333#define XkbExplicitXIClass(c) (((c)&(~0xff))==0)334#define XkbExplicitXIId(c) (((c)&(~0xff))==0)335#define XkbSingleXIClass(c) ((((c)&(~0xff))==0)||((c)==XkbDfltXIClass))336#define XkbSingleXIId(c) ((((c)&(~0xff))==0)||((c)==XkbDfltXIId))337338#define XkbNoModifier 0xff339#define XkbNoShiftLevel 0xff340#define XkbNoShape 0xff341#define XkbNoIndicator 0xff342343#define XkbNoModifierMask 0344#define XkbAllModifiersMask 0xff345#define XkbAllVirtualModsMask 0xffff346347#define XkbNumKbdGroups 4348#define XkbMaxKbdGroup (XkbNumKbdGroups-1)349350#define XkbMaxMouseKeysBtn 4351352/*353* Group Index and Mask:354* - Indices into the kt_index array of a key type.355* - Mask specifies types to be changed for XkbChangeTypesOfKey356*/357#define XkbGroup1Index 0358#define XkbGroup2Index 1359#define XkbGroup3Index 2360#define XkbGroup4Index 3361#define XkbAnyGroup 254362#define XkbAllGroups 255363364#define XkbGroup1Mask (1<<0)365#define XkbGroup2Mask (1<<1)366#define XkbGroup3Mask (1<<2)367#define XkbGroup4Mask (1<<3)368#define XkbAnyGroupMask (1<<7)369#define XkbAllGroupsMask (0xf)370371/*372* BuildCoreState: Given a keyboard group and a modifier state,373* construct the value to be reported an event.374* GroupForCoreState: Given the state reported in an event,375* determine the keyboard group.376* IsLegalGroup: Returns TRUE if 'g' is a valid group index.377*/378#define XkbBuildCoreState(m,g) ((((g)&0x3)<<13)|((m)&0xff))379#define XkbGroupForCoreState(s) (((s)>>13)&0x3)380#define XkbIsLegalGroup(g) (((g)>=0)&&((g)<XkbNumKbdGroups))381382/*383* GroupsWrap values:384* - The 'groupsWrap' field of an XkbControlsRec specifies the385* treatment of out of range groups.386* - Bits 6 and 7 of the group info field of a key symbol map387* specify the interpretation of out of range groups for the388* corresponding key.389*/390#define XkbWrapIntoRange (0x00)391#define XkbClampIntoRange (0x40)392#define XkbRedirectIntoRange (0x80)393394/*395* Action flags: Reported in the 'flags' field of most key actions.396* Interpretation depends on the type of the action; not all actions397* accept all flags.398*399* Option Used for Actions400* ------ ----------------401* ClearLocks SetMods, LatchMods, SetGroup, LatchGroup402* LatchToLock SetMods, LatchMods, SetGroup, LatchGroup403* LockNoLock LockMods, ISOLock, LockPtrBtn, LockDeviceBtn404* LockNoUnlock LockMods, ISOLock, LockPtrBtn, LockDeviceBtn405* UseModMapMods SetMods, LatchMods, LockMods, ISOLock406* GroupAbsolute SetGroup, LatchGroup, LockGroup, ISOLock407* UseDfltButton PtrBtn, LockPtrBtn408* NoAcceleration MovePtr409* MoveAbsoluteX MovePtr410* MoveAbsoluteY MovePtr411* ISODfltIsGroup ISOLock412* ISONoAffectMods ISOLock413* ISONoAffectGroup ISOLock414* ISONoAffectPtr ISOLock415* ISONoAffectCtrls ISOLock416* MessageOnPress ActionMessage417* MessageOnRelease ActionMessage418* MessageGenKeyEvent ActionMessage419* AffectDfltBtn SetPtrDflt420* DfltBtnAbsolute SetPtrDflt421* SwitchApplication SwitchScreen422* SwitchAbsolute SwitchScreen423*/424425#define XkbSA_ClearLocks (1L << 0)426#define XkbSA_LatchToLock (1L << 1)427428#define XkbSA_LockNoLock (1L << 0)429#define XkbSA_LockNoUnlock (1L << 1)430431#define XkbSA_UseModMapMods (1L << 2)432433#define XkbSA_GroupAbsolute (1L << 2)434#define XkbSA_UseDfltButton 0435436#define XkbSA_NoAcceleration (1L << 0)437#define XkbSA_MoveAbsoluteX (1L << 1)438#define XkbSA_MoveAbsoluteY (1L << 2)439440#define XkbSA_ISODfltIsGroup (1L << 7)441#define XkbSA_ISONoAffectMods (1L << 6)442#define XkbSA_ISONoAffectGroup (1L << 5)443#define XkbSA_ISONoAffectPtr (1L << 4)444#define XkbSA_ISONoAffectCtrls (1L << 3)445#define XkbSA_ISOAffectMask (0x78)446447#define XkbSA_MessageOnPress (1L << 0)448#define XkbSA_MessageOnRelease (1L << 1)449#define XkbSA_MessageGenKeyEvent (1L << 2)450451#define XkbSA_AffectDfltBtn 1452#define XkbSA_DfltBtnAbsolute (1L << 2)453454#define XkbSA_SwitchApplication (1L << 0)455#define XkbSA_SwitchAbsolute (1L << 2)456457/*458* The following values apply to the SA_DeviceValuator459* action only. Valuator operations specify the action460* to be taken. Values specified in the action are461* multiplied by 2^scale before they are applied.462*/463#define XkbSA_IgnoreVal (0x00)464#define XkbSA_SetValMin (0x10)465#define XkbSA_SetValCenter (0x20)466#define XkbSA_SetValMax (0x30)467#define XkbSA_SetValRelative (0x40)468#define XkbSA_SetValAbsolute (0x50)469#define XkbSA_ValOpMask (0x70)470#define XkbSA_ValScaleMask (0x07)471#define XkbSA_ValOp(a) ((a)&XkbSA_ValOpMask)472#define XkbSA_ValScale(a) ((a)&XkbSA_ValScaleMask)473474/*475* Action types: specifies the type of a key action. Reported in the476* type field of all key actions.477*/478#define XkbSA_NoAction 0x00479#define XkbSA_SetMods 0x01480#define XkbSA_LatchMods 0x02481#define XkbSA_LockMods 0x03482#define XkbSA_SetGroup 0x04483#define XkbSA_LatchGroup 0x05484#define XkbSA_LockGroup 0x06485#define XkbSA_MovePtr 0x07486#define XkbSA_PtrBtn 0x08487#define XkbSA_LockPtrBtn 0x09488#define XkbSA_SetPtrDflt 0x0a489#define XkbSA_ISOLock 0x0b490#define XkbSA_Terminate 0x0c491#define XkbSA_SwitchScreen 0x0d492#define XkbSA_SetControls 0x0e493#define XkbSA_LockControls 0x0f494#define XkbSA_ActionMessage 0x10495#define XkbSA_RedirectKey 0x11496#define XkbSA_DeviceBtn 0x12497#define XkbSA_LockDeviceBtn 0x13498#define XkbSA_DeviceValuator 0x14499#define XkbSA_LastAction XkbSA_DeviceValuator500#define XkbSA_NumActions (XkbSA_LastAction+1)501502#define XkbSA_XFree86Private 0x86503504/*505* Specifies the key actions that clear latched groups or modifiers.506*/507#define XkbSA_BreakLatch \508((1<<XkbSA_NoAction)|(1<<XkbSA_PtrBtn)|(1<<XkbSA_LockPtrBtn)|\509(1<<XkbSA_Terminate)|(1<<XkbSA_SwitchScreen)|(1<<XkbSA_SetControls)|\510(1<<XkbSA_LockControls)|(1<<XkbSA_ActionMessage)|\511(1<<XkbSA_RedirectKey)|(1<<XkbSA_DeviceBtn)|(1<<XkbSA_LockDeviceBtn))512513/*514* Macros to classify key actions515*/516#define XkbIsModAction(a) (((a)->type>=Xkb_SASetMods)&&((a)->type<=XkbSA_LockMods))517#define XkbIsGroupAction(a) (((a)->type>=XkbSA_SetGroup)&&((a)->type<=XkbSA_LockGroup))518#define XkbIsPtrAction(a) (((a)->type>=XkbSA_MovePtr)&&((a)->type<=XkbSA_SetPtrDflt))519520521/*522* Key Behavior Qualifier:523* KB_Permanent indicates that the behavior describes an unalterable524* characteristic of the keyboard, not an XKB software-simulation of525* the listed behavior.526* Key Behavior Types:527* Specifies the behavior of the underlying key.528*/529#define XkbKB_Permanent 0x80530#define XkbKB_OpMask 0x7f531532#define XkbKB_Default 0x00533#define XkbKB_Lock 0x01534#define XkbKB_RadioGroup 0x02535#define XkbKB_Overlay1 0x03536#define XkbKB_Overlay2 0x04537538#define XkbKB_RGAllowNone 0x80539540/*541* Various macros which describe the range of legal keycodes.542*/543#define XkbMinLegalKeyCode 8544#define XkbMaxLegalKeyCode 255545#define XkbMaxKeyCount (XkbMaxLegalKeyCode-XkbMinLegalKeyCode+1)546#define XkbPerKeyBitArraySize ((XkbMaxLegalKeyCode+1)/8)547/* Seems kinda silly to check that an unsigned char is <= 255... */548#define XkbIsLegalKeycode(k) ((k)>=XkbMinLegalKeyCode)549550/*551* Assorted constants and limits.552*/553#define XkbNumModifiers 8554#define XkbNumVirtualMods 16555#define XkbNumIndicators 32556#define XkbAllIndicatorsMask (0xffffffff)557#define XkbMaxRadioGroups 32558#define XkbAllRadioGroupsMask (0xffffffff)559#define XkbMaxShiftLevel 63560#define XkbMaxSymsPerKey (XkbMaxShiftLevel*XkbNumKbdGroups)561#define XkbRGMaxMembers 12562#define XkbActionMessageLength 6563#define XkbKeyNameLength 4564#define XkbMaxRedirectCount 8565566#define XkbGeomPtsPerMM 10567#define XkbGeomMaxColors 32568#define XkbGeomMaxLabelColors 3569#define XkbGeomMaxPriority 255570571/*572* Key Type index and mask for the four standard key types.573*/574#define XkbOneLevelIndex 0575#define XkbTwoLevelIndex 1576#define XkbAlphabeticIndex 2577#define XkbKeypadIndex 3578#define XkbLastRequiredType XkbKeypadIndex579#define XkbNumRequiredTypes (XkbLastRequiredType+1)580#define XkbMaxKeyTypes 255581582#define XkbOneLevelMask (1<<0)583#define XkbTwoLevelMask (1<<1)584#define XkbAlphabeticMask (1<<2)585#define XkbKeypadMask (1<<3)586#define XkbAllRequiredTypes (0xf)587588#define XkbShiftLevel(n) ((n)-1)589#define XkbShiftLevelMask(n) (1<<((n)-1))590591/*592* Extension name and version information593*/594#define XkbName "XKEYBOARD"595#define XkbMajorVersion 1596#define XkbMinorVersion 0597598/*599* Explicit map components:600* - Used in the 'explicit' field of an XkbServerMap. Specifies601* the keyboard components that should _not_ be updated automatically602* in response to core protocol keyboard mapping requests.603*/604#define XkbExplicitKeyTypesMask (0x0f)605#define XkbExplicitKeyType1Mask (1<<0)606#define XkbExplicitKeyType2Mask (1<<1)607#define XkbExplicitKeyType3Mask (1<<2)608#define XkbExplicitKeyType4Mask (1<<3)609#define XkbExplicitInterpretMask (1<<4)610#define XkbExplicitAutoRepeatMask (1<<5)611#define XkbExplicitBehaviorMask (1<<6)612#define XkbExplicitVModMapMask (1<<7)613#define XkbAllExplicitMask (0xff)614615/*616* Map components masks:617* Those in AllMapComponentsMask:618* - Specifies the individual fields to be loaded or changed for the619* GetMap and SetMap requests.620* Those in ClientInfoMask:621* - Specifies the components to be allocated by XkbAllocClientMap.622* Those in ServerInfoMask:623* - Specifies the components to be allocated by XkbAllocServerMap.624*/625#define XkbKeyTypesMask (1<<0)626#define XkbKeySymsMask (1<<1)627#define XkbModifierMapMask (1<<2)628#define XkbExplicitComponentsMask (1<<3)629#define XkbKeyActionsMask (1<<4)630#define XkbKeyBehaviorsMask (1<<5)631#define XkbVirtualModsMask (1<<6)632#define XkbVirtualModMapMask (1<<7)633634#define XkbAllClientInfoMask (XkbKeyTypesMask|XkbKeySymsMask|XkbModifierMapMask)635#define XkbAllServerInfoMask (XkbExplicitComponentsMask|XkbKeyActionsMask|XkbKeyBehaviorsMask|XkbVirtualModsMask|XkbVirtualModMapMask)636#define XkbAllMapComponentsMask (XkbAllClientInfoMask|XkbAllServerInfoMask)637638/*639* Symbol interpretations flags:640* - Used in the flags field of a symbol interpretation641*/642#define XkbSI_AutoRepeat (1<<0)643#define XkbSI_LockingKey (1<<1)644645/*646* Symbol interpretations match specification:647* - Used in the match field of a symbol interpretation to specify648* the conditions under which an interpretation is used.649*/650#define XkbSI_LevelOneOnly (0x80)651#define XkbSI_OpMask (0x7f)652#define XkbSI_NoneOf (0)653#define XkbSI_AnyOfOrNone (1)654#define XkbSI_AnyOf (2)655#define XkbSI_AllOf (3)656#define XkbSI_Exactly (4)657658/*659* Indicator map flags:660* - Used in the flags field of an indicator map to indicate the661* conditions under which and indicator can be changed and the662* effects of changing the indicator.663*/664#define XkbIM_NoExplicit (1L << 7)665#define XkbIM_NoAutomatic (1L << 6)666#define XkbIM_LEDDrivesKB (1L << 5)667668/*669* Indicator map component specifications:670* - Used by the 'which_groups' and 'which_mods' fields of an indicator671* map to specify which keyboard components should be used to drive672* the indicator.673*/674#define XkbIM_UseBase (1L << 0)675#define XkbIM_UseLatched (1L << 1)676#define XkbIM_UseLocked (1L << 2)677#define XkbIM_UseEffective (1L << 3)678#define XkbIM_UseCompat (1L << 4)679680#define XkbIM_UseNone 0681#define XkbIM_UseAnyGroup (XkbIM_UseBase|XkbIM_UseLatched|XkbIM_UseLocked\682|XkbIM_UseEffective)683#define XkbIM_UseAnyMods (XkbIM_UseAnyGroup|XkbIM_UseCompat)684685/*686* Compatibility Map Components:687* - Specifies the components to be allocated in XkbAllocCompatMap.688*/689#define XkbSymInterpMask (1<<0)690#define XkbGroupCompatMask (1<<1)691#define XkbAllCompatMask (0x3)692693/*694* Names component mask:695* - Specifies the names to be loaded or changed for the GetNames and696* SetNames requests.697* - Specifies the names that have changed in a NamesNotify event.698* - Specifies the names components to be allocated by XkbAllocNames.699*/700#define XkbKeycodesNameMask (1<<0)701#define XkbGeometryNameMask (1<<1)702#define XkbSymbolsNameMask (1<<2)703#define XkbPhysSymbolsNameMask (1<<3)704#define XkbTypesNameMask (1<<4)705#define XkbCompatNameMask (1<<5)706#define XkbKeyTypeNamesMask (1<<6)707#define XkbKTLevelNamesMask (1<<7)708#define XkbIndicatorNamesMask (1<<8)709#define XkbKeyNamesMask (1<<9)710#define XkbKeyAliasesMask (1<<10)711#define XkbVirtualModNamesMask (1<<11)712#define XkbGroupNamesMask (1<<12)713#define XkbRGNamesMask (1<<13)714#define XkbComponentNamesMask (0x3f)715#define XkbAllNamesMask (0x3fff)716717/*718* GetByName components:719* - Specifies desired or necessary components to GetKbdByName request.720* - Reports the components that were found in a GetKbdByNameReply721*/722#define XkbGBN_TypesMask (1L << 0)723#define XkbGBN_CompatMapMask (1L << 1)724#define XkbGBN_ClientSymbolsMask (1L << 2)725#define XkbGBN_ServerSymbolsMask (1L << 3)726#define XkbGBN_SymbolsMask (XkbGBN_ClientSymbolsMask|XkbGBN_ServerSymbolsMask)727#define XkbGBN_IndicatorMapMask (1L << 4)728#define XkbGBN_KeyNamesMask (1L << 5)729#define XkbGBN_GeometryMask (1L << 6)730#define XkbGBN_OtherNamesMask (1L << 7)731#define XkbGBN_AllComponentsMask (0xff)732733/*734* ListComponents flags735*/736#define XkbLC_Hidden (1L << 0)737#define XkbLC_Default (1L << 1)738#define XkbLC_Partial (1L << 2)739740#define XkbLC_AlphanumericKeys (1L << 8)741#define XkbLC_ModifierKeys (1L << 9)742#define XkbLC_KeypadKeys (1L << 10)743#define XkbLC_FunctionKeys (1L << 11)744#define XkbLC_AlternateGroup (1L << 12)745746/*747* X Input Extension Interactions748* - Specifies the possible interactions between XKB and the X input749* extension750* - Used to request (XkbGetDeviceInfo) or change (XKbSetDeviceInfo)751* XKB information about an extension device.752* - Reports the list of supported optional features in the reply to753* XkbGetDeviceInfo or in an XkbExtensionDeviceNotify event.754* XkbXI_UnsupportedFeature is reported in XkbExtensionDeviceNotify755* events to indicate an attempt to use an unsupported feature.756*/757#define XkbXI_KeyboardsMask (1L << 0)758#define XkbXI_ButtonActionsMask (1L << 1)759#define XkbXI_IndicatorNamesMask (1L << 2)760#define XkbXI_IndicatorMapsMask (1L << 3)761#define XkbXI_IndicatorStateMask (1L << 4)762#define XkbXI_UnsupportedFeatureMask (1L << 15)763#define XkbXI_AllFeaturesMask (0x001f)764#define XkbXI_AllDeviceFeaturesMask (0x001e)765766#define XkbXI_IndicatorsMask (0x001c)767#define XkbAllExtensionDeviceEventsMask (0x801f)768769/*770* Per-Client Flags:771* - Specifies flags to be changed by the PerClientFlags request.772*/773#define XkbPCF_DetectableAutoRepeatMask (1L << 0)774#define XkbPCF_GrabsUseXKBStateMask (1L << 1)775#define XkbPCF_AutoResetControlsMask (1L << 2)776#define XkbPCF_LookupStateWhenGrabbed (1L << 3)777#define XkbPCF_SendEventUsesXKBState (1L << 4)778#define XkbPCF_AllFlagsMask (0x1F)779780/*781* Debugging flags and controls782*/783#define XkbDF_DisableLocks (1<<0)784785#endif /* _XKB_H_ */786787788