1XkbChangeEnabledControls(3) XKB FUNCTIONS XkbChangeEnabledControls(3)
2
3
4
6 XkbChangeEnabledControls - Manipulates the EnabledControls control
7
9 Bool XkbChangeEnabledControls (Display *dpy, unsigned int device_spec,
10 unsigned int mask, unsigned int values);
11
13 dpy connection to X server
14
15 device_spec
16 keyboard device to modify
17
18 mask 1 bit -> controls to enable / disable
19
20 values 1 bit => enable, 0 bit => disable
21
23 The EnabledControls control is a bit mask where each bit that is turned
24 on means the corresponding control is enabled, and when turned off,
25 disabled. It corresponds to the enabled_ctrls field of an XkbControl‐
26 sRec structure (see STRUCTURES). The bits describing which controls are
27 turned on or off are defined in Table 1.
28
29 Table 1 shows the actual values for the individual mask bits used to
30 select controls for modification and to enable and disable the control.
31 Note that the same mask bit is used to specify general modifications to
32 the parameters used to configure the control (which), and to enable and
33 disable the control (enabled_ctrls). The anomalies in the table (no
34 "ok" in column) are for controls that have no configurable attributes;
35 and for controls that are not boolean controls and therefore cannot be
36 enabled or disabled.
37
38 Table 1 Controls Mask Bits
39 ───────────────────────────────────────────────────────────────────────────
40 Mask Bit which or enabled Value
41 changed_ctrls _ctrls
42 ───────────────────────────────────────────────────────────────────────────
43 XkbRepeatKeysMask ok ok (1L<<0)
44 XkbSlowKeysMask ok ok (1L<<1)
45 XkbBounceKeysMask ok ok (1L<<2)
46 XkbStickyKeysMask ok ok (1L<<3)
47 XkbMouseKeysMask ok ok (1L<<4)
48 XkbMouseKeysAccelMask ok ok (1L<<5)
49 XkbAccessXKeysMask ok ok (1L<<6)
50 XkbAccessXTimeoutMask ok ok (1L<<7)
51 XkbAccessXFeedbackMask ok ok (1L<<8)
52 XkbAudibleBellMask ok (1L<<9)
53 XkbOverlay1Mask ok (1L<<10)
54 XkbOverlay2Mask ok (1L<<11)
55 XkbIgnoreGroupLockMask ok (1L<<12)
56 XkbGroupsWrapMask ok (1L<<27)
57 XkbInternalModsMask ok (1L<<28)
58 XkbIgnoreLockModsMask ok (1L<<29)
59 XkbPerKeyRepeatMask ok (1L<<30)
60 XkbControlsEnabledMask ok (1L<<31)
61 XkbAccessXOptionsMask ok ok (XkbStickyKeysMask |
62 XkbAccessXFeedbackMask)
63 XkbAllBooleanCtrlsMask ok (0x00001FFF)
64 XkbAllControlsMask ok (0xF8001FFF)
65
66 The mask parameter specifies the boolean controls to be enabled or dis‐
67 abled, and the values mask specifies the new state for those controls.
68 Valid values for both of these masks are composed of a bitwise inclu‐
69 sive OR of bits taken from the set of mask bits in Table 1, using only
70 those masks with "ok" in the enabled_ctrls column.
71
72 If the X server does not support a compatible version of Xkb or the Xkb
73 extension has not been properly initialized, XkbChangeEnabledControls
74 returns False; otherwise, it sends the request to the X server and re‐
75 turns True.
76
77 Note that the EnabledControls control only enables and disables con‐
78 trols; it does not configure them. Some controls, such as the Audible‐
79 Bell control, have no configuration attributes and are therefore manip‐
80 ulated solely by enabling and disabling them. Others, however, have ad‐
81 ditional attributes to configure their behavior. For example, the Re‐
82 peatControl control uses repeat_delay and repeat_interval fields to de‐
83 scribe the timing behavior of keys that repeat. The RepeatControl be‐
84 havior is turned on or off depending on the value of the XkbRe‐
85 peatKeysMask bit, but you must use other means, as described in this
86 chapter, to configure its behavior in detail.
87
89 True The X server supports a compatible version of Xkb.
90
91 False The X server does not support a compatible version of
92 Xkb or the Xkb extension has not been properly initial‐
93 ized.
94
96 The XkbControlsRec structure is defined as follows:
97
98 #define XkbMaxLegalKeyCode 255
99 #define XkbPerKeyBitArraySize ((XkbMaxLegalKeyCode+1)/8)
100
101
102 typedef struct {
103 unsigned char mk_dflt_btn; /* default button for keyboard driven mouse */
104 unsigned char num_groups; /* number of keyboard groups */
105 unsigned char groups_wrap; /* how to wrap out-of-bounds groups */
106 XkbModsRec internal; /* defines server internal modifiers */
107 XkbModsRec ignore_lock; /* modifiers to ignore when checking for grab */
108 unsigned int enabled_ctrls; /* 1 bit => corresponding boolean control enabled */
109 unsigned short repeat_delay; /* ms delay until first repeat */
110 unsigned short repeat_interval; /* ms delay between repeats */
111 unsigned short slow_keys_delay; /* ms minimum time key must be down to be ok */
112 unsigned short debounce_delay; /* ms delay before key reactivated */
113 unsigned short mk_delay; /* ms delay to second mouse motion event */
114 unsigned short mk_interval; /* ms delay between repeat mouse events */
115 unsigned short mk_time_to_max; /* # intervals until constant mouse move */
116 unsigned short mk_max_speed; /* multiplier for maximum mouse speed */
117 short mk_curve; /* determines mouse move curve type */
118 unsigned short ax_options; /* 1 bit => Access X option enabled */
119 unsigned short ax_timeout; /* seconds until Access X disabled */
120 unsigned short axt_opts_mask; /* 1 bit => options to reset on Access X timeout */
121 unsigned short axt_opts_values; /* 1 bit => turn option on, 0=> off */
122 unsigned int axt_ctrls_mask; /* which bits in enabled_ctrls to modify */
123 unsigned int axt_ctrls_values; /* values for new bits in enabled_ctrls */
124 unsigned char per_key_repeat[XkbPerKeyBitArraySize]; /* per key auto repeat */
125 } XkbControlsRec, *XkbControlsPtr;
126
127
128
129X Version 11 libX11 1.8.7 XkbChangeEnabledControls(3)