📄 xkb.h
字号:
#define XkbRedirectIntoRange (0x80) /* * Action flags: Reported in the 'flags' field of most key actions. * Interpretation depends on the type of the action; not all actions * accept all flags. * * Option Used for Actions * ------ ---------------- * ClearLocks SetMods, LatchMods, SetGroup, LatchGroup * LatchToLock SetMods, LatchMods, SetGroup, LatchGroup * LockNoLock LockMods, ISOLock, LockPtrBtn, LockDeviceBtn * LockNoUnlock LockMods, ISOLock, LockPtrBtn, LockDeviceBtn * UseModMapMods SetMods, LatchMods, LockMods, ISOLock * GroupAbsolute SetGroup, LatchGroup, LockGroup, ISOLock * UseDfltButton PtrBtn, LockPtrBtn * NoAcceleration MovePtr * MoveAbsoluteX MovePtr * MoveAbsoluteY MovePtr * ISODfltIsGroup ISOLock * ISONoAffectMods ISOLock * ISONoAffectGroup ISOLock * ISONoAffectPtr ISOLock * ISONoAffectCtrls ISOLock * MessageOnPress ActionMessage * MessageOnRelease ActionMessage * MessageGenKeyEvent ActionMessage * AffectDfltBtn SetPtrDflt * DfltBtnAbsolute SetPtrDflt * SwitchApplication SwitchScreen * SwitchAbsolute SwitchScreen */#define XkbSA_ClearLocks (1L << 0)#define XkbSA_LatchToLock (1L << 1)#define XkbSA_LockNoLock (1L << 0)#define XkbSA_LockNoUnlock (1L << 1)#define XkbSA_UseModMapMods (1L << 2)#define XkbSA_GroupAbsolute (1L << 2)#define XkbSA_UseDfltButton 0#define XkbSA_NoAcceleration (1L << 0)#define XkbSA_MoveAbsoluteX (1L << 1)#define XkbSA_MoveAbsoluteY (1L << 2)#define XkbSA_ISODfltIsGroup (1L << 7)#define XkbSA_ISONoAffectMods (1L << 6)#define XkbSA_ISONoAffectGroup (1L << 5)#define XkbSA_ISONoAffectPtr (1L << 4)#define XkbSA_ISONoAffectCtrls (1L << 3)#define XkbSA_ISOAffectMask (0x78)#define XkbSA_MessageOnPress (1L << 0)#define XkbSA_MessageOnRelease (1L << 1)#define XkbSA_MessageGenKeyEvent (1L << 2)#define XkbSA_AffectDfltBtn 1#define XkbSA_DfltBtnAbsolute (1L << 2)#define XkbSA_SwitchApplication (1L << 0)#define XkbSA_SwitchAbsolute (1L << 2) /* * The following values apply to the SA_DeviceValuator * action only. Valuator operations specify the action * to be taken. Values specified in the action are * multiplied by 2^scale before they are applied. */#define XkbSA_IgnoreVal (0x00)#define XkbSA_SetValMin (0x10)#define XkbSA_SetValCenter (0x20)#define XkbSA_SetValMax (0x30)#define XkbSA_SetValRelative (0x40)#define XkbSA_SetValAbsolute (0x50)#define XkbSA_ValOpMask (0x70)#define XkbSA_ValScaleMask (0x07)#define XkbSA_ValOp(a) ((a)&XkbSA_ValOpMask)#define XkbSA_ValScale(a) ((a)&XkbSA_ValScaleMask) /* * Action types: specifies the type of a key action. Reported in the * type field of all key actions. */#define XkbSA_NoAction 0x00#define XkbSA_SetMods 0x01#define XkbSA_LatchMods 0x02#define XkbSA_LockMods 0x03#define XkbSA_SetGroup 0x04#define XkbSA_LatchGroup 0x05#define XkbSA_LockGroup 0x06#define XkbSA_MovePtr 0x07#define XkbSA_PtrBtn 0x08#define XkbSA_LockPtrBtn 0x09#define XkbSA_SetPtrDflt 0x0a#define XkbSA_ISOLock 0x0b#define XkbSA_Terminate 0x0c#define XkbSA_SwitchScreen 0x0d#define XkbSA_SetControls 0x0e#define XkbSA_LockControls 0x0f#define XkbSA_ActionMessage 0x10#define XkbSA_RedirectKey 0x11#define XkbSA_DeviceBtn 0x12#define XkbSA_LockDeviceBtn 0x13#define XkbSA_DeviceValuator 0x14#define XkbSA_LastAction XkbSA_DeviceValuator#define XkbSA_NumActions (XkbSA_LastAction+1) /* * Specifies the key actions that clear latched groups or modifiers. */#define XkbSA_BreakLatch \ ((1<<XkbSA_NoAction)|(1<<XkbSA_PtrBtn)|(1<<XkbSA_LockPtrBtn)|\ (1<<XkbSA_Terminate)|(1<<XkbSA_SwitchScreen)|(1<<XkbSA_SetControls)|\ (1<<XkbSA_LockControls)|(1<<XkbSA_ActionMessage)|\ (1<<XkbSA_RedirectKey)|(1<<XkbSA_DeviceBtn)|(1<<XkbSA_LockDeviceBtn)) /* * Macros to classify key actions */#define XkbIsModAction(a) (((a)->type>=Xkb_SASetMods)&&((a)->type<=XkbSA_LockMods))#define XkbIsGroupAction(a) (((a)->type>=XkbSA_SetGroup)&&((a)->type<=XkbSA_LockGroup))#define XkbIsPtrAction(a) (((a)->type>=XkbSA_MovePtr)&&((a)->type<=XkbSA_SetPtrDflt)) /* * Key Behavior Qualifier: * KB_Permanent indicates that the behavior describes an unalterable * characteristic of the keyboard, not an XKB software-simulation of * the listed behavior. * Key Behavior Types: * Specifies the behavior of the underlying key. */#define XkbKB_Permanent 0x80#define XkbKB_OpMask 0x7f#define XkbKB_Default 0x00#define XkbKB_Lock 0x01#define XkbKB_RadioGroup 0x02#define XkbKB_Overlay1 0x03#define XkbKB_Overlay2 0x04#define XkbKB_RGAllowNone 0x80 /* * Various macros which describe the range of legal keycodes. */#define XkbMinLegalKeyCode 8#define XkbMaxLegalKeyCode 255#define XkbMaxKeyCount (XkbMaxLegalKeyCode-XkbMinLegalKeyCode+1)#define XkbPerKeyBitArraySize ((XkbMaxLegalKeyCode+1)/8)#define XkbIsLegalKeycode(k) (((k)>=XkbMinLegalKeyCode)&&((k)<=XkbMaxLegalKeyCode)) /* * Assorted constants and limits. */#define XkbNumModifiers 8#define XkbNumVirtualMods 16#define XkbNumIndicators 32#define XkbAllIndicatorsMask (0xffffffff)#define XkbMaxRadioGroups 32#define XkbAllRadioGroupsMask (0xffffffff)#define XkbMaxShiftLevel 63#define XkbMaxSymsPerKey (XkbMaxShiftLevel*XkbNumKbdGroups)#define XkbRGMaxMembers 12#define XkbActionMessageLength 6#define XkbKeyNameLength 4#define XkbMaxRedirectCount 8#define XkbGeomPtsPerMM 10#define XkbGeomMaxColors 32#define XkbGeomMaxLabelColors 3#define XkbGeomMaxPriority 255 /* * Key Type index and mask for the four standard key types. */#define XkbOneLevelIndex 0#define XkbTwoLevelIndex 1#define XkbAlphabeticIndex 2#define XkbKeypadIndex 3#define XkbLastRequiredType XkbKeypadIndex#define XkbNumRequiredTypes (XkbLastRequiredType+1)#define XkbMaxKeyTypes 255#define XkbOneLevelMask (1<<0)#define XkbTwoLevelMask (1<<1)#define XkbAlphabeticMask (1<<2)#define XkbKeypadMask (1<<3)#define XkbAllRequiredTypes (0xf)#define XkbShiftLevel(n) ((n)-1)#define XkbShiftLevelMask(n) (1<<((n)-1)) /* * Extension name and version information */#define XkbName "XKEYBOARD"#define XkbMajorVersion 1#define XkbMinorVersion 0 /* * Explicit map components: * - Used in the 'explicit' field of an XkbServerMap. Specifies * the keyboard components that should _not_ be updated automatically * in response to core protocol keyboard mapping requests. */#define XkbExplicitKeyTypesMask (0x0f)#define XkbExplicitKeyType1Mask (1<<0)#define XkbExplicitKeyType2Mask (1<<1)#define XkbExplicitKeyType3Mask (1<<2)#define XkbExplicitKeyType4Mask (1<<3)#define XkbExplicitInterpretMask (1<<4)#define XkbExplicitAutoRepeatMask (1<<5)#define XkbExplicitBehaviorMask (1<<6)#define XkbExplicitVModMapMask (1<<7)#define XkbAllExplicitMask (0xff) /* * Map components masks: * Those in AllMapComponentsMask: * - Specifies the individual fields to be loaded or changed for the * GetMap and SetMap requests. * Those in ClientInfoMask: * - Specifies the components to be allocated by XkbAllocClientMap. * Those in ServerInfoMask: * - Specifies the components to be allocated by XkbAllocServerMap. */#define XkbKeyTypesMask (1<<0)#define XkbKeySymsMask (1<<1)#define XkbModifierMapMask (1<<2)#define XkbExplicitComponentsMask (1<<3)#define XkbKeyActionsMask (1<<4)#define XkbKeyBehaviorsMask (1<<5)#define XkbVirtualModsMask (1<<6)#define XkbVirtualModMapMask (1<<7)#define XkbAllClientInfoMask (XkbKeyTypesMask|XkbKeySymsMask|XkbModifierMapMask)#define XkbAllServerInfoMask (XkbExplicitComponentsMask|XkbKeyActionsMask|XkbKeyBehaviorsMask|XkbVirtualModsMask|XkbVirtualModMapMask)#define XkbAllMapComponentsMask (XkbAllClientInfoMask|XkbAllServerInfoMask) /* * Symbol interpretations flags: * - Used in the flags field of a symbol interpretation */#define XkbSI_AutoRepeat (1<<0)#define XkbSI_LockingKey (1<<1) /* * Symbol interpretations match specification: * - Used in the match field of a symbol interpretation to specify * the conditions under which an interpretation is used. */#define XkbSI_LevelOneOnly (0x80)#define XkbSI_OpMask (0x7f)#define XkbSI_NoneOf (0)#define XkbSI_AnyOfOrNone (1)#define XkbSI_AnyOf (2)#define XkbSI_AllOf (3)#define XkbSI_Exactly (4) /* * Indicator map flags: * - Used in the flags field of an indicator map to indicate the * conditions under which and indicator can be changed and the * effects of changing the indicator. */#define XkbIM_NoExplicit (1L << 7)#define XkbIM_NoAutomatic (1L << 6)#define XkbIM_LEDDrivesKB (1L << 5) /* * Indicator map component specifications: * - Used by the 'which_groups' and 'which_mods' fields of an indicator * map to specify which keyboard components should be used to drive * the indicator. */#define XkbIM_UseBase (1L << 0)#define XkbIM_UseLatched (1L << 1)#define XkbIM_UseLocked (1L << 2)#define XkbIM_UseEffective (1L << 3)#define XkbIM_UseCompat (1L << 4)#define XkbIM_UseNone 0#define XkbIM_UseAnyGroup (XkbIM_UseLatched|XkbIM_UseLocked|XkbIM_UseEffective)#define XkbIM_UseAnyMods (XkbIM_UseAnyGroup|XkbIM_UseCompat|XkbIM_UseBase) /* * Compatibility Map Compontents: * - Specifies the components to be allocated in XkbAllocCompatMap. */#define XkbSymInterpMask (1<<0)#define XkbGroupCompatMask (1<<1)#define XkbAllCompatMask (0x3) /* * Names component mask: * - Specifies the names to be loaded or changed for the GetNames and * SetNames requests. * - Specifies the names that have changed in a NamesNotify event. * - Specifies the names components to be allocated by XkbAllocNames. */#define XkbKeycodesNameMask (1<<0)#define XkbGeometryNameMask (1<<1)#define XkbSymbolsNameMask (1<<2)#define XkbPhysSymbolsNameMask (1<<3)#define XkbTypesNameMask (1<<4)#define XkbCompatNameMask (1<<5)#define XkbKeyTypeNamesMask (1<<6)#define XkbKTLevelNamesMask (1<<7)#define XkbIndicatorNamesMask (1<<8)#define XkbKeyNamesMask (1<<9)#define XkbKeyAliasesMask (1<<10)#define XkbVirtualModNamesMask (1<<11)#define XkbGroupNamesMask (1<<12)#define XkbRGNamesMask (1<<13)#define XkbComponentNamesMask (0x3f)#define XkbAllNamesMask (0x3fff) /* * GetByName components: * - Specifies desired or necessary components to GetKbdByName request. * - Reports the components that were found in a GetKbdByNameReply */#define XkbGBN_TypesMask (1L << 0)#define XkbGBN_CompatMapMask (1L << 1)#define XkbGBN_ClientSymbolsMask (1L << 2)#define XkbGBN_ServerSymbolsMask (1L << 3)#define XkbGBN_SymbolsMask (XkbGBN_ClientSymbolsMask|XkbGBN_ServerSymbolsMask)#define XkbGBN_IndicatorMapMask (1L << 4)#define XkbGBN_KeyNamesMask (1L << 5)#define XkbGBN_GeometryMask (1L << 6)#define XkbGBN_OtherNamesMask (1L << 7)#define XkbGBN_AllComponentsMask (0xff) /* * ListComponents flags */#define XkbLC_Hidden (1L << 0)#define XkbLC_Default (1L << 1)#define XkbLC_Partial (1L << 2)#define XkbLC_AlphanumericKeys (1L << 8)#define XkbLC_ModifierKeys (1L << 9)#define XkbLC_KeypadKeys (1L << 10)#define XkbLC_FunctionKeys (1L << 11)#define XkbLC_AlternateGroup (1L << 12) /* * X Input Extension Interactions * - Specifies the possible interactions between XKB and the X input * extension * - Used to request (XkbGetDeviceInfo) or change (XKbSetDeviceInfo) * XKB information about an extension device. * - Reports the list of supported optional features in the reply to * XkbGetDeviceInfo or in an XkbExtensionDeviceNotify event. * XkbXI_UnsupportedFeature is reported in XkbExtensionDeviceNotify * events to indicate an attempt to use an unsupported feature. */#define XkbXI_KeyboardsMask (1L << 0)#define XkbXI_ButtonActionsMask (1L << 1)#define XkbXI_IndicatorNamesMask (1L << 2)#define XkbXI_IndicatorMapsMask (1L << 3)#define XkbXI_IndicatorStateMask (1L << 4)#define XkbXI_UnsupportedFeatureMask (1L << 15)#define XkbXI_AllFeaturesMask (0x001f)#define XkbXI_AllDeviceFeaturesMask (0x001e)#define XkbXI_IndicatorsMask (0x001c)#define XkbAllExtensionDeviceEventsMask (0x801f) /* * Per-Client Flags: * - Specifies flags to be changed by the PerClientFlags request. */#define XkbPCF_DetectableAutoRepeatMask (1L << 0)#define XkbPCF_GrabsUseXKBStateMask (1L << 1)#define XkbPCF_AutoResetControlsMask (1L << 2)#define XkbPCF_LookupStateWhenGrabbed (1L << 3)#define XkbPCF_SendEventUsesXKBState (1L << 4)#define XkbPCF_AllFlagsMask (0x1F) /* * Debugging flags and controls */#define XkbDF_DisableLocks (1<<0)#endif /* _XKB_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -