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 mask of controls requested
18
19 xkb keyboard description for controls information
20
22 For each bit that is set in the which parameter, XkbSetControls sends
23 the corresponding values from the xkb->ctrls field to the server. Valid
24 values for which are any combination of the masks listed in Table 1
25 that have "ok" in the which column.
26
27 Table 1 shows the actual values for the individual mask bits used to
28 select controls for modification and to enable and disable the control.
29 Note that the same mask bit is used to specify general modifications to
30 the parameters used to configure the control (which), and to enable and
31 disable the control (enabled_ctrls). The anomalies in the table (no
32 "ok" in column) are for controls that have no configurable attributes;
33 and for controls that are not boolean controls and therefore cannot be
34 enabled or disabled.
35
36
37 Table 1 Controls Mask Bits
38 ───────────────────────────────────────────────────────────────────────────
39 Mask Bit which or enabled Value
40 changed_ctrls _ctrls
41 ───────────────────────────────────────────────────────────────────────────
42 XkbRepeatKeysMask ok ok (1L<<0)
43 XkbSlowKeysMask ok ok (1L<<1)
44 XkbBounceKeysMask ok ok (1L<<2)
45 XkbStickyKeysMask ok ok (1L<<3)
46 XkbMouseKeysMask ok ok (1L<<4)
47 XkbMouseKeysAccelMask ok ok (1L<<5)
48 XkbAccessXKeysMask ok ok (1L<<6)
49 XkbAccessXTimeoutMask ok ok (1L<<7)
50 XkbAccessXFeedbackMask ok ok (1L<<8)
51 XkbAudibleBellMask ok (1L<<9)
52 XkbOverlay1Mask ok (1L<<10)
53 XkbOverlay2Mask ok (1L<<11)
54 XkbIgnoreGroupLockMask ok (1L<<12)
55 XkbGroupsWrapMask ok (1L<<27)
56 XkbInternalModsMask ok (1L<<28)
57 XkbIgnoreLockModsMask ok (1L<<29)
58 XkbPerKeyRepeatMask ok (1L<<30)
59 XkbControlsEnabledMask ok (1L<<31)
60 XkbAccessXOptionsMask ok ok (XkbStickyKeysMask |
61 XkbAccessXFeedbackMask)
62 XkbAllBooleanCtrlsMask ok (0x00001FFF)
63 XkbAllControlsMask ok (0xF8001FFF)
64
65 If xkb->ctrls is NULL, the server does not support a compatible version
66 of Xkb, or the Xkb extension has not been properly initialized, XkbSet‐
67 Controls returns False. Otherwise, it sends the request to the X server
68 and returns True.
69
70 Note that changes to attributes of controls in the XkbControlsRec
71 structure are apparent only when the associated control is enabled, al‐
72 though the corresponding values are still updated in the X server. For
73 example, the repeat_delay and repeat_interval fields are ignored unless
74 the RepeatKeys control is enabled (that is, the X server's equivalent
75 of xkb->ctrls has XkbRepeatKeyMask set in enabled_ctrls). It is per‐
76 missible to modify the attributes of a control in one call to XkbSet‐
77 Controls and enable the control in a subsequent call. See XkbChangeEn‐
78 abledControls for more information on enabling and disabling controls.
79
80 Note that the enabled_ctrls field is itself a control - the EnabledCon‐
81 trols control. As such, to set a specific configuration of enabled and
82 disabled boolean controls, you must set enabled_ctrls to the appropri‐
83 ate bits to enable only the controls you want and disable all others,
84 then specify the XkbControlsEnabledMask in a call to XkbSetControls.
85
86 Because this is somewhat awkward if all you want to do is enable and
87 disable controls, and not modify any of their attributes, a convenience
88 function is also provided for this purpose, XkbChangeEnabledControls.
89
91 True The XkbSetControls function returns True when it sends
92 the request to the X server.
93
94 False The XkbSetControls function returns False when
95 xkb->ctrls is NULL, the server does not support a com‐
96 patible version of Xkb, or the Xkb extension has not
97 been properly initialized.
98
100 BadAlloc Unable to allocate storage
101
102 BadMatch A compatible version of Xkb was not available in the
103 server or an argument has correct type and range, but is
104 otherwise invalid
105
107 XkbChangeEnabledControls(3), XkbFreeControls(3)
108
109
110
111
112X Version 11 libX11 1.8.7 XkbSetControls(3)