1XkbSetControls(3) XKB FUNCTIONS XkbSetControls(3)
2
3
4
6 XkbSetControls - Copies changes to the X server based on a modified
7 ctrls structure in a local copy of the keyboard description
8
10 Bool XkbSetControls (Display *display, unsigned long which, XkbDescPtr
11 xkb);
12
14 - display
15 connection to X server
16
17 - which
18 mask of controls requested
19
20 - xkb keyboard description for controls information
21
23 For each bit that is set in the which parameter, XkbSetControls sends
24 the corresponding values from the xkb->ctrls field to the server. Valid
25 values for which are any combination of the masks listed in Table 1
26 that have "ok" in the which column.
27
28 Table 1 shows the actual values for the individual mask bits used to
29 select controls for modification and to enable and disable the control.
30 Note that the same mask bit is used to specify general modifications to
31 the parameters used to configure the control (which), and to enable and
32 disable the control (enabled_ctrls). The anomalies in the table (no
33 "ok" in column) are for controls that have no configurable attributes;
34 and for controls that are not boolean controls and therefore cannot be
35 enabled or disabled.
36
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 If xkb->ctrls is NULL, the server does not support a compatible version
67 of Xkb, or the Xkb extension has not been properly initialized, XkbSet‐
68 Controls returns False. Otherwise, it sends the request to the X server
69 and returns True.
70
71 Note that changes to attributes of controls in the XkbControlsRec
72 structure are apparent only when the associated control is enabled, al‐
73 though the corresponding values are still updated in the X server. For
74 example, the repeat_delay and repeat_interval fields are ignored unless
75 the RepeatKeys control is enabled (that is, the X server's equivalent
76 of xkb->ctrls has XkbRepeatKeyMask set in enabled_ctrls). It is per‐
77 missible to modify the attributes of a control in one call to XkbSet‐
78 Controls and enable the control in a subsequent call. See XkbChangeEn‐
79 abledControls for more information on enabling and disabling controls.
80
81 Note that the enabled_ctrls field is itself a control - the EnabledCon‐
82 trols control. As such, to set a specific configuration of enabled and
83 disabled boolean controls, you must set enabled_ctrls to the appropri‐
84 ate bits to enable only the controls you want and disable all others,
85 then specify the XkbControlsEnabledMask in a call to XkbSetControls.
86
87 Because this is somewhat awkward if all you want to do is enable and
88 disable controls, and not modify any of their attributes, a convenience
89 function is also provided for this purpose, XkbChangeEnabledControls.
90
92 True The XkbSetControls function returns True when it sends
93 the request to the X server.
94
95 False The XkbSetControls function returns False when
96 xkb->ctrls is NULL, the server does not support a com‐
97 patible version of Xkb, or the Xkb extension has not
98 been properly initialized.
99
101 BadAlloc Unable to allocate storage
102
103 BadMatch A compatible version of Xkb was not available in the
104 server or an argument has correct type and range, but is
105 otherwise invalid
106
108 XkbChangeEnabledControls(3), XkbFreeControls(3)
109
110
111
112
113X Version 11 libX11 1.7.0 XkbSetControls(3)